All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: David Howells <dhowells@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Miller <davem@davemloft.net>,
	Serge Hallyn <serue@us.ibm.com>,
	Steve Dickson <steved@redhat.com>,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Daire Byrne <Daire.Byrne@framestore.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] slow_work_execute() needs mb() before test_bit(SLOW_WORK_PENDING)
Date: Thu, 16 Apr 2009 16:15:10 +0200	[thread overview]
Message-ID: <20090416141510.GC6532@redhat.com> (raw)
In-Reply-To: <14774.1239875022@redhat.com>

On 04/16, David Howells wrote:
>
> Oleg Nesterov <oleg@redhat.com> wrote:
>
> > But why do we need the barrier before clear_bit(SLOW_WORK_EXECUTING) ?
> > We do have one after test_and_clear_bit(SLOW_WORK_PENDING) above, and it
> > should be enough, no?
>
> No.  There lock is covering work->ops->execute(work) too, and that is after
> the clearance of SLOW_WORK_PENDING.  The UNLOCK-class barrier must go between
> execution and clearance of the execution lock bit.

Ah. Now I see.

It is still not clear to me whether we need a barrier after clear_bit_unlock.

Thanks David!

Oleg.


      reply	other threads:[~2009-04-16 14:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-13 20:13 [PATCH] slow_work_execute() needs mb() before test_bit(SLOW_WORK_PENDING) Oleg Nesterov
2009-04-13 20:13 ` Oleg Nesterov
2009-04-13 21:47   ` David Howells
2009-04-13 22:02     ` Oleg Nesterov
2009-04-16  9:43       ` David Howells
2009-04-16 14:15         ` Oleg Nesterov [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=20090416141510.GC6532@redhat.com \
    --to=oleg@redhat.com \
    --cc=Daire.Byrne@framestore.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serue@us.ibm.com \
    --cc=steved@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.