linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	kbuild test robot <lkp@intel.com>,
	Suren Baghdasaryan <surenb@google.com>,
	kbuild-all@01.org, Johannes Weiner <hannes@cmpxchg.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [linux-next:master 6618/6917] kernel/sched/psi.c:1230:13: sparse: error: incompatible types in comparison expression (different address spaces)
Date: Tue, 12 Feb 2019 08:31:18 -0800	[thread overview]
Message-ID: <20190212163118.GM4240@linux.ibm.com> (raw)
In-Reply-To: <20190212162518.GO12668@bombadil.infradead.org>

On Tue, Feb 12, 2019 at 08:25:18AM -0800, Matthew Wilcox wrote:
> On Tue, Feb 12, 2019 at 07:56:10AM -0800, Paul E. McKenney wrote:
> > On Mon, Feb 11, 2019 at 05:36:06PM -0800, Matthew Wilcox wrote:
> > > radix_tree_iter_resume is, happily, gone from my xarray-conv tree.
> > > __radix_tree_lookup, __radix_tree_replace, radix_tree_iter_replace and
> > > radix_tree_iter_init are still present, but hopefully not for too much
> > > longer.  For example, __radix_tree_replace() is (now) called only from
> > > idr_replace(), and there are only 12 remaining callers of idr_replace().
> > 
> > Will this reduce the number of uses of rcu_dereference_raw()?  Or do they
> > simply migrate into Xarray?
> 
> Unlike the radix tree (which let you do whatever awful locking scheme you
> wanted), the XArray requires that you use the spinlock embedded in the
> root of the data structure to protect against simultaneous modification.
> So all dereferences within the XArray code look like this:
> 
> (if either under lock, or rcu lock held):
>         return rcu_dereference_check(node->slots[offset],
>                                                 lockdep_is_held(&xa->xa_lock));
> 
> (if we know the lock is held):
>         return rcu_dereference_protected(node->slots[offset],
>                                                 lockdep_is_held(&xa->xa_lock));
> 
> The XArray API doesn't expose slot pointers to its clients.  It hides them
> inside the xa_state's pointer to the current xa_node.

Nice!!!

							Thanx, Paul


  reply	other threads:[~2019-02-12 16:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 18:29 [linux-next:master 6618/6917] kernel/sched/psi.c:1230:13: sparse: error: incompatible types in comparison expression (different address spaces) kbuild test robot
2019-02-08 23:14 ` Andrew Morton
2019-02-09  7:44   ` Paul E. McKenney
2019-02-12  1:00     ` Andrew Morton
2019-02-12 15:54       ` Paul E. McKenney
2019-02-12  1:36     ` Matthew Wilcox
2019-02-12 15:56       ` Paul E. McKenney
2019-02-12 16:25         ` Matthew Wilcox
2019-02-12 16:31           ` Paul E. McKenney [this message]
2019-02-12 16:31       ` Johannes Weiner
2019-02-12 16:35         ` Matthew Wilcox
2019-02-14  1:50           ` Suren Baghdasaryan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190212163118.GM4240@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=surenb@google.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).