From: Hugh Dickins <hugh@veritas.com>
To: Nikita Danilov <nikita@clusterfs.com>
Cc: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>
Subject: Re: 2.6.9-rc1: page_referenced_one() CPU consumption
Date: Fri, 10 Sep 2004 13:14:15 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.44.0409101304570.16614-100000@localhost.localdomain> (raw)
In-Reply-To: <16705.34633.433179.600565@gargle.gargle.HOWL>
On Fri, 10 Sep 2004, Nikita Danilov wrote:
>
> in 2.6.9-rc1 page_referenced_one() is among top CPU consumers (which
> wasn't a case for 2.6.8-rc2) in the host kernel when running heavily
> loaded UML. readprofile -b shows that time is spent in
> spin_lock(&mm->page_table_lock), so, I reckon, recent "rmaplock: kill
> page_map_lock" changes are probably not completely unrelated.
>
> Without any deep investigation, one possible scenario is that multiple
> threads are doing (as part of direct reclaim),
>
> refill_inactive_zone()
> page_referenced()
> page_referenced_file() /* (1) mapping->i_mmap_lock doesn't
> serialize them */
> page_referenced_one()
> spin_lock(&mm->page_table_lock) /* (2) everybody is
> serialized here */
>
> (1) and (2) will be true if we have one huge address space with a lot of
> VMAs, which seems to be exactly what UML does:
>
> $ wc /proc/<UML-host-pid>/maps
> 4134 28931 561916
>
> This didn't happen before, because page_referenced_one() used to
> try-lock.
I'd be very surprised if you're wrong.
I remarked on that in the ChangeLog comment: "Though I suppose
it's possible that we'll find that vmscan makes better progress with
trylocks than spinning - we're free to choose trylocks again if so."
I'm quite content to go back to a trylock in page_referenced_one - and
in try_to_unmap_one? But yours is the first report of an issue there,
so I'm inclined to wait for more reports (which should come flooding in
now you mention it!), and input from those with a better grasp than I
of how vmscan pans out in practice (Andrew, Nick, Con spring to mind).
Hugh
next prev parent reply other threads:[~2004-09-10 12:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-10 10:51 Nikita Danilov
2004-09-10 12:14 ` Hugh Dickins [this message]
2004-09-10 12:21 ` Hugh Dickins
2004-09-11 1:01 ` Nick Piggin
2004-09-12 15:53 ` Nikita Danilov
2004-09-13 4:53 ` Nick 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=Pine.LNX.4.44.0409101304570.16614-100000@localhost.localdomain \
--to=hugh@veritas.com \
--cc=Linux-Kernel@Vger.Kernel.ORG \
--cc=nikita@clusterfs.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
all inboxes | Powered by JetHome®