Re: [PATCH v10 43/62] memfd: Convert shmem_tag_pins to XArray

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

 



On Fri, Mar 30, 2018 at 05:05:05PM -0700, Mike Kravetz wrote:
> On 03/29/2018 08:42 PM, Matthew Wilcox wrote:
> > From: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
> > 
> > Simplify the locking by taking the spinlock while we walk the tree on
> > the assumption that many acquires and releases of the lock will be
> > worse than holding the lock for a (potentially) long time.
> 
> I see this change made in several of the patches and do not have a
> specific issue with it.  As part of the XArray implementation you
> have XA_CHECK_SCHED = 4096.   So, we drop locks and do a cond_resched
> after XA_CHECK_SCHED iterations.  Just curious how you came up with
> that number.  Apologies in advance if this was discussed in a previous
> round of reviews.

It comes from two places, the current implementations of
tag_pages_for_writeback() and find_swap_entry().  I have no idea if it's
the optimal number for anybody, but it's the only number that anyone
was using.  I'll have no problem if somebody suggests we tweak the number
in the future.

> I did not do a detailed review of the XArray implementation.  Only looked
> at the provided interfaces and their intended uses.  If the interfaces work
> as specified, the changes here are fine.
> 
> Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>

That is all I can ask for, and it's the most valuable thing.  Thanks,
Mike!




[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