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: <20110725210148.GP18528@redhat.com>
Date:	Mon, 25 Jul 2011 23:01:48 +0200
From:	Andrea Arcangeli <aarcange@...hat.com>
To:	Johannes Weiner <jweiner@...hat.com>
Cc:	Mel Gorman <mgorman@...e.de>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [patch] mm: thp: disable defrag for page faults per default

Hello Johannes,

On Mon, Jul 25, 2011 at 10:38:41PM +0200, Johannes Weiner wrote:
> With defrag mode enabled per default, huge page allocations pass
> __GFP_WAIT and may drop compaction into sync-mode where they wait for
> pages under writeback.
> 
> I observe applications hang for several minutes(!) when they fault in
> huge pages and compaction starts to wait on in-"flight" USB stick IO.
> 
> This patch disables defrag mode for page fault allocations unless the
> VMA is madvised explicitely.  Khugepaged will continue to allocate
> with __GFP_WAIT per default, but stalls are not a problem of
> application responsiveness there.

Allocating memory without __GFP_WAIT means THP it's like disabled
except when there's plenty of memory free after boot, even trying with
__GFP_WAIT and without compaction would be better than that. We don't
want to modify all apps, just a few special ones should have the
madvise like qemu-kvm for example (for embedded in case there's
embedded virt).

If you want to make compaction and migrate run without ever dropping
into sync-mode (or aborting if we've to wait on too many pages) I
think it'd be a whole lot better.

If you could show the SYSRQ+T during the minute wait it'd be
interesting too.

There was also some compaction bug that would lead to minutes of stall
in congestion_wait, those are fixed in current kernels.
--
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