linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Andreas Gruenbacher <agruenba@redhat.com>,
	Bob Peterson <rpeterso@redhat.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Lutomirski <luto@kernel.org>,
	Steven Whitehouse <swhiteho@redhat.com>
Subject: Re: [RFC][PATCH] make global bitlock waitqueues per-node
Date: Wed, 21 Dec 2016 10:12:36 -0800	[thread overview]
Message-ID: <CA+55aFx83JS4ZcZUmQLL+e1gzTQ-y_0n_xWtg=T8qtJ0_cA5GA@mail.gmail.com> (raw)
In-Reply-To: <20161221223056.17c37dd6@roar.ozlabs.ibm.com>

On Wed, Dec 21, 2016 at 4:30 AM, Nicholas Piggin <npiggin@gmail.com> wrote:
>
> I've been doing a bit of testing, and I don't know why you're seeing
> this.
>
> I don't think I've been able to trigger any actual page lock contention
> so nothing gets put on the waitqueue to really bounce cache lines around
> that I can see.

The "test is the waitqueue is empty" is going to cause cache misses
even if there is no contention.

In fact, that's why I want the contention bit in the struct page - not
because of any NUMA issues, but simply due to cache misses.

And yes, with no contention the bit waiting should hopefully be able
to cache things shared - which should make the bouncing much less -
but there's going to be a shitload of false sharing with any actual
IO, so you will get bouncing due to that.

And then regular bouncing due simply to capacity misses (rather than
the CPU's wanting exclusive access).

With the contention bit in place, the only people actually looking at
the wait queues are the ones doing IO. At which point false sharing is
going to go down dramatically, but even if it were to happen it goes
from a "big issue" to "who cares, the cachemiss is not noticeable
compared to the IO, even with a fast SSD".

                Linus

  reply	other threads:[~2016-12-21 18:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 22:58 [RFC][PATCH] make global bitlock waitqueues per-node Dave Hansen
     [not found] ` <CA+55aFwK6JdSy9v_BkNYWNdfK82sYA1h3qCSAJQ0T45cOxeXmQ@mail.gmail.com>
2016-12-20  0:20   ` Dave Hansen
2016-12-20  2:31     ` Nicholas Piggin
2016-12-20 12:58       ` Mel Gorman
2016-12-20 13:21         ` Nicholas Piggin
2016-12-20 17:31     ` Linus Torvalds
2016-12-20 18:02       ` Linus Torvalds
2016-12-21  8:09         ` Peter Zijlstra
2016-12-21  8:32           ` Peter Zijlstra
2016-12-21 18:02             ` Linus Torvalds
2016-12-21 18:33               ` Nicholas Piggin
2016-12-21 19:01                 ` Nicholas Piggin
2016-12-21 19:50                   ` Linus Torvalds
2016-12-22  2:07                     ` Nicholas Piggin
2016-12-22 19:28               ` Hugh Dickins
2016-12-21 10:26           ` Nicholas Piggin
2016-12-20  2:26 ` Nicholas Piggin
2016-12-21 12:30 ` Nicholas Piggin
2016-12-21 18:12   ` Linus Torvalds [this message]
2016-12-21 18:40     ` 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='CA+55aFx83JS4ZcZUmQLL+e1gzTQ-y_0n_xWtg=T8qtJ0_cA5GA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=agruenba@redhat.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=rpeterso@redhat.com \
    --cc=swhiteho@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).