Re: [LSF/MM TOPIC] lru_lock scalability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux