Re: [PATCH] mm: compaction: Abort compaction if too many pages are isolated and caller is asynchronous

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 06, 2011 at 11:39:24AM +0100, Mel Gorman wrote:
> Well spotted.
> 
> Acked-by: Mel Gorman <mgorman@xxxxxxx>
> 
> Minor nit. swapper_space is rarely referred to outside of the swap
> code. Might it be more readable to use
> 
> 	/*
> 	 * swapcache is accounted as NR_FILE_PAGES but it is not
> 	 * accounted as NR_SHMEM
> 	 *
> 	if (PageSwapBacked(page) && !PageSwapCache(page))

I thought the comparison on swapper_space would be faster as it was
immediate vs register in CPU, instead of forcing a memory
access. Otherwise I would have used the above. Now the test_bit is
written in C and lockless so it's not likely to be very different
considering the cacheline is hot in the CPU but it's still referencing
memory instead register vs immediate comparison.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]