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: <20111110142202.GE3083@suse.de>
Date:	Thu, 10 Nov 2011 14:22:03 +0000
From:	Mel Gorman <mgorman@...e.de>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Jan Kara <jack@...e.cz>, Andy Isaacson <adi@...apodia.org>,
	Johannes Weiner <jweiner@...hat.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm: Do not stall in synchronous compaction for THP
 allocations

On Thu, Nov 10, 2011 at 10:06:16AM +0000, Mel Gorman wrote:
> than stall. It was suggested that __GFP_NORETRY be used instead of
> __GFP_NO_KSWAPD. This would look less like a special case but would
> still cause compaction to run at least once with sync compaction.
> 

This comment is bogus - __GFP_NORETRY would have caught THP allocations
and would not call sync compaction. The issue was that it would also
have caught any hypothetical high-order GFP_THISNODE allocations that
end up calling compaction here

                /*
                 * High-order allocations do not necessarily loop after
                 * direct reclaim and reclaim/compaction depends on
                 * compaction being called after reclaim so call directly if
                 * necessary
                 */
                page = __alloc_pages_direct_compact(gfp_mask, order,
                                        zonelist, high_zoneidx,
                                        nodemask,
                                        alloc_flags, preferred_zone,
                                        migratetype, &did_some_progress,
                                        sync_migration);

__GFP_NORETRY is used in a bunch of places and while the most
of them are not high-order, some of them potentially are like in
sound/core/memalloc.c. Using __GFP_NO_KSWAPD as the flag allows
these callers to continue using sync compaction.  It could be argued
that they would prefer __GFP_NORETRY but the potential side-effects
should be taken should be taken into account and the comment updated
if that happens.

-- 
Mel Gorman
SUSE Labs
--
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