[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2011 14:38:51 +0200
From: Andrea Arcangeli <aarcange@...hat.com>
To: Mel Gorman <mgorman@...e.de>
Cc: Minchan Kim <minchan.kim@...il.com>, akpm@...ux-foundation.org,
Ury Stankevich <urykhy@...il.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, stable@...nel.org
Subject: Re: [PATCH] mm: compaction: Abort compaction if too many pages are
isolated and caller is asynchronous
On Mon, Jun 06, 2011 at 11:39:24AM +0100, Mel Gorman wrote:
> Well spotted.
>
> Acked-by: Mel Gorman <mgorman@...e.de>
>
> 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 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