Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754466AbZIHLb1 (ORCPT ); Tue, 8 Sep 2009 07:31:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754311AbZIHLb1 (ORCPT ); Tue, 8 Sep 2009 07:31:27 -0400 Received: from mk-filter-1-a-1.mail.uk.tiscali.com ([212.74.100.52]:62433 "EHLO mk-filter-1-a-1.mail.uk.tiscali.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752979AbZIHLb0 (ORCPT ); Tue, 8 Sep 2009 07:31:26 -0400 X-Trace: 259417358/mk-filter-1.mail.uk.tiscali.com/B2C/$b2c-THROTTLED-DYNAMIC/b2c-CUSTOMER-DYNAMIC-IP/80.41.8.207/None/hugh.dickins@tiscali.co.uk X-SBRS: None X-RemoteIP: 80.41.8.207 X-IP-MAIL-FROM: hugh.dickins@tiscali.co.uk X-SMTP-AUTH: X-MUA: X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEANrcpUpQKQjP/2dsb2JhbACBU9hNhBgF X-IronPort-AV: E=Sophos;i="4.44,352,1249254000"; d="scan'208";a="259417358" Date: Tue, 8 Sep 2009 12:30:39 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@sister.anvils To: KAMEZAWA Hiroyuki cc: Andrew Morton , Hiroaki Wakabayashi , Lee Schermerhorn , KOSAKI Motohiro , Linus Torvalds , Nick Piggin , Rik van Riel , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/8] mm: munlock use follow_page In-Reply-To: <20090908115825.edb06814.kamezawa.hiroyu@jp.fujitsu.com> Message-ID: References: <20090908115825.edb06814.kamezawa.hiroyu@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1147 Lines: 33 On Tue, 8 Sep 2009, KAMEZAWA Hiroyuki wrote: > On Mon, 7 Sep 2009 22:29:55 +0100 (BST) > Hugh Dickins wrote: > > void munlock_vma_pages_range(struct vm_area_struct *vma, > > - unsigned long start, unsigned long end) > > + unsigned long start, unsigned long end) > > { > > + unsigned long addr; > > + > > + lru_add_drain(); > > vma->vm_flags &= ~VM_LOCKED; > > - __mlock_vma_pages_range(vma, start, end, 0); > > + > > + for (addr = start; addr < end; addr += PAGE_SIZE) { > > + struct page *page = follow_page(vma, addr, FOLL_GET); > > + if (page) { > > + lock_page(page); > > + if (page->mapping) > > + munlock_vma_page(page); > > Could you add "please see __mlock_vma_pages_range() to see why" or some here ? Why the test on page->mapping? Right, I'll add some such comment on that. Waiting a day or two to see what else comes up. Thanks, Hugh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/