From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79AE5C3DA6E for ; Mon, 8 Jan 2024 07:27:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BFEEF6B0080; Mon, 8 Jan 2024 02:27:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BAECA6B0081; Mon, 8 Jan 2024 02:27:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A4FC26B0082; Mon, 8 Jan 2024 02:27:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 8EF9D6B0080 for ; Mon, 8 Jan 2024 02:27:39 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 636F41C0F31 for ; Mon, 8 Jan 2024 07:27:39 +0000 (UTC) X-FDA: 81655313838.25.A6B5811 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf14.hostedemail.com (Postfix) with ESMTP id 3118C10000A for ; Mon, 8 Jan 2024 07:27:37 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Gc0TMble; spf=pass (imf14.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1704698857; a=rsa-sha256; cv=none; b=bBN+GGAwnvtPBeHFRklFh1yCci9SGY8c2ChFwcXK3TiA6txXV+t2P1nkLmK4ugRayz9SUP pvFJ4r/FQEYEbeeah1FNaYbSbKS/WxyRClKelKAbDM0NISfYz2AuA1p78blMmrNcExzwNn eAvIJjVoqxashMzePYQZSgG/iKQOASI= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Gc0TMble; spf=pass (imf14.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1704698857; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=++HIVa+fUHc7mVxMPbgRezSHjTqa6qZR6U7zKUbz7Hc=; b=tzzO6zwqO7wrwlMacKUCheeXi1HdFtDrn+k12Xo1A/Do4Nbmb/WenaSkn73bNuSodYg5qz ROD7wPX839RGFLT5jZ0m4X6Yc9sdlAnxywhWZryPnc5iOvylOUcpGTW6P5PtD2YYhkiBKP 5uAuCOuaNR5F5xCF14Bj9FSmQRWvwTA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704698856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=++HIVa+fUHc7mVxMPbgRezSHjTqa6qZR6U7zKUbz7Hc=; b=Gc0TMble/0NWHq5T6//n05hnJQ27EyD34l0vqCls4lMQyeCb8zQ5Y8g8s2CvahneRuuJfL Jc/6YAqUvgUopJTCwlCIFEorWqZfwubruSL3Dry+hl9qW0rT9pHMwrAUFR4qZsnS5DMo7Z tivIAJT3VLcy/dhEN27ETu2xMCU2hrE= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-298-wzAxjojIPV-MLG-7pLzECA-1; Mon, 08 Jan 2024 02:27:30 -0500 X-MC-Unique: wzAxjojIPV-MLG-7pLzECA-1 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-28cfa4a37c2so746189a91.0 for ; Sun, 07 Jan 2024 23:27:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704698849; x=1705303649; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=++HIVa+fUHc7mVxMPbgRezSHjTqa6qZR6U7zKUbz7Hc=; b=V0PAE6FqXM8UrrMXaRD189KZ8jq/Oa3EE+6PvLq/FCwDNShUBLBVM0EQsHDHMbzhBv 0tvCum64nxSj2K1Esf5fw0Oo4okjN9wWeTzy3Ls6ka9lY6pncUqdeJ1N4xwyLZJ8p8AH 6ezx3kTvCsytOnDia7xRDkY4dTEuwSn8mL+Tj0nz16gZ8U9eAS72+ZNt9LcXMpey9rc6 72cVFMq4l2dvBTnYBYi4qkvcnRwIUQ5Frc6uqp/ZvqiBT6x/uaA3tDwpZAd8OT715qlB AZaJqxTPcuu0tGlirUtzhegHhl5lY4RDAsGKSYlcDkr+/YqA1qzPptsMyHWy870kkosd OVDA== X-Gm-Message-State: AOJu0Yw582ovJCmlxtXg/TrpsQ99hBiV0jOJkYY/ADDAhEJ4Q2IPWgO+ vChi29SLdPNq+OWnHGmxThV0C+1eQLKMDcq7UxVshhz9wQbHRz7Mw2nujHx5JiwiBP1WGGJ8Ud8 Ed3k55raRZH1Mr0BkKGM= X-Received: by 2002:a05:6a20:3cab:b0:199:c866:1d46 with SMTP id b43-20020a056a203cab00b00199c8661d46mr931064pzj.6.1704698849000; Sun, 07 Jan 2024 23:27:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCAavyxZcZwU5CLY8vR5nixlH4bDIz/ZGJUz9tbspcbUqeK+w5R+Hs85r/f/cHobBdBUdCsQ== X-Received: by 2002:a05:6a20:3cab:b0:199:c866:1d46 with SMTP id b43-20020a056a203cab00b00199c8661d46mr931031pzj.6.1704698848614; Sun, 07 Jan 2024 23:27:28 -0800 (PST) Received: from x1n ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id d5-20020a17090a8d8500b0028c2de909e4sm5617976pjo.50.2024.01.07.23.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 23:27:28 -0800 (PST) Date: Mon, 8 Jan 2024 15:27:17 +0800 From: Peter Xu To: Christophe Leroy Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , James Houghton , David Hildenbrand , "Kirill A . Shutemov" , Yang Shi , "linux-riscv@lists.infradead.org" , Andrew Morton , "Aneesh Kumar K . V" , Rik van Riel , Andrea Arcangeli , Axel Rasmussen , Mike Rapoport , John Hubbard , Vlastimil Babka , Michael Ellerman , Andrew Jones , "linuxppc-dev@lists.ozlabs.org" , Mike Kravetz , Muchun Song , "linux-arm-kernel@lists.infradead.org" , Jason Gunthorpe , Christoph Hellwig , Lorenzo Stoakes , Matthew Wilcox Subject: Re: [PATCH v2 00/13] mm/gup: Unify hugetlb, part 2 Message-ID: References: <20240103091423.400294-1-peterx@redhat.com> <591c59d6-dedb-4399-8a6f-c574fd2ad9cc@csgroup.eu> MIME-Version: 1.0 In-Reply-To: <591c59d6-dedb-4399-8a6f-c574fd2ad9cc@csgroup.eu> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 3118C10000A X-Stat-Signature: dn7cdzuk3hx93kjjc5js5yp1tdadhybk X-Rspam-User: X-HE-Tag: 1704698856-352309 X-HE-Meta: U2FsdGVkX1+14k9IE91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7bp0A/d/O0V/HXJh/gxbd1bp5W4Yz7nQ7MmESpoSofae2Lb3oDxtzbLzC8yJhKIkDRKNFQVYr2QbNns2G+bSW0U+a7IJnCwqYhspjWxnaxoUlaBXIVNfV7pihA1PV41MrRd+c2Ad2cS/Py6f480q+Aauty9S2GVBmcA9N3rDuikR1eOB3sHe2OvO8/CLwc6QvLcXqHft1U/J8+RkTzGFmdkBKvE/4P4sRCZnZKm8krDSJJ+A/JGBVJOmiGADPYLXlIXAYiOFHev9gLA3yrajeqqzZO7sKBiuTQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi, Christophe, On Wed, Jan 03, 2024 at 11:14:54AM +0000, Christophe Leroy wrote: > > Test Done > > ========= > > > > This v1 went through the normal GUP smoke tests over different memory > > types on archs (using VM instances): x86_64, aarch64, ppc64le. For > > aarch64, tested over 64KB cont_pte huge pages. For ppc64le, tested over > > 16MB hugepd entries (Power8 hash MMU on 4K base page size). > > > > Can you tell how you test ? > > I'm willing to test this series on powerpc 8xx (PPC32). My apologies, for some reason I totally overlooked this email.. I only tested using run_vmtests.sh, with: $ bash ./run_vmtests.sh -t gup_test -a It should cover pretty much lots of tests of GUP using gup_test program. I think the ones that matters here is "-H" over either "-U/-b". For ppc8xx, even though kernel mapping uses hugepd, I don't expect anything should change before/after this series, because the code that I touched (slow gup only) only affects user pages, so it shouldn't change anything over kernel mappings. Said so, please feel free to smoke over whatever type of kernel hugepd mappings, and I'd trust you're the expert on how to trigger those paths. Since I got your attention, when working on this series I talked to David Gibson and just got to know that hugepd is actually a pure software idea. IIUC it means there's no PPC hardware that really understands the hugepd format at all, but only a "this is a huge page" hint for Linux. Considering that it _seems_ to play a similar role of cont_pXX here: do you think hugepd can have any chance to be implemented similarly like cont_pXX, or somehow share the code? For example, if hugepd is recognized only by Linux kernel itself, maybe there can be some special pgtable hint that can be attached to the cont_* entries, showing whether it's a "real cont_*" entry or a "hugepd" entry? IIUC it can be quite flexible because if hugepd only works for hash MMU so no hardware will even walk that radix table. But I can overlook important things here. It'll be definitely great if hugepd can be merged into some existing forms like a generic pgtable (IMHO cont_* is such case: it's the same as no cont_* entries for softwares, while hardware can accelerate with TLB hits on larger ranges). But I can be asking a very silly question here too, as I can overlook very important things. Thanks, -- Peter Xu