From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <andi@firstfloor.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC 4/9] Atomic reclaim: Save irq flags in vmscan.c
Date: Tue, 14 Aug 2007 22:05:51 +0200 [thread overview]
Message-ID: <1187121951.5337.4.camel@lappy> (raw)
In-Reply-To: <Pine.LNX.4.64.0708141209270.29498@schroedinger.engr.sgi.com>
On Tue, 2007-08-14 at 12:12 -0700, Christoph Lameter wrote:
> On Tue, 14 Aug 2007, Andi Kleen wrote:
>
> > Christoph Lameter <clameter@sgi.com> writes:
> >
> > > Reclaim can be called with interrupts disabled in atomic reclaim.
> > > vmscan.c is currently using spinlock_irq(). Switch to spin_lock_irqsave().
> >
> > I like the idea in principle. If this fully works out we could
> > potentially keep less memory free by default which would be a good
> > thing in general: free memory is bad memory.
>
> Right.
>
> > But would be interesting to measure what the lock
> > changes do to interrupt latency. Probably nothing good.
>
> Yup.
>
> > A more benign alternative might be to just set a per CPU flag during
> > these critical sections and then only do atomic reclaim on a local
> > interrupt when the flag is not set. That would make it a little less
> > reliable, but much less intrusive and with some luck still give many
> > of the benefits.
>
> There are other lock interactions that may cause problems. If we do not
> switch to the saving of irq flags then all involved spinlocks must become
> trylocks because the interrupt could have happened while the spinlock is
> held. So interrupts must be disabled on locks acquired during an
> interrupt.
A much simpler approach to this seems to use threaded interrupts like
-rt does.
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <andi@firstfloor.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC 4/9] Atomic reclaim: Save irq flags in vmscan.c
Date: Tue, 14 Aug 2007 22:05:51 +0200 [thread overview]
Message-ID: <1187121951.5337.4.camel@lappy> (raw)
In-Reply-To: <Pine.LNX.4.64.0708141209270.29498@schroedinger.engr.sgi.com>
On Tue, 2007-08-14 at 12:12 -0700, Christoph Lameter wrote:
> On Tue, 14 Aug 2007, Andi Kleen wrote:
>
> > Christoph Lameter <clameter@sgi.com> writes:
> >
> > > Reclaim can be called with interrupts disabled in atomic reclaim.
> > > vmscan.c is currently using spinlock_irq(). Switch to spin_lock_irqsave().
> >
> > I like the idea in principle. If this fully works out we could
> > potentially keep less memory free by default which would be a good
> > thing in general: free memory is bad memory.
>
> Right.
>
> > But would be interesting to measure what the lock
> > changes do to interrupt latency. Probably nothing good.
>
> Yup.
>
> > A more benign alternative might be to just set a per CPU flag during
> > these critical sections and then only do atomic reclaim on a local
> > interrupt when the flag is not set. That would make it a little less
> > reliable, but much less intrusive and with some luck still give many
> > of the benefits.
>
> There are other lock interactions that may cause problems. If we do not
> switch to the saving of irq flags then all involved spinlocks must become
> trylocks because the interrupt could have happened while the spinlock is
> held. So interrupts must be disabled on locks acquired during an
> interrupt.
A much simpler approach to this seems to use threaded interrupts like
-rt does.
--
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:[~2007-08-14 20:06 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-14 15:30 [RFC 0/9] Reclaim during GFP_ATOMIC allocs Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-14 15:30 ` [RFC 1/9] Allow reclaim via __GFP_NOMEMALLOC reclaim Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-14 15:30 ` [RFC 2/9] Use NOMEMALLOC reclaim to allow reclaim if PF_MEMALLOC is set Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-18 7:10 ` Pavel Machek
2007-08-18 7:10 ` Pavel Machek
2007-08-20 19:00 ` Christoph Lameter
2007-08-20 19:00 ` Christoph Lameter
2007-08-20 20:17 ` Peter Zijlstra
2007-08-20 20:17 ` Peter Zijlstra
2007-08-20 20:27 ` Christoph Lameter
2007-08-20 20:27 ` Christoph Lameter
2007-08-20 21:14 ` Peter Zijlstra
2007-08-20 21:14 ` Peter Zijlstra
2007-08-20 21:17 ` Christoph Lameter
2007-08-20 21:17 ` Christoph Lameter
2007-08-21 14:07 ` Peter Zijlstra
2007-08-21 0:39 ` Nick Piggin
2007-08-21 0:39 ` Nick Piggin
2007-08-21 14:07 ` Peter Zijlstra
2007-08-23 3:38 ` Nick Piggin
2007-08-23 3:38 ` Nick Piggin
2007-08-23 9:26 ` Peter Zijlstra
2007-08-23 10:11 ` Nikita Danilov
2007-08-23 10:11 ` Nikita Danilov
2007-08-23 13:58 ` Peter Zijlstra
2007-08-24 4:00 ` Nick Piggin
2007-08-24 4:00 ` Nick Piggin
2007-08-14 15:30 ` [RFC 3/9] Make cond_rescheds conditional on __GFP_WAIT Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-14 15:30 ` [RFC 4/9] Atomic reclaim: Save irq flags in vmscan.c Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-14 20:02 ` Andi Kleen
2007-08-14 20:02 ` Andi Kleen
2007-08-14 19:12 ` Christoph Lameter
2007-08-14 19:12 ` Christoph Lameter
2007-08-14 20:05 ` Peter Zijlstra [this message]
2007-08-14 20:05 ` Peter Zijlstra
2007-08-14 20:34 ` Andi Kleen
2007-08-14 20:34 ` Andi Kleen
2007-08-14 20:33 ` Andi Kleen
2007-08-14 20:33 ` Andi Kleen
2007-08-14 20:42 ` Christoph Lameter
2007-08-14 20:42 ` Christoph Lameter
2007-08-14 20:44 ` Andi Kleen
2007-08-14 20:44 ` Andi Kleen
2007-08-14 21:15 ` Christoph Lameter
2007-08-14 21:15 ` Christoph Lameter
2007-08-14 21:23 ` Andi Kleen
2007-08-14 21:23 ` Andi Kleen
2007-08-14 21:26 ` Christoph Lameter
2007-08-14 21:26 ` Christoph Lameter
2007-08-14 21:29 ` Andi Kleen
2007-08-14 21:29 ` Andi Kleen
2007-08-14 21:37 ` Christoph Lameter
2007-08-14 21:37 ` Christoph Lameter
2007-08-14 21:44 ` Andi Kleen
2007-08-14 21:44 ` Andi Kleen
2007-08-14 21:48 ` Christoph Lameter
2007-08-14 21:48 ` Christoph Lameter
2007-08-14 21:56 ` Andi Kleen
2007-08-14 21:56 ` Andi Kleen
2007-08-14 22:07 ` Christoph Lameter
2007-08-14 22:07 ` Christoph Lameter
2007-08-14 22:16 ` Andi Kleen
2007-08-14 22:16 ` Andi Kleen
2007-08-14 22:20 ` Christoph Lameter
2007-08-14 22:20 ` Christoph Lameter
2007-08-14 22:21 ` Andi Kleen
2007-08-14 22:21 ` Andi Kleen
2007-08-14 22:41 ` Christoph Lameter
2007-08-14 22:41 ` Christoph Lameter
2007-08-14 15:30 ` [RFC 5/9] Save irqflags on taking the mapping lock Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-14 15:30 ` [RFC 6/9] Disable irqs on taking the private_lock Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-14 15:30 ` [RFC 7/9] Save flags in swap.c Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-14 15:30 ` [RFC 8/9] Reclaim on an atomic allocation if necessary Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-14 15:30 ` [RFC 9/9] Testing: Perform GFP_ATOMIC overallocation Christoph Lameter
2007-08-14 15:30 ` Christoph Lameter
2007-08-16 2:49 ` [RFC 0/9] Reclaim during GFP_ATOMIC allocs Nick Piggin
2007-08-16 2:49 ` Nick Piggin
2007-08-16 20:24 ` Christoph Lameter
2007-08-16 20:24 ` Christoph Lameter
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=1187121951.5337.4.camel@lappy \
--to=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.