[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160719050032.GE2356@ZenIV.linux.org.uk>
Date: Tue, 19 Jul 2016 06:00:32 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Waiman Long <Waiman.Long@....com>
Cc: Jan Kara <jack@...e.com>, Jeff Layton <jlayton@...chiereds.net>,
"J. Bruce Fields" <bfields@...ldses.org>,
Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Andi Kleen <andi@...stfloor.org>,
Dave Chinner <dchinner@...hat.com>,
Boqun Feng <boqun.feng@...il.com>,
Scott J Norton <scott.norton@....com>,
Douglas Hatch <doug.hatch@....com>
Subject: Re: [PATCH v3 1/4] lib/dlock-list: Distributed and lock-protected
lists
On Fri, Jul 15, 2016 at 01:39:40PM -0400, Waiman Long wrote:
> +struct dlock_list_head_percpu {
> + struct list_head list;
> + spinlock_t lock;
> +};
> +#define DLOCK_LIST_HEAD_PERCPU_INIT(name) \
> + { \
> + .list.prev = &name.list, \
> + .list.next = &name.list, \
> + .list.lock = __SPIN_LOCK_UNLOCKED(name), \
What's .list.lock and how does that even compile?
> +extern bool dlock_list_next(struct dlock_list_head *dlist,
> + struct dlock_list_iter *iter);
Ugh... Why not dlist_for_each_entry(), seeing that all users end up with
the same boilerplate?
Powered by blists - more mailing lists