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: <527169BB.8020104@gmail.com>
Date:	Wed, 30 Oct 2013 16:19:07 -0400
From:	KOSAKI Motohiro <kosaki.motohiro@...il.com>
To:	Mel Gorman <mgorman@...e.de>
CC:	kosaki.motohiro@...il.com, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, akpm@...ux-foundation.org,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
Subject: Re: [PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

> @@ -3926,11 +3929,11 @@ static void setup_zone_migrate_reserve(struct zone *zone)
>   	/*
>   	 * Reserve blocks are generally in place to help high-order atomic
>   	 * allocations that are short-lived. A min_free_kbytes value that
> -	 * would result in more than 2 reserve blocks for atomic allocations
> -	 * is assumed to be in place to help anti-fragmentation for the
> -	 * future allocation of hugepages at runtime.
> +	 * would result in more than MAX_MIGRATE_RESERVE_BLOCKS reserve blocks
> +	 * for atomic allocations is assumed to be in place to help
> +	 * anti-fragmentation for the future allocation of hugepages at runtime.
>   	 */
> -	reserve = min(2, reserve);
> +	reserve = min(MAX_MIGRATE_RESERVE_BLOCKS, reserve);
>
>   	for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) {
>   		if (!pfn_valid(pfn))
> @@ -3956,6 +3959,7 @@ static void setup_zone_migrate_reserve(struct zone *zone)
>   			/* If this block is reserved, account for it */
>   			if (block_migratetype == MIGRATE_RESERVE) {
>   				reserve--;
> +				found++;
>   				continue;
>   			}
>
> @@ -3970,6 +3974,10 @@ static void setup_zone_migrate_reserve(struct zone *zone)
>   			}
>   		}
>
> +		/* If all possible reserve blocks have been found, we're done */
> +		if (found >= MAX_MIGRATE_RESERVE_BLOCKS)
> +			break;
> +
>   		/*
>   		 * If the reserve is met and this is a previous reserved block,
>   		 * take it back

Nit. I would like to add following hunk. This is just nit because moving
reserve pageblock is extreme rare.

		if (block_migratetype == MIGRATE_RESERVE) {
+                       found++;
			set_pageblock_migratetype(page, MIGRATE_MOVABLE);
			move_freepages_block(zone, page, MIGRATE_MOVABLE);
		}



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