From: akpm@linux-foundation.org Subject: [merged] mm-page_alloc-protect-pcp-batch-accesses-with-access_once.patch removed from -mm tree Date: Mon, 08 Jul 2013 12:24:15 -0700 Message-ID: <51db11df.tFOSSPlukD3iYGfh%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50163 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753075Ab3GHTYQ (ORCPT ); Mon, 8 Jul 2013 15:24:16 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org, penberg@kernel.org, mgorman@suse.de, kosaki.motohiro@gmail.com, gilad@benyossef.com, cody@linux.vnet.ibm.com Subject: [merged] mm-page_alloc-protect-pcp-batch-accesses-with-access_once.patch removed from -mm tree To: cody@linux.vnet.ibm.com,gilad@benyossef.com,kosaki.motohiro@gmail.com,mgorman@suse.de,penberg@kernel.org,mm-commits@vger.kernel.org From: akpm@linux-foundation.org Date: Mon, 08 Jul 2013 12:24:15 -0700 The patch titled Subject: mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE has been removed from the -mm tree. Its filename was mm-page_alloc-protect-pcp-batch-accesses-with-access_once.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Cody P Schafer Subject: mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE pcp->batch could change at any point, avoid relying on it being a stable value. Signed-off-by: Cody P Schafer Cc: Gilad Ben-Yossef Cc: KOSAKI Motohiro Cc: Mel Gorman Cc: Pekka Enberg Signed-off-by: Andrew Morton --- mm/page_alloc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff -puN mm/page_alloc.c~mm-page_alloc-protect-pcp-batch-accesses-with-access_once mm/page_alloc.c --- a/mm/page_alloc.c~mm-page_alloc-protect-pcp-batch-accesses-with-access_once +++ a/mm/page_alloc.c @@ -1182,10 +1182,12 @@ void drain_zone_pages(struct zone *zone, { unsigned long flags; int to_drain; + unsigned long batch; local_irq_save(flags); - if (pcp->count >= pcp->batch) - to_drain = pcp->batch; + batch = ACCESS_ONCE(pcp->batch); + if (pcp->count >= batch) + to_drain = batch; else to_drain = pcp->count; if (to_drain > 0) { @@ -1353,8 +1355,9 @@ void free_hot_cold_page(struct page *pag list_add(&page->lru, &pcp->lists[migratetype]); pcp->count++; if (pcp->count >= pcp->high) { - free_pcppages_bulk(zone, pcp->batch, pcp); - pcp->count -= pcp->batch; + unsigned long batch = ACCESS_ONCE(pcp->batch); + free_pcppages_bulk(zone, batch, pcp); + pcp->count -= batch; } out: _ Patches currently in -mm which might be from cody@linux.vnet.ibm.com are origin.patch zbud-add-to-mm.patch zswap-add-to-mm.patch zswap-add-documentation.patch