From: Nick Piggin <npiggin@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Nick Piggin <npiggin@suse.de>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch 2/3] mm: speculative get_page
Date: Tue, 4 Apr 2006 12:21:02 +0200 [thread overview]
Message-ID: <20060404102101.GA21329@wotan.suse.de> (raw)
In-Reply-To: <20060404024715.6555d8e2.akpm@osdl.org>
On Tue, Apr 04, 2006 at 02:47:15AM -0700, Andrew Morton wrote:
> Nick Piggin <npiggin@suse.de> wrote:
> >
> > +static inline struct page *page_cache_get_speculative(struct page **pagep)
>
> Seems rather large to inline.
>
Possibly... with all the debugging turned off, it is only atomic_inc
on UP, and atomic_inc_not_zero + several branches and barriers on SMP.
With only two callsites, I figure it is probably OK to be inline. It
probably looks bigger than it is...
> > +{
> > + struct page *page;
> > +
> > + VM_BUG_ON(in_interrupt());
> > +
> > +#ifndef CONFIG_SMP
> > + page = *pagep;
> > + if (unlikely(!page))
> > + return NULL;
> > +
> > + VM_BUG_ON(!in_atomic());
>
> This will go blam if !CONFIG_PREEMPT.
Hmm yes. Is there a safe way to do that? I guess it is pretty trivally
safely under rcu_read_lock , so that can probably just be removed.
--
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:[~2006-04-04 10:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-04 9:31 [patch 0/3] lockless pagecache Nick Piggin
2006-04-04 9:31 ` [patch 1/3] radix tree: RCU lockless read-side Nick Piggin
2006-04-04 9:32 ` [patch 2/3] mm: speculative get_page Nick Piggin
2006-04-04 9:47 ` Andrew Morton
2006-04-04 10:21 ` Nick Piggin [this message]
2006-04-04 15:20 ` Christoph Lameter
2006-04-05 0:22 ` Nick Piggin
2006-04-04 15:21 ` Christoph Lameter
2006-04-05 0:27 ` Nick Piggin
2006-04-04 9:32 ` [patch 3/3] mm: lockless pagecache lookups Nick Piggin
-- strict thread matches above, loose matches on Subject: below --
2006-03-10 15:18 A lockless pagecache for Linux Nick Piggin
2006-03-10 15:18 ` [patch 2/3] mm: speculative get_page 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=20060404102101.GA21329@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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