mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Dave Jones <davej@redhat.com>,
	David Howells <dhowells@redhat.com>,
	Imre Deak <imre.deak@intel.com>, Jens Axboe <axboe@kernel.dk>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Lukas Czerner <lczerner@redhat.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Tejun Heo <tj@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] wait: introduce wait_event_common(wq, condition, state, timeout)
Date: Tue, 18 Jun 2013 15:06:56 -0700	[thread overview]
Message-ID: <20130618150656.3266771d49f68f86fdb5e3f3@linux-foundation.org> (raw)
In-Reply-To: <20130606200316.GB23628@redhat.com>

On Thu, 6 Jun 2013 22:03:16 +0200 Oleg Nesterov <oleg@redhat.com> wrote:

> 1. wait_event_timeout(wq, true, 0) returns zero, I think this is
>    wrong and should be fixed.
> 
>    __wait_event_timeout() was already changed by 4c663cfc but we
>    need the same logic in wait_event_timeout() if the fast-path
>    check succeeds.
> 
> 2. wait_event_timeout/__wait_event_timeout interface do not match
>    wait_event(), you can't use __wait_event_timeout() instead of
>    wait_event_timeout() if you do not need the fast-path check.
> 
> 3. wait_event_* macros duplicate the same code.
> 
> This patch adds a single helper wait_event_common() which hopefully
> does everything right. Compiler optimizes out the "dead" code when
> we do not need signal_pending/schedule_timeout.
> 
> With this patch "size vmlinux" reports that .text/data shrinks but
> I think this depends on gcc/config.

hm,

> -#define __wait_event_interruptible(wq, condition, ret)
> +#define __wait_event_interruptible(wq, condition)

net/irda/af_irda.c:2568:13: error: macro "__wait_event_interruptible" passed 3 arguments, but takes just 2

waddup with that?

__wait_event_interruptible() has several callsites.  I think I'll go
zap and await v2 ;)


  reply	other threads:[~2013-06-18 22:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 20:02 [PATCH 0/2] introduce wait_event_common() Oleg Nesterov
2013-06-06 20:03 ` [PATCH 1/2] wait: introduce wait_event_common(wq, condition, state, timeout) Oleg Nesterov
2013-06-18 22:06   ` Andrew Morton [this message]
2013-06-19 16:14     ` Oleg Nesterov
2013-06-06 20:03 ` [PATCH 2/2] wait: introduce prepare_to_wait_event() Oleg Nesterov
2013-06-06 21:36   ` Tejun Heo
2013-06-07 13:07     ` Oleg Nesterov

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=20130618150656.3266771d49f68f86fdb5e3f3@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=davej@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=imre.deak@intel.com \
    --cc=lczerner@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.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

Powered by JetHome