Re: [PATCH 2/3] mm: cond_resched in scan_mapping_unevictable_pages

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

 



On Wed, 28 Dec 2011, Hugh Dickins wrote:
> On Thu, 29 Dec 2011, KOSAKI Motohiro wrote:
> > 
> > Hmm...
> > scan_mapping_unevictable_pages() is always under spinlock?
> 
> Yikes, how dreadful!  Dreadful that it's like that, and dreadful
> that I didn't notice.  Many thanks for spotting, consider this
> patch summarily withdrawn.  All the more need for some patch like
> this, but no doubt it was "easier" to do it all under the spinlock,
> so the right replacement patch may not be so obvious.

It's not so bad, I think: that info->lock isn't really needed across
scan_mapping_unevictable_pages(), which has to deal with races on a
page by page basis anyway.

But it's not the only spinlock, there is also ipc_lock() (often) held
in the level above: so I'll have to restructure it a little.  And now
that it's no longer a one-liner, I really ought to add a patch fixing
another bug I introduced here - if there were swapped pages when the
area was SHM_LOCKed, find_get_pages() will give up if it hits a row
of PAGEVEC_SIZE swap entries, leaving subsequent pages unevictable.

But I'd better empty my queue of trivia before going on to that.

Hugh

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]