From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754819Ab1L2XHV (ORCPT ); Thu, 29 Dec 2011 18:07:21 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:41430 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754747Ab1L2XHS (ORCPT ); Thu, 29 Dec 2011 18:07:18 -0500 Date: Thu, 29 Dec 2011 15:07:17 -0800 From: Andrew Morton To: Hillf Danton Cc: linux-mm@kvack.org, David Rientjes , Hugh Dickins , KAMEZAWA Hiroyuki , Michal Hocko , LKML , Andrea Arcangeli Subject: Re: [PATCH] mm: vmscan: fix typo in isolating lru pages Message-Id: <20111229150717.6c8ba825.akpm@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Dec 2011 20:38:41 +0800 Hillf Danton wrote: > It is not the tag page but the cursor page that we should process, and it looks > a typo. > > Signed-off-by: Hillf Danton > Cc: Michal Hocko > Cc: KAMEZAWA Hiroyuki > Cc: Andrew Morton > Cc: David Rientjes > Cc: Hugh Dickins > --- > > --- a/mm/vmscan.c Thu Dec 29 20:20:16 2011 > +++ b/mm/vmscan.c Thu Dec 29 20:23:30 2011 > @@ -1231,13 +1231,13 @@ static unsigned long isolate_lru_pages(u > > mem_cgroup_lru_del(cursor_page); > list_move(&cursor_page->lru, dst); > - isolated_pages = hpage_nr_pages(page); > + isolated_pages = hpage_nr_pages(cursor_page); > nr_taken += isolated_pages; > nr_lumpy_taken += isolated_pages; > if (PageDirty(cursor_page)) > nr_lumpy_dirty += isolated_pages; > scan++; > - pfn += isolated_pages-1; > + pfn += isolated_pages - 1; > } else { > /* > * Check if the page is freed already. This problem looks pretty benign in mainline. But Andrea's "mm: vmscan: check if we isolated a compound page during lumpy scan" came along and uses isolated_pages rather a lot more, including using it to advance across the pfn array. I jiggled your patch to suit current mainline then reworked everything else so we end up with this result.