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, 9 Nov 2011 18:33:08 +0100
From:	Andrea Arcangeli <aarcange@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Oleg Nesterov <oleg@...hat.com>,
	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
	"Rafael J. Wysocki" <rjw@...e.com>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, Jiri Slaby <jirislaby@...il.com>,
	linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] thp: reduce khugepaged freezing latency

On Wed, Nov 09, 2011 at 09:06:57AM -0800, Tejun Heo wrote:
> Ah, crap, still waking up.  Sorry about that.  So, yes, there's a race
> condition above.  You need to set TASK_INTERRUPTIBLE before testing
> freezing and use schedule_timeout() instead of

Yep that's the race I was thinking about. I see the wakeup in the
no-signal case avoids the race in wait_even_freezable_timeout so that
is ok but it'd race if I were just to add try_to_freeze before calling
schedule_timeout_interruptible.

> schedule_timeout_interruptible().  Was getting confused with
> prepare_to_wait().  That said, why not use prepare_to_wait() instead?

Because I don't need to wait on a waitqueue there. A THP failure
occurred, that caused some CPU overload and it's usually happening at
time of heavy VM stress, so I don't want to retry and cause more CPU
load from khugepaged until after some time even if more wakeups come
by. khugepaged is a very low cost background op, so it shouldn't cause
unnecessary CPU usage at times of VM pressure, waiting a better time
later is better.
--
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