public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alex Volkov" <avcp-lkmail@usa.net>
To: "'Andrew Morton'" <akpm@linux-foundation.org>,
	"'Jeff Garzik'" <jeff@garzik.org>
Cc: "'Linux Kernel Mailing List'" <linux-kernel@vger.kernel.org>
Subject: RE: aio is unlikely
Date: Fri, 18 May 2007 16:49:49 -0400	[thread overview]
Message-ID: <058f01c7998e$1406e370$650df7cd@MUMBA> (raw)
In-Reply-To: <20070509151831.f5956b66.akpm@linux-foundation.org>


Andrew Morton wrote:
>     aio is unlikely
>     Stick an unlikely() around is_aio(): I assert that most IO is
synchronous.
>
> -#define in_aio() !is_sync_wait(current->io_wait)
> +#define in_aio() (unlikely(!is_sync_wait(current->io_wait)))

> Jeff Garzik <jeff@garzik.org> wrote:
> 
> > > -#define in_aio() !is_sync_wait(current->io_wait)
> > > +#define in_aio() (unlikely(!is_sync_wait(current->io_wait)))
> > 
> > Please revert.  Workload-dependent "likelihood" should not cause 
> > programmers to add such markers.
> a) disagree with the above
> 
> b) if in_aio() ever returns true we do
> 
> 	printk(KERN_ERR "%s(%s:%d) called in async context!\n",
> 		__FUNCTION__, __FILE__, __LINE__);
> 
>    so I sure hope it's unlikely for all workloads. 

Shouldn't unlikely() go where in_aio() is actually used, if we printk(error)
there?
Isn't putting likely/unlikely into a boolean function-like macro itself
asking for later trouble?

--Alex.



  parent reply	other threads:[~2007-05-18 20:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200705092101.l49L1CF1023363@hera.kernel.org>
2007-05-09 22:06 ` aio is unlikely Jeff Garzik
2007-05-09 22:18   ` Andrew Morton
2007-05-09 22:37     ` Jeff Garzik
2007-05-18 20:49     ` Alex Volkov [this message]
2007-05-18 21:06       ` Andrew Morton
2007-05-18 21:11         ` Jeff Garzik
2007-05-18 21:54         ` Phillip Susi
2007-05-18 22:12           ` Andrew Morton
2007-05-18 22:37             ` Jeff Garzik
2007-05-19  3:43               ` Nick Piggin
2007-05-19  3:50                 ` Jeff Garzik
2007-05-18 21:30       ` Bernd Eckenfels

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='058f01c7998e$1406e370$650df7cd@MUMBA' \
    --to=avcp-lkmail@usa.net \
    --cc=akpm@linux-foundation.org \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.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