Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp342665pxb; Wed, 3 Feb 2021 06:56:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeYcJ5/PcjutSCmGbJ5xWMPpN3mK5AaJ4KnEKvgSBcnGOtc9cnohcT+/iO9GG6VFKHsgLK X-Received: by 2002:a17:906:1719:: with SMTP id c25mr3656778eje.251.1612364219166; Wed, 03 Feb 2021 06:56:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612364219; cv=none; d=google.com; s=arc-20160816; b=QJZ/4o6ET3jueoXNFFtG5WoasXnf8T09+9lZnUUAWGCbFkMbANJJJoDJFT3KScYIjV GLCWmH9GRS7yb0KezAppaIA7iqXy58LVmdTHMDUDaPLtmSRl/1ADCLzR1l+K+ZH0Lxoa MtNzaa+OjdoLp96KozsG/iN7cqdfS9ufGTBZzsM6stYHVGPALQj2fA3gINvoH4Fz5Pgn ovUaxwVT3LTitZY5WazwJju2pMXBt37SP0OrAeycPAJl0lUnC6FEogQKrvEo9JoZNxF0 S92mI1j3zDU0VoJldfDD/l0sJU9SXyPedK6OWQuj+guMQtc6jFphhMaWFI/qKQeYXfTg PASg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tWqEMDRRJjAPsFV9gqXLc6rsgZRz2m3wCpFXqt37vmg=; b=DNaft6Pmh1Y10P2WLshOYbIgHiSSIAhQSG6tKuIpA+QvxNMSTielPf01BI1JyCUh9y eq/B3Oyi+YZ40CXc9lmZnP8w/UwpFTsY5DKE9DfjD/zA3Nh9whdX/DzYF7BPR1UZlpMO 7DsE+dilcI2UdlCYTIgMDIE6x82eX8otx+LAvpC2je2pZn8VK/WwKpl5xzTqXqGFdXvN hqdPVwCyr+qXHfv4jx/yjCEb3TL7rYpbb6Yp2ldl8euFWx5dZzM9dq8hQvDCNONsBcTi 9a2OXy4Ag3iCzS2km8CHjnHkmiYK92mL+TM/rqZEtBPgT8uxDzF9foBUZA8cZsANWeDO dylg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=OKUaNQOK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id uz12si1477015ejb.576.2021.02.03.06.56.32; Wed, 03 Feb 2021 06:56:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=OKUaNQOK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233134AbhBCOyD (ORCPT + 99 others); Wed, 3 Feb 2021 09:54:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233221AbhBCOx4 (ORCPT ); Wed, 3 Feb 2021 09:53:56 -0500 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C16CC061573 for ; Wed, 3 Feb 2021 06:53:15 -0800 (PST) Received: by mail-qk1-x72e.google.com with SMTP id a12so23544806qkh.10 for ; Wed, 03 Feb 2021 06:53:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tWqEMDRRJjAPsFV9gqXLc6rsgZRz2m3wCpFXqt37vmg=; b=OKUaNQOKewwCwxgBOL++qolHJYoYrTRTOyTapiNnICmjOju2zV7ruz7VJ1G7WlfL8n WsVA2v5BqDiFoA0SIIPy9bk2Wm2yfuoXCci9i0tRqnmqF/dZw2/D1PmwBqxKVkpKUYOT SOvK3/d0GYAHgC5ALoicPwgmnl9KtFHqGgnFb5fjSXC6naKrJfeL4cgg+jX1fZ3KFZ7R MzM7m4y2nz0+Eb/9asZei5aOP5o2q60siHUnRvx5sIrak3DxfXeow3mRUqQQgMwVShm4 f0mcRQOFQeBZD7jZDGToDkxw/lfUnMJdOBQAH6DxLsSG7FG8n8pXxueB5LH0orU5C+Hn Vblg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tWqEMDRRJjAPsFV9gqXLc6rsgZRz2m3wCpFXqt37vmg=; b=N7IyKOQu8oPPfTvWNq/+JQviaEtIMb5uIViX2grKaewu29bNZsYYaEWbjXE9UJohhI lkTEi+E8Hiy+el+Ui607vyg2mLgn8NYkGxsBF20iKtZsbW8pqIBafTZu2l1Jnk/u6w9i ZEGbM4OZGRmY7LqdboVCohE+Q+SSgFQi4C9ndZ6+sN/EYbDsurtnTXsb6I+WxDCtwVwP Q9OmNPS1fW9324x2FfrVBjqETVuMdVC/OY3J3SQwa3lQV3jqckpUANm0mkucJdJgrLxw f8Gctz6ZsKEeJ5Nq2ZF+XxJt79NbX6BZkYU5ZqS19zg4f9VTbIQ9+cGd4RUdXsi0CC4q QKSQ== X-Gm-Message-State: AOAM530A2tQFh21uP0IPmn5lBDLKsdlryPDDgj5lm+EZLWhG3xmbuFZ1 jp/gd8owGeID8a3rj24ReFFI7Q== X-Received: by 2002:ae9:edd2:: with SMTP id c201mr2872281qkg.375.1612363994790; Wed, 03 Feb 2021 06:53:14 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id 196sm1758474qkn.64.2021.02.03.06.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 06:53:14 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1l7JWr-0031OU-H2; Wed, 03 Feb 2021 10:53:13 -0400 Date: Wed, 3 Feb 2021 10:53:13 -0400 From: Jason Gunthorpe To: Joao Martins Cc: Pavel Tatashin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, mhocko@suse.com, david@redhat.com, osalvador@suse.de, dan.j.williams@intel.com, sashal@kernel.org, tyhicks@linux.microsoft.com, iamjoonsoo.kim@lge.com, mike.kravetz@oracle.com, rostedt@goodmis.org, mingo@redhat.com, peterz@infradead.org, mgorman@suse.de, willy@infradead.org, rientjes@google.com, jhubbard@nvidia.com, linux-doc@vger.kernel.org, ira.weiny@intel.com, linux-kselftest@vger.kernel.org, jmorris@namei.org Subject: Re: [PATCH v8 02/14] mm/gup: check every subpage of a compound page during isolation Message-ID: <20210203145313.GQ4718@ziepe.ca> References: <20210125194751.1275316-1-pasha.tatashin@soleen.com> <20210125194751.1275316-3-pasha.tatashin@soleen.com> <05a66361-214c-2afe-22e4-12862ea1e4e2@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05a66361-214c-2afe-22e4-12862ea1e4e2@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 01:22:18PM +0000, Joao Martins wrote: > With this, longterm gup will 'regress' for hugetlbfs e.g. from ~6k -> 32k usecs when > pinning a 16G hugetlb file. Yes, but correctness demands it. The solution is to track these pages as we discover them so we know if a PMD/PUD points and can directly skip the duplicated work > Splitting can only occur on THP right? If so, perhaps we could > retain the @step increment for compound pages but when > !is_transparent_hugepage(head) or just PageHuge(head) like: Honestly I'd rather see it fixed properly which will give even bigger performance gains - avoiding the entire rescan of the page list will be a win Jason