From: Nicholas Piggin <npiggin@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Johannes Weiner <hannes@cmpxchg.org>, Jan Kara <jack@suse.cz>,
Mel Gorman <mgorman@techsingularity.net>,
Peter Zijlstra <peterz@infradead.org>,
Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH 2/2] mm: add PageWaiters bit to indicate waitqueue should be checked
Date: Mon, 7 Nov 2016 14:04:29 +1100 [thread overview]
Message-ID: <20161107140429.15832544@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <CA+55aFxoT82RocOCZ9+k7_NZ+KZNtCQrwzNd=reB0n03xDj4-A@mail.gmail.com>
On Fri, 4 Nov 2016 08:59:15 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Fri, Nov 4, 2016 at 12:29 AM, Nicholas Piggin <npiggin@gmail.com> wrote:
> > Oh, okay, the zone lookup. Well I am of the impression that most of the
> > cache misses are coming from the waitqueue hash table itself.
>
> No.
>
> Nick, stop this idiocy.
>
> NUMBERS, Nick. NUMBERS.
>
> I posted numbers in "page_waitqueue() considered harmful" on linux-mm.
No I understand that, and am in the process of getting numbers. I wasn't
suggesting re-adding it based on "impression", I was musing over your idea
that the zone lookup hurts small systems. I'm trying to find why that is
and measure it! It's no good me finding a vast NUMA system to show some
improvement on if it ends up hurting 1-2 socket systems, is it?
But I can't see 3 cache misses there, and even the loads I can't see how
they match your post. We have:
page->flags
pglist_data->node_zones[x].wait_table
wait_table[x].task_list
Page flags is in cache. wait_table is a dependent load but I'd have
thought it would cache relatively well. About as well as bit_wait_table
pointer load, but even if you count that as a miss, it's 2 cache misses.
Also keep in mind this PG_waiters patch actually reintroduces the
load-after-store stall on x86 because the PG_waiters bit is tested after the
unlock. On my skylake it doesn't seem to matter about the operand size
mismatch because it isn't forwarding the atomic op to the load anyway (which
makes sense, because atomic ops cause a store queue drain). So if we have
this patch, there is no additional stall on the page_zone load there.
> And quite frankly, before _you_ start posting numbers, that zone crap
> IS NEVER COMING BACK.
>
> What's so hard about this concept? We don't add crazy complexity
> without numbers. Numbers that I bet you will not be able to provide,
> because quiet frankly, even in your handwavy "what about lots of
> concurrent IO from hundreds of threads" situation, that wait-queue
> will NOT BE NOTICEABLE.
That particular handwaving was *not* in the context of the zone waitqueues,
it was in context of PG_waiters bit slowpath with waitqueue hash collisions.
Different issue, and per-zone waitqueues don't do anything to solve it.
>
> So no "impressions". No "what abouts". No "threaded IO" excuses. The
> _only_ thing that matters is numbers. If you don't have them, don't
> bother talking about that zone patch.
I agree with you, and am trying to reproduce your numbers at the moment.
Thanks,
Nick
--
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>
next prev parent reply other threads:[~2016-11-07 3:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 7:03 [RFC][PATCH 0/2] optimise unlock_page / end_page_writeback Nicholas Piggin
2016-11-02 7:03 ` [PATCH 1/2] mm: Use owner_priv bit for PageSwapCache, valid when PageSwapBacked Nicholas Piggin
2016-11-04 2:20 ` Hugh Dickins
2016-11-11 0:58 ` Nicholas Piggin
2016-11-02 7:03 ` [PATCH 2/2] mm: add PageWaiters bit to indicate waitqueue should be checked Nicholas Piggin
2016-11-02 7:31 ` Kirill A. Shutemov
2016-11-02 7:50 ` Nicholas Piggin
2016-11-02 7:58 ` Kirill A. Shutemov
2016-11-02 8:12 ` Nicholas Piggin
2016-11-02 8:33 ` Kirill A. Shutemov
2016-11-02 8:40 ` Nicholas Piggin
2016-11-02 9:04 ` Kirill A. Shutemov
2016-11-02 15:18 ` Linus Torvalds
2016-11-03 3:46 ` Nicholas Piggin
2016-11-03 15:49 ` Linus Torvalds
2016-11-04 2:40 ` Nicholas Piggin
2016-11-04 7:29 ` Nicholas Piggin
2016-11-04 15:59 ` Linus Torvalds
2016-11-07 3:04 ` Nicholas Piggin [this message]
2016-11-04 2:31 ` [lkp] [mm] 731b9bc419: kernel BUG at include/linux/page-flags.h:259! kernel test robot
2016-11-04 2:47 ` Nicholas Piggin
2016-12-21 15:19 [PATCH 0/2] respin of PageWaiters patch Nicholas Piggin
2016-12-21 15:19 ` [PATCH 2/2] mm: add PageWaiters bit to indicate waitqueue should be checked Nicholas Piggin
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=20161107140429.15832544@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=torvalds@linux-foundation.org \
/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