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:	Mon, 07 Apr 2014 16:46:12 +0200
From:	Vlastimil Babka <vbabka@...e.cz>
To:	Heesub Shin <heesub.shin@...sung.com>,
	Andrew Morton <akpm@...ux-foundation.org>
CC:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Mel Gorman <mgorman@...e.de>,
	Dongjun Shin <d.j.shin@...sung.com>,
	Sunghwan Yun <sunghwan.yun@...sung.com>
Subject: Re: [PATCH 2/2] mm/compaction: fix to initialize free scanner properly

On 04/03/2014 10:57 AM, Heesub Shin wrote:
> Free scanner does not works well on systems having zones which do not
> span to pageblock-aligned boundary.
>
> zone->compact_cached_free_pfn is reset when the migration and free
> scanner across or compaction restarts. After the reset, if end_pfn of
> the zone was not aligned to pageblock_nr_pages, free scanner tries to
> isolate free pages from the middle of pageblock to the end, which can
> be very small range.

Hm good catch. I think that the same problem can happen (at least 
theoretically) through zone->compact_cached_free_pfn with 
CONFIG_HOLES_IN_ZONE enabled. Then compact_cached_free_pfn could be set
to a non-aligned-to-pageblock pfn and spoil scans. I'll send a patch 
that solves it on isolate_freepages() level, which allows further 
simplification of the function.

Vlastimil

> Signed-off-by: Heesub Shin <heesub.shin@...sung.com>
> Cc: Dongjun Shin <d.j.shin@...sung.com>
> Cc: Sunghwan Yun <sunghwan.yun@...sung.com>
> ---
>   mm/compaction.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 1ef9144..fefe1da 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -983,7 +983,7 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
>   	 */
>   	cc->migrate_pfn = zone->compact_cached_migrate_pfn;
>   	cc->free_pfn = zone->compact_cached_free_pfn;
> -	if (cc->free_pfn < start_pfn || cc->free_pfn > end_pfn) {
> +	if (cc->free_pfn < start_pfn || cc->free_pfn >= end_pfn) {
>   		cc->free_pfn = end_pfn & ~(pageblock_nr_pages-1);
>   		zone->compact_cached_free_pfn = cc->free_pfn;
>   	}
>

--
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