From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 24/32] dlm: dlm workqueues aren't used in memory reclaim path
Date: Mon, 03 Jan 2011 13:58:27 +0000 [thread overview]
Message-ID: <1294063107.2429.34.camel@dolmen> (raw)
In-Reply-To: <1294062595-30097-25-git-send-email-tj@kernel.org>
Hi,
You already acked a patch to do this, which is in the DLM git tree,
waiting for the next merge window:
http://git.kernel.org/?p=linux/kernel/git/teigland/dlm.git;a=commitdiff;h=dcce240ead802d42b1e45ad2fcb2ed4a399cb255
Steve.
On Mon, 2011-01-03 at 14:49 +0100, Tejun Heo wrote:
> dlm isn't depended upon during memory reclaim and so are its two
> workqueues. Convert to alloc[_ordered]_workqueue() without
> WQ_MEM_RECLAIM. While at it, fix workqueue allocation failure
> handling. They return %NULL on failure not ERR_PTR() value.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Christine Caulfield <ccaulfie@redhat.com>
> Cc: David Teigland <teigland@redhat.com>
> Cc: cluster-devel at redhat.com
> ---
> Only compile tested. Please feel free to take it into the subsystem
> tree or simply ack - I'll route it through the wq tree.
>
> Thanks.
>
> fs/dlm/lowcomms.c | 19 ++++++++-----------
> 1 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
> index 37a34c2..9aad7c0 100644
> --- a/fs/dlm/lowcomms.c
> +++ b/fs/dlm/lowcomms.c
> @@ -1430,20 +1430,17 @@ static void work_stop(void)
>
> static int work_start(void)
> {
> - int error;
> - recv_workqueue = create_workqueue("dlm_recv");
> - error = IS_ERR(recv_workqueue);
> - if (error) {
> - log_print("can't start dlm_recv %d", error);
> - return error;
> + recv_workqueue = alloc_workqueue("dlm_recv", 0, 1);
> + if (!recv_workqueue) {
> + log_print("can't start dlm_recv");
> + return -ENOMEM;
> }
>
> - send_workqueue = create_singlethread_workqueue("dlm_send");
> - error = IS_ERR(send_workqueue);
> - if (error) {
> - log_print("can't start dlm_send %d", error);
> + send_workqueue = alloc_ordered_workqueue("dlm_send", 0);
> + if (!send_workqueue) {
> + log_print("can't start dlm_send");
> destroy_workqueue(recv_workqueue);
> - return error;
> + return -ENOMEM;
> }
>
> return 0;
next parent reply other threads:[~2011-01-03 13:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1294062595-30097-1-git-send-email-tj@kernel.org>
[not found] ` <1294062595-30097-25-git-send-email-tj@kernel.org>
2011-01-03 13:58 ` Steven Whitehouse [this message]
[not found] ` <20110103140107.GP18831@htj.dyndns.org>
2011-01-03 14:21 ` [Cluster-devel] [PATCH 24/32] dlm: dlm workqueues aren't used in memory reclaim path Steven Whitehouse
[not found] ` <20110103142734.GR18831@htj.dyndns.org>
2011-01-03 14:39 ` Steven Whitehouse
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=1294063107.2429.34.camel@dolmen \
--to=swhiteho@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).