tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Reduce contention on fstrans_lock
> On Apr 4, 2020, at 2:14 PM, Andrew Doran <ad%netbsd.org@localhost> wrote:
>
> Any comments?
+static int
+fstrans_lwp_ctor(void *arg, void *obj, int flags)
+{
+ struct fstrans_lwp_info *fli = obj;
+
+ memset(fli, 0, sizeof(*fli));
+ membar_sync();
+ mutex_enter(&fstrans_lock);
+ LIST_INSERT_HEAD(&fstrans_fli_head, fli, fli_list);
+ mutex_exit(&fstrans_lock);
+ return 0;
+}
That membar_sync() could be a membar_producer().
-- thorpej
Home |
Main Index |
Thread Index |
Old Index