lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAByjrT-08OQPtf0ejsaBni6VGkSNGHmFmT_yp1_4H0oi-TBsPQ@mail.gmail.com>
Date:   Wed, 22 Jan 2020 14:14:46 -0800
From:   Muraliraja Muniraju <muraliraja.muniraju@...rik.com>
To:     Bart Van Assche <bvanassche@....org>
Cc:     Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>,
        Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: Re [PATCH] Adding multiple workers to the loop device.

I see there was a submission that was done sometime ago to use
workqueues and was reverted
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e03a3d7a94e2485b6e2fa3fb630b9b3a30b65718
Hence used the approach of multiple workers this way. The current
change by default uses the default behaviour of 1 worker and one can
program the number of workers needed as a ioctl to scale as needed.

On Tue, Jan 21, 2020 at 8:01 PM Bart Van Assche <bvanassche@....org> wrote:
>
> 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ