From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx153.postini.com [74.125.245.153]) by kanga.kvack.org (Postfix) with SMTP id B24736B0044 for ; Wed, 21 Aug 2013 05:31:14 -0400 (EDT) Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Aug 2013 14:53:31 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 5582D3940053 for ; Wed, 21 Aug 2013 15:00:59 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7L9V6FX47513760 for ; Wed, 21 Aug 2013 15:01:06 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7L9V63X016865 for ; Wed, 21 Aug 2013 15:01:08 +0530 From: "Aneesh Kumar K.V" Subject: Re: [PATCH v2 05/20] mm, hugetlb: grab a page_table_lock after page_cache_release In-Reply-To: <1376040398-11212-6-git-send-email-iamjoonsoo.kim@lge.com> References: <1376040398-11212-1-git-send-email-iamjoonsoo.kim@lge.com> <1376040398-11212-6-git-send-email-iamjoonsoo.kim@lge.com> Date: Wed, 21 Aug 2013 15:01:05 +0530 Message-ID: <87ppt7gzl2.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: Joonsoo Kim , Andrew Morton Cc: Rik van Riel , Mel Gorman , Michal Hocko , KAMEZAWA Hiroyuki , Hugh Dickins , Davidlohr Bueso , David Gibson , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joonsoo Kim , Wanpeng Li , Naoya Horiguchi , Hillf Danton Joonsoo Kim writes: > We don't need to grab a page_table_lock when we try to release a page. > So, defer to grab a page_table_lock. > > Reviewed-by: Naoya Horiguchi > Signed-off-by: Joonsoo Kim Reviewed-by: Aneesh Kumar K.V > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index c017c52..6c8eec2 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -2627,10 +2627,11 @@ retry_avoidcopy: > } > spin_unlock(&mm->page_table_lock); > mmu_notifier_invalidate_range_end(mm, mmun_start, mmun_end); > - /* Caller expects lock to be held */ > - spin_lock(&mm->page_table_lock); > page_cache_release(new_page); > page_cache_release(old_page); > + > + /* Caller expects lock to be held */ > + spin_lock(&mm->page_table_lock); > return 0; > } > > -- > 1.7.9.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org