From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
David Howells <dhowells@redhat.com>,
Christoph Hellwig <hch@infradead.org>,
Gautham R Shenoy <ego@in.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] reimplement flush_workqueue()
Date: Tue, 9 Jan 2007 10:31:04 +0530 [thread overview]
Message-ID: <20070109050104.GA29119@in.ibm.com> (raw)
In-Reply-To: <20061229171827.GA158@tv-sign.ru>
On Fri, Dec 29, 2006 at 08:18:27PM +0300, Oleg Nesterov wrote:
> Remove ->remove_sequence, ->insert_sequence, and ->work_done from struct
> cpu_workqueue_struct. To implement flush_workqueue() we can queue a barrier
> work on each CPU and wait for its completition.
Oleg,
Because of this change, was curious to know if this is possible:
CPU0 CPU1
(Thread0)
flush_workqueue()
queue_work(W1)
flush_cpu_workqueue(cpu1)
insert_barrier(B1)
wait_on_completion();
run_workqueue()
W1.func();
flush_workqueue();
B1.func(); <- wakes Thread0
The intention of barrier B1 was to wait untill W1 was -complete-. If
W1.func()->....->something() were to call flush_workqueue on the same
workqueue, then we would be returning from the barrier prematurely.
Looks possible in theory. Don't know if it is a practical issue.
--
Regards,
vatsa
next prev parent reply other threads:[~2007-01-09 5:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-29 17:18 [PATCH 1/2] reimplement flush_workqueue() Oleg Nesterov
2007-01-09 5:01 ` Srivatsa Vaddagiri [this message]
2007-01-09 15:55 ` 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=20070109050104.GA29119@in.ibm.com \
--to=vatsa@in.ibm.com \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=ego@in.ibm.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
/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.