From: NeilBrown <neilb@suse.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, NFS <linux-nfs@vger.kernel.org>,
Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH/RFC] SCHED: allow wait_on_bit functions to support a timeout.
Date: Wed, 30 Apr 2014 17:52:09 +1000 [thread overview]
Message-ID: <20140430175209.166a42d9@notabene.brown> (raw)
In-Reply-To: <20140430073154.GW11096@twins.programming.kicks-ass.net>
[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]
On Wed, 30 Apr 2014 09:31:54 +0200 Peter Zijlstra <peterz@infradead.org>
wrote:
> On Wed, Apr 30, 2014 at 12:29:26PM +1000, NeilBrown wrote:
> > If you think it is a good cleanup I'll post a proper patch with all the right
> > Cc:s.
>
> Yeah, its a good cleanup. Thanks!
>
> > +static inline int
> > +wait_on_bit(void *word, int bit, unsigned mode)
> > +{
> > + if (!test_bit(bit, word))
> > + return 0;
> > + return out_of_line_wait_on_bit(word, bit,
> > + bit_wait,
> > + mode & 65535);
> > +}
> > +
> > +static inline int
> > +wait_on_bit_io(void *word, int bit, unsigned mode)
> > +{
> > + if (!test_bit(bit, word))
> > + return 0;
> > + return out_of_line_wait_on_bit(word, bit,
> > + bit_wait_io,
> > + mode & 65535);
> > +}
>
> That actually fits on one <80 line. Also, where does the 16 bit mask
> come from? On which, I would write that in hex, 0xFFFF is slightly
> easier to recognise as (1<<16)-1.
That is a hangover from an earlier attempt which didn't work. Thanks for
catching it.
I'll refresh and do some basic testing tomorrow and send it out, including to
Oleg.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2014-04-30 7:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 9:44 [PATCH/RFC] SCHED: allow wait_on_bit functions to support a timeout NeilBrown
2014-04-29 10:32 ` Peter Zijlstra
2014-04-29 13:00 ` NeilBrown
2014-04-30 2:29 ` NeilBrown
2014-04-30 7:31 ` Peter Zijlstra
2014-04-30 7:38 ` Peter Zijlstra
2014-04-30 7:52 ` NeilBrown [this message]
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=20140430175209.166a42d9@notabene.brown \
--to=neilb@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).