Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7481894pxb; Thu, 18 Feb 2021 11:10:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrheu66lTBTuYiJoXoXddvBGGO3eDSEoUvRXVzz50iIWcBdh7LKodjMK7NXcOwXCRZevMZ X-Received: by 2002:aa7:c543:: with SMTP id s3mr5664032edr.305.1613675427543; Thu, 18 Feb 2021 11:10:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613675427; cv=none; d=google.com; s=arc-20160816; b=uGsj9lrIu+jg+SAHeArW7w/dsk0AnuWlHG8RXGgxJdAxZ8THDZ6LqdLbUtMUopX07p QCQsAWVUI6rPo4kTGFQ7un5BRVyUNrRqeIfbhnIsiVl9tGuqnhR9F/kn0aQHy6ll+pzH dGOFWVP8dzs24NhQL7m22KeL3797xIiKYFUGKXGTNBDvp6QnvuvhMI1G5mvuvXUUeI0Y MCaJqSg9Qfts1fJ11zxALiDfLzoCeJNbg+L7M1jKkvXnxaEErGBOxrItv4JTE/q31Nt8 nLGwc+laMEpdGMU0AKxiQbUeNARjNDldjE+p6ly2+o6ggKtnChrz5oe1b5h+3p3Prd8D T4lQ== 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=0/TTwRZM5UWkeVt7hK50tjPjIUS/Pw+aCUTdCE6xC00=; b=UBJrQ7oxm9lea4a7cFV+IH314XyuWiAVIWDqe8mMDkfeQSu8NpmCAzTWWEz6E0FQuf LP3FNl0yxj9scwkJAEP35x3aA1+92S7kaV31rXZ9MoFHPTKdiO2cRU3SlmA7s9URAozh lLcHhJ7WY6oxKraE73BI6pru2ClvnboZ1BQMUUrxlIbE/fvAYz8vO82u5fOVAXUJHF/H ileImgQlePG3p6rXg8jhJgul+xmaMQeDoRaBU88OtMgqTSiaCQ6Kj7cykRrUICwlysfP MmejlSW7p0uV+C3u7UWQGjCb1jCBcZ/N1wFkRX9FtYyi4OcfcYvPGseJiUv6zDTbgVSX 6GXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="R/KR62gE"; 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 r21si4942411ejo.415.2021.02.18.11.09.48; Thu, 18 Feb 2021 11:10:27 -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="R/KR62gE"; 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 S233747AbhBRTG3 (ORCPT + 99 others); Thu, 18 Feb 2021 14:06:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234365AbhBRRcn (ORCPT ); Thu, 18 Feb 2021 12:32:43 -0500 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99100C061786 for ; Thu, 18 Feb 2021 09:32:02 -0800 (PST) Received: by mail-qt1-x82f.google.com with SMTP id b24so1936830qtp.13 for ; Thu, 18 Feb 2021 09:32:02 -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=0/TTwRZM5UWkeVt7hK50tjPjIUS/Pw+aCUTdCE6xC00=; b=R/KR62gElCW/P34+zKXp/hSu2ZY5/ttxG2NPuBugoIHOJgJvFh0N1n5yTEoFM1sm4z zmX0GHIwrq99bVreyqpHUroTjFhGXockDFXTHOb0Leb/rw3G7weLzZi1Vob0MB7Xphfu iMZMyPoBha2eTTQeMYy3ERTKQF0kqG8zysxswJszTOdvgBu5Ed1IvxC3y+aD1iZ7RNbr gudypmPAKl9HtKArAzbyqnrEpm0rXtUwbCbthidw5oCQAMo4ruhQ/6aMbyyZ5nF3fQhN OuS+ovN4PrZYFHYBM10dxgIPHtwey4XdfR/aiSZzlXKnU2ftPFtTQpp1nDFRVjDi2gT8 iMQg== 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=0/TTwRZM5UWkeVt7hK50tjPjIUS/Pw+aCUTdCE6xC00=; b=tYXpM6eGPNvR0YF5D9zwKwV45zTtj8eS77hNF2GLdlhFov+K7Sc31FJ9zfu9w70IpR +6IP2IBYRQOquOpHqTp4RtN3GtLtXx+GYZZzZ1ZUWprWErcK6vX5p9s2LE7LHPEZ8Blp 3hYKJPprE4TtlLx485d+/euJMqdegv2Wc5+1xtyyBTEH1sB+0BYUBuhgs25nnx1OpOz8 023yS33PdSmGPWErb/imC6PhttX8CDkMjwpYdDWpQ+hp1J8lRx8+ewkmoqqTc6MXA58j T9EJaZDEQ/5XjxH2qFUqw3sN54XInXzSHq73YXQZVkr7QBmdZz41KKycu4OE4b0dK2dK 5KnA== X-Gm-Message-State: AOAM531mzHAIxWLI5fLmQilPzz9Cgh7kzntANwMMGAuJXbFhjxiPNWcL bxGaAJFq+fZH+dywDzyTZfX1Ig== X-Received: by 2002:ac8:4a83:: with SMTP id l3mr5273238qtq.350.1613669521898; Thu, 18 Feb 2021 09:32:01 -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 f188sm4392003qkj.110.2021.02.18.09.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 09:32:01 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lCn9k-00B5jy-Tc; Thu, 18 Feb 2021 13:32:00 -0400 Date: Thu, 18 Feb 2021 13:32:00 -0400 From: Jason Gunthorpe To: Zi Yan Cc: Matthew Wilcox , Andrew Morton , Mike Kravetz , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Davidlohr Bueso , "Kirill A . Shutemov" , Andrea Arcangeli , Oscar Salvador , Joao Martins , stable@vger.kernel.org Subject: Re: [PATCH 1/2] hugetlb: fix update_and_free_page contig page struct assumption Message-ID: <20210218173200.GA2643399@ziepe.ca> References: <20210217184926.33567-1-mike.kravetz@oracle.com> <20210217110252.185c7f5cd5a87c3f7b0c0144@linux-foundation.org> <20210218144554.GS2858050@casper.infradead.org> <20210218172500.GA4718@ziepe.ca> <19612088-4856-4BE9-A731-BB903511F352@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19612088-4856-4BE9-A731-BB903511F352@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 18, 2021 at 12:27:58PM -0500, Zi Yan wrote: > On 18 Feb 2021, at 12:25, Jason Gunthorpe wrote: > > > On Thu, Feb 18, 2021 at 02:45:54PM +0000, Matthew Wilcox wrote: > >> On Wed, Feb 17, 2021 at 11:02:52AM -0800, Andrew Morton wrote: > >>> On Wed, 17 Feb 2021 10:49:25 -0800 Mike Kravetz wrote: > >>>> page structs are not guaranteed to be contiguous for gigantic pages. The > >>> > >>> June 2014. That's a long lurk time for a bug. I wonder if some later > >>> commit revealed it. > >> > >> I would suggest that gigantic pages have not seen much use. Certainly > >> performance with Intel CPUs on benchmarks that I've been involved with > >> showed lower performance with 1GB pages than with 2MB pages until quite > >> recently. > > > > I suggested in another thread that maybe it is time to consider > > dropping this "feature" > > You mean dropping gigantic page support in hugetlb? No, I mean dropping support for arches that want to do: tail_page != head_page + tail_page_nr because they can't allocate the required page array either virtually or physically contiguously. It seems like quite a burden on the core mm for a very niche, and maybe even non-existant, case. It was originally done for PPC, can these PPC systems use VMEMMAP now? > > The cost to fix GUP to be compatible with this will hurt normal > > GUP performance - and again, that nobody has hit this bug in GUP > > further suggests the feature isn't used.. > > A easy fix might be to make gigantic hugetlb page depends on > CONFIG_SPARSEMEM_VMEMMAP, which guarantee all struct pages are contiguous. Yes, exactly. Jason