Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] slow_work_execute() needs mb() before test_bit(SLOW_WORK_PENDING) | Date | Thu, 16 Apr 2009 10:43:42 +0100 |
| |
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.
David
| |