From: Con Kolivas <kernel@kolivas.org>
To: Nikita Danilov <nikita@clusterfs.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
ck list <ck@vds.kolivas.org>,
linux-mm@kvack.org, Nick Piggin <npiggin@suse.de>,
Paul Jackson <pj@sgi.com>
Subject: Re: [PATCH] mm: Implement Swap Prefetching v22
Date: Fri, 10 Feb 2006 11:08:46 +1100 [thread overview]
Message-ID: <200602101108.47614.kernel@kolivas.org> (raw)
In-Reply-To: <17387.33855.858274.530175@gargle.gargle.HOWL>
On Friday 10 February 2006 05:04, Nikita Danilov wrote:
> Nick Piggin writes:
>
> [...]
>
> > > +/*
> > > + * We check to see no part of the vm is busy. If it is this will
> > > interrupt + * trickle_swap and wait another PREFETCH_DELAY.
> > > Purposefully racy. + */
> > > +inline void delay_swap_prefetch(void)
> > > +{
> > > + __set_bit(0, &swapped.busy);
> > > +}
> > > +
> >
> > Test this first so you don't bounce the cacheline around in page
> > reclaim too much.
>
> Shouldn't we have special macros/inlines for this? Like, e.g.,
>
> static inline void __set_bit_weak(int nr, volatile unsigned long * addr)
> {
> if (!__test_bit(nr, addr))
> __set_bit(nr, addr);
> }
>
> ? These test-then-set sequences start to proliferate throughout the code.
Maybe.
There isn't actually a non-atomic __test_bit anyway, only a test_bit. The
non-atomic __test_and_set_bit already exists, but that sets the bit
regardless of what the bit was as far as I can tell.
Cheers,
Con
--
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-02-10 0:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-09 12:39 Con Kolivas
2006-02-09 13:29 ` Nick Piggin
2006-02-09 13:47 ` Con Kolivas
2006-02-09 14:10 ` Nick Piggin
2006-02-09 14:12 ` Con Kolivas
2006-02-09 14:21 ` Nick Piggin
2006-02-09 22:48 ` Con Kolivas
2006-02-09 14:51 ` Con Kolivas
2006-02-10 1:04 ` Con Kolivas
2006-02-09 18:04 ` Nikita Danilov
2006-02-10 0:08 ` Con Kolivas [this message]
2006-02-09 15:12 ` Paul Jackson
2006-02-09 15:33 ` Con Kolivas
2006-02-10 0:51 ` KAMEZAWA Hiroyuki
2006-02-10 0:56 ` Con Kolivas
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=200602101108.47614.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=akpm@osdl.org \
--cc=ck@vds.kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--cc=nikita@clusterfs.com \
--cc=npiggin@suse.de \
--cc=pj@sgi.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