From: Andrea Arcangeli <andrea@qumranet.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
linux-arch@vger.kernel.org, steiner@sgi.com,
cl@linux-foundation.org
Subject: Re: MMU notifiers review and some proposals
Date: Sat, 26 Jul 2008 15:02:02 +0200 [thread overview]
Message-ID: <20080726130202.GA9598@duo.random> (raw)
In-Reply-To: <20080726122826.GA17958@wotan.suse.de>
On Sat, Jul 26, 2008 at 02:28:26PM +0200, Nick Piggin wrote:
> 3) livelock/starvation problem with TLB holdoff
>
> That's not shooting yourself in the foot if you are forced into the
> design. Definitely there can be indefinite starvation because there
> is no notion of queueing on the range_active count.
I don't see how, it's all per-mm, all other -mm can't possibly be hold
off. What can happen is that once cpu loops because the other cpu is
mprotecting in a flood forever. Both have to be threads belonging to
the same -mm for this holdoff to be meaningful. It's the same app,
with multiple threads. The rest of the system can't even notice
whatever happens in that -mm and they all reschedule all the time, so
it can't starve other tasks. It's not a _global_ hold off! It's a
per-mm holdoff. The counter is in the kvm struct and the kvm struct is
bind to a single mm. Each different kvm struct has a different
counter. all it can happen that an app is shooting itself in the foot,
it's actually easier to run "for (;;)" if it wants to shoot itself in
the foot... so no big deal.
I really can't see any issue with your point 3, and infact this looks a
nice locking design to me.
> I'm doing range flushing withing tlb-gathers in the patch I posted which
> does not add a branch for every pte teardown. And I don't really
> consider range_start/end as better, given my reasons.
As you said you missed tlb_remove_page, that is the _only_ troublesome
one! A bit too easy to skip that one and then claim your patch as
simpler...
Just post a patch that works for real and see if you can avoid to
invalidate every pte, or if you've to hack inside
asm-generic/tlb.h... I can't see how you can avoid to mangle on the
asm-generic/tlb.h if you don't want to send IPIs at every single pte
zapped with your patch...
> If I had seen even a single number to show the more complex scheme
Please post a patch that actually works then we'll re-evaluate what is
the best tradeoff ;).
In the meantime please merge -mm patches into Linus's tree, this is
taking forever and if the changes are so small to go Nick's way and
his future "actually working" patch remains so small, it can be
applied incrementally without any problem IMHO, infact it is presented
as an incremental patch in the first place.
--
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:[~2008-07-26 13:02 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 14:39 Nick Piggin
2008-07-25 21:45 ` Andrea Arcangeli
2008-07-26 3:08 ` Nick Piggin
2008-07-26 11:38 ` Andrea Arcangeli
2008-07-26 12:28 ` Nick Piggin
2008-07-26 13:02 ` Andrea Arcangeli [this message]
2008-07-26 13:10 ` Nick Piggin
2008-07-26 13:35 ` Andrea Arcangeli
2008-07-27 12:25 ` Nick Piggin
2008-07-26 13:14 ` Nick Piggin
2008-07-26 13:49 ` Andrea Arcangeli
2008-07-27 12:32 ` Nick Piggin
2008-07-30 14:19 ` Christoph Lameter
2008-07-30 14:54 ` Andrea Arcangeli
2008-07-30 15:42 ` Christoph Lameter
2008-07-31 6:14 ` Nick Piggin
2008-07-31 14:19 ` Christoph Lameter
2008-07-26 12:33 ` Nick Piggin
2008-07-26 13:04 ` Nick Piggin
2008-07-26 13:16 ` Andrea Arcangeli
2008-07-27 12:08 ` Nick Piggin
2008-07-25 23:29 ` Jack Steiner
2008-07-26 3:18 ` Nick Piggin
2008-07-27 9:45 ` Andrew Morton
2008-07-27 12:38 ` 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=20080726130202.GA9598@duo.random \
--to=andrea@qumranet.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=steiner@sgi.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