Thread (42 messages) 42 messages, 9 authors, 2016-10-03

Re: page_waitqueue() considered harmful

From: Kirill A. Shutemov <hidden>
Date: 2016-09-27 12:11:32

On Tue, Sep 27, 2016 at 06:52:06PM +0900, Minchan Kim wrote:
On Tue, Sep 27, 2016 at 12:11:17PM +0300, Kirill A. Shutemov wrote:
quoted
On Tue, Sep 27, 2016 at 09:54:12AM +0100, Mel Gorman wrote:
quoted
On Tue, Sep 27, 2016 at 09:30:55AM +0200, Peter Zijlstra wrote:
quoted
quoted
Also, if those bitlock ops had a different bit that showed contention,
we could actually skip *all* of this, and just see that "oh, nobody is
waiting on this page anyway, so there's no point in looking up those
wait queues". We don't have that many "__wait_on_bit()" users, maybe
we could say that the bitlocks do have to haev *two* bits: one for the
lock bit itself, and one for "there is contention".
That would be fairly simple to implement, the difficulty would be
actually getting a page-flag to use for this. We're running pretty low
in available bits :/
Simple is relative unless I drastically overcomplicated things and it
wouldn't be the first time. 64-bit only side-steps the page flag issue
as long as we can live with that.
Looks like we don't ever lock slab pages. Unless I miss something.

We can try to use PG_locked + PG_slab to indicate contation.

I tried to boot kernel with CONFIG_SLUB + BUG_ON(PageSlab()) in
trylock/unlock_page() codepath. Works fine, but more inspection is
required.
SLUB used bit_spin_lock via slab_lock instead of trylock/unlock.
Ahh. Missed that.

-- 
 Kirill A. Shutemov

--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help