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: <20181211100346.GE2342@uranus.lan>
Date:   Tue, 11 Dec 2018 13:03:46 +0300
From:   Cyrill Gorcunov <gorcunov@...il.com>
To:     Kirill Tkhai <ktkhai@...tuozzo.com>
Cc:     akpm@...ux-foundation.org, mhocko@...e.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, gorcunov@...tuozzo.com
Subject: Re: [PATCH] ksm: React on changing "sleep_millisecs" parameter faster

On Tue, Dec 11, 2018 at 12:23:11PM +0300, Kirill Tkhai wrote:
...
> > Kirill, can we rather reuse @ksm_thread variable from ksm_init
> > (by moving it to static file level variable).
> 
> I've considered using it, but this is not looks good for me.
> The problem is ksm thread may be parked, or it even may fail
> to start. But at the same time, parallel writes to "sleep_millisecs"
> are possible. There is a place for races, so to use the local
> variable in ksm_init() (like we have at the moment) looks better
> for me. At the patch the mutex protects against any races.
> 
> > Also wakening up
> > unconditionally on write looks somehow suspicious to me
> > though I don't have a precise argument against.
> 
> The conditional wait requires one more wait_queue. This is
> the thing I tried to avoid. But. I also had doubts about
> this, so you are already the second person, who worries :)
> It looks like we really need to change this.
> 
> How are you about something like the below?

I see. The code below looks a way better for me, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ