mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "muraliraja.muniraju" <muraliraja.muniraju@rubrik.com>
Cc: Chaitanya.Kulkarni@wdc.com, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Re [PATCH] Adding multiple workers to the loop device.
Date: Tue, 21 Jan 2020 20:01:44 -0800	[thread overview]
Message-ID: <19d3397e-f820-bae0-7e4f-93bafe7ce166@acm.org> (raw)
In-Reply-To: <20200121201014.52345-1-muraliraja.muniraju@rubrik.com>

On 2020-01-21 12:10, muraliraja.muniraju wrote:
> +	for (i = 0; i < lo->num_loop_workers; i++) {
> +		kthread_init_worker(&(lo->workers[i]));
> +		lo->worker_tasks[i] = kthread_run(
> +				loop_kthread_worker_fn, &(lo->workers[i]),
> +				"loop%d(%d)", lo->lo_number, i);
> +		if (IS_ERR((lo->worker_tasks[i])))
> +			goto err;
> +		set_user_nice(lo->worker_tasks[i], MIN_NICE);
> +	}

Unless if there is a really good reason, the workqueue mechanism should
be used instead of creating kthreads. And again unless if there is a
really good reason, one of the system workqueues (e.g. system_wq) should
be used instead of creating dedicated workqueues.

Bart.

  reply	other threads:[~2020-01-22  4:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DM6PR04MB5754D8E261B4200AA62D442D860D0@DM6PR04MB5754.namprd04.prod.outlook.com>
2020-01-21 20:01 ` muraliraja.muniraju
2020-01-21 20:03 ` muraliraja.muniraju
2020-01-21 20:10 ` Re " muraliraja.muniraju
2020-01-22  4:01   ` Bart Van Assche [this message]
2020-01-22 22:14     ` Muraliraja Muniraju
2020-01-23  1:40   ` Ming Lei
2020-01-23  3:33     ` Muraliraja Muniraju

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=19d3397e-f820-bae0-7e4f-93bafe7ce166@acm.org \
    --to=bvanassche@acm.org \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muraliraja.muniraju@rubrik.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

all inboxes | Powered by JetHome®