Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932262Ab3IBQho (ORCPT ); Mon, 2 Sep 2013 12:37:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6754 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758666Ab3IBQhn (ORCPT ); Mon, 2 Sep 2013 12:37:43 -0400 Date: Mon, 02 Sep 2013 12:37:10 -0400 From: Naoya Horiguchi To: "Kirill A. Shutemov" Cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , Andi Kleen , Michal Hocko , KOSAKI Motohiro , Rik van Riel , Andrea Arcangeli , "Aneesh Kumar K.V" , Alex Thorlton , linux-kernel@vger.kernel.org Message-ID: <1378139830-2a95i7nl-mutt-n-horiguchi@ah.jp.nec.com> In-Reply-To: <20130902105327.AE4D4E0090@blue.fi.intel.com> References: <1377883120-5280-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1377883120-5280-3-git-send-email-n-horiguchi@ah.jp.nec.com> <20130902105327.AE4D4E0090@blue.fi.intel.com> Subject: Re: [PATCH 2/2] thp: support split page table lock Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mutt-References: <20130902105327.AE4D4E0090@blue.fi.intel.com> X-Mutt-Fcc: ~/Maildir/sent/ User-Agent: Mutt 1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1394 Lines: 40 Kirill, thank you for the comment. On Mon, Sep 02, 2013 at 01:53:27PM +0300, Kirill A. Shutemov wrote: > Naoya Horiguchi wrote: > > Thp related code also uses per process mm->page_table_lock now. So making > > it fine-grained can provide better performance. > > > > This patch makes thp support split page table lock which makes us use > > page->ptl of the pages storing "pmd_trans_huge" pmds. > > Hm. So, you use page->ptl only when you deal with thp pages, otherwise > mm->page_table_lock, right? Maybe it's not enough. We use page->ptl for both of thp and normal depending on USE_SPLIT_PTLOCKS. And regardless of USE_SPLIT_PTLOCKS, mm->page_table_lock is still used by other contexts like memory initialization code or driver code for their specific usage. > It looks inconsistent to me. Does it mean we have to take both locks on > split and collapse paths? This patch includes the replacement with page->ptl for split/collapse path. > I'm not sure if it's safe to take only > page->ptl for alloc path. Probably not. Right, it's not safe. > Why not to use new locking for pmd everywhere? So I already do this. Thanks, Naoya Horiguchi -- 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/