From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932468AbbFIN7v (ORCPT ); Tue, 9 Jun 2015 09:59:51 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33589 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753499AbbFIN7o (ORCPT ); Tue, 9 Jun 2015 09:59:44 -0400 Message-ID: <5576F14C.8080303@suse.cz> Date: Tue, 09 Jun 2015 15:59:40 +0200 From: Vlastimil Babka User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , Hugh Dickins CC: Dave Hansen , Mel Gorman , Rik van Riel , Christoph Lameter , Naoya Horiguchi , Steve Capper , "Aneesh Kumar K.V" , Johannes Weiner , Michal Hocko , Jerome Marchand , Sasha Levin , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv6 13/36] mm: drop tail page refcounting References: <1433351167-125878-1-git-send-email-kirill.shutemov@linux.intel.com> <1433351167-125878-14-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1433351167-125878-14-git-send-email-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/03/2015 07:05 PM, Kirill A. Shutemov wrote: > Tail page refcounting is utterly complicated and painful to support. > > It uses ->_mapcount on tail pages to store how many times this page is > pinned. get_page() bumps ->_mapcount on tail page in addition to > ->_count on head. This information is required by split_huge_page() to > be able to distribute pins from head of compound page to tails during > the split. > > We will need ->_mapcount acoount PTE mappings of subpages of the to account > compound page. We eliminate need in current meaning of ->_mapcount in > tail pages by forbidding split entirely if the page is pinned. > > The only user of tail page refcounting is THP which is marked BROKEN for > now. > > Let's drop all this mess. It makes get_page() and put_page() much > simpler. > > Signed-off-by: Kirill A. Shutemov > Tested-by: Sasha Levin > Acked-by: Vlastimil Babka From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by kanga.kvack.org (Postfix) with ESMTP id AE2726B0038 for ; Tue, 9 Jun 2015 09:59:44 -0400 (EDT) Received: by wgme6 with SMTP id e6so14229273wgm.2 for ; Tue, 09 Jun 2015 06:59:44 -0700 (PDT) Received: from mx2.suse.de (cantor2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id s9si3353577wia.28.2015.06.09.06.59.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jun 2015 06:59:43 -0700 (PDT) Message-ID: <5576F14C.8080303@suse.cz> Date: Tue, 09 Jun 2015 15:59:40 +0200 From: Vlastimil Babka MIME-Version: 1.0 Subject: Re: [PATCHv6 13/36] mm: drop tail page refcounting References: <1433351167-125878-1-git-send-email-kirill.shutemov@linux.intel.com> <1433351167-125878-14-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1433351167-125878-14-git-send-email-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , Hugh Dickins Cc: Dave Hansen , Mel Gorman , Rik van Riel , Christoph Lameter , Naoya Horiguchi , Steve Capper , "Aneesh Kumar K.V" , Johannes Weiner , Michal Hocko , Jerome Marchand , Sasha Levin , linux-kernel@vger.kernel.org, linux-mm@kvack.org On 06/03/2015 07:05 PM, Kirill A. Shutemov wrote: > Tail page refcounting is utterly complicated and painful to support. > > It uses ->_mapcount on tail pages to store how many times this page is > pinned. get_page() bumps ->_mapcount on tail page in addition to > ->_count on head. This information is required by split_huge_page() to > be able to distribute pins from head of compound page to tails during > the split. > > We will need ->_mapcount acoount PTE mappings of subpages of the to account > compound page. We eliminate need in current meaning of ->_mapcount in > tail pages by forbidding split entirely if the page is pinned. > > The only user of tail page refcounting is THP which is marked BROKEN for > now. > > Let's drop all this mess. It makes get_page() and put_page() much > simpler. > > Signed-off-by: Kirill A. Shutemov > Tested-by: Sasha Levin > Acked-by: Vlastimil Babka -- 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