linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
	steven.sistare@oracle.com, pasha.tatashin@oracle.com,
	yossi.lev@oracle.com, Dave.Dice@oracle.com,
	akpm@linux-foundation.org, mhocko@kernel.org,
	ldufour@linux.vnet.ibm.com, dave@stgolabs.net,
	khandual@linux.vnet.ibm.com, ak@linux.intel.com, mgorman@suse.de,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [LSF/MM TOPIC] lru_lock scalability
Date: Thu, 8 Feb 2018 05:38:35 -0800	[thread overview]
Message-ID: <20180208133835.GB15846@bombadil.infradead.org> (raw)
In-Reply-To: <d33748d8-6bba-638d-46b6-5c074821d516@oracle.com>

On Thu, Feb 08, 2018 at 08:33:56AM -0500, Daniel Jordan wrote:
> On 02/06/2018 10:33 AM, Matthew Wilcox wrote:
> > static inline void xas_maybe_lock_irq(struct xa_state *xas, void *entry)
> > {
> > 	if (entry) {
> > 		rcu_read_lock();
> > 		xas_start(&xas);
> > 		if (!xas_bounds(&xas))
> > 			return;
> > 	}
> 
> Trying to understand what's going on here.
> 
> xas_bounds isn't in your latest two XArray branches (xarray-4.16 or
> xarray-2018-01-09).  Isn't it checking whether 'entry' falls inside the
> currently allocated range of the XArray?  So that it should tell us whether
> a new xa_node needs to be allocated for 'entry'?
> 
> If that's true, I guess it should take 'entry' as well as '&xas'.

Oh, sorry about that.  xas_bounds() doesn't exist yet ... it would simply be:

static inline bool xas_bounds(struct xa_state *xas)
{
	return xas.xa_node == XAS_BOUNDS;
}

xas_start() sets xas.xa_node to XAS_BOUNDS if xas.xa_index falls outside
the range representable by the current top of the tree.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2018-02-08 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01  4:44 Daniel Jordan
2018-02-01  9:44 ` Matthew Wilcox
2018-02-02  4:07   ` Daniel Jordan
2018-02-02 17:00     ` Matthew Wilcox
2018-02-06 15:33       ` Matthew Wilcox
2018-02-08 13:33         ` Daniel Jordan
2018-02-08 13:38           ` Matthew Wilcox [this message]
2018-02-02 11:02 ` Laurent Dufour

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=20180208133835.GB15846@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=Dave.Dice@oracle.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=daniel.m.jordan@oracle.com \
    --cc=dave@stgolabs.net \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=ldufour@linux.vnet.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=pasha.tatashin@oracle.com \
    --cc=peterz@infradead.org \
    --cc=steven.sistare@oracle.com \
    --cc=yossi.lev@oracle.com \
    /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