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]
Date:	Wed, 28 Sep 2011 10:48:24 +0300
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Bojan Smojver <bojan@...ursive.com>
Cc:	linux-kernel@...r.kernel.org, "Rafael J. Wysocki" <rjw@...k.pl>
Subject: Re: [PATCH v5]: Improve performance of LZO hibernation

On Wed, Sep 28, 2011 at 10:29 AM, Bojan Smojver <bojan@...ursive.com> wrote:
> On Wed, 2011-09-28 at 10:22 +0300, Pekka Enberg wrote:
>
>> > +       while(1) {
>> > +               wait_event(d->go, atomic_read(&d->ready) ||
>> > +                                 kthread_should_stop());
>> > +               if (kthread_should_stop())
>> > +                       break;
>>
>> So... what happens to the hibernation process when 'kthread_should_stop()'
>> returns true?
>
> The compression/decompression threads stop by breaking out of the loop.
> At least they should, right? Did I misread some docs here?

Yes, the threads are stopped. What happens after that? Will the
hibernation process be aborted? How can this be tested?

>> What's going on here anyway? Why "num_online_cpus() - 1"? What's wrong with
>>
>>   nr_threads = num_online_cpus();
>>   if (nr_threads > LZO_THREADS)
>>     nr_threads = LZO_THREADS;
>
> We want to keep at least one CPU free for that I/O and for pulling the
> other threads into sync when they are done (that is if we have more than
> one), right?

Well, dunno if it matters much. Did you see performance improvement
with that? Is the CPU binding really needed?

Anyway, if you want to keep the existing behavior, maybe something like

nr_other_cpus = min(1, num_online_cpus()-1);

nr_threads = min(nr_other_cpus, LZO_THREADS);

would do the trick?

                        Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ