From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753106AbbC3PVV (ORCPT ); Mon, 30 Mar 2015 11:21:21 -0400 Received: from mta-out1.inet.fi ([62.71.2.203]:36335 "EHLO jenni2.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752556AbbC3PVT (ORCPT ); Mon, 30 Mar 2015 11:21:19 -0400 Date: Mon, 30 Mar 2015 18:20:51 +0300 From: "Kirill A. Shutemov" To: "Aneesh Kumar K.V" Cc: "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , Dave Hansen , Hugh Dickins , Mel Gorman , Rik van Riel , Vlastimil Babka , Christoph Lameter , Naoya Horiguchi , Steve Capper , Johannes Weiner , Michal Hocko , Jerome Marchand , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv4 18/24] thp, mm: split_huge_page(): caller need to lock page Message-ID: <20150330152051.GA5849@node.dhcp.inet.fi> References: <1425486792-93161-1-git-send-email-kirill.shutemov@linux.intel.com> <1425486792-93161-19-git-send-email-kirill.shutemov@linux.intel.com> <87mw2ulgoa.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mw2ulgoa.fsf@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 30, 2015 at 07:40:29PM +0530, Aneesh Kumar K.V wrote: > "Kirill A. Shutemov" writes: > > > We're going to use migration entries instead of compound_lock() to > > stabilize page refcounts. Setup and remove migration entries require > > page to be locked. > > > > Some of split_huge_page() callers already have the page locked. Let's > > require everybody to lock the page before calling split_huge_page(). > > > > Signed-off-by: Kirill A. Shutemov > > Why not have split_huge_page_locked/unlocked, and call the one which > takes lock internally every where ? We could do that, but it's not obvoius for me what is benefit. Couple of lines on caller side? -- Kirill A. Shutemov