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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8588AC3DA6E for ; Mon, 8 Jan 2024 07:27:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HopihlqgEoPrjuOPHedikYmy0v2kCY67d9VZZbxvjco=; b=qX3Y08z4imEo1p 72n2oDH0tLUBQcEhpPRGU/Wk4FR4rLypOnEu9pyGvcWqnjp7mHtJSmYqenueoqzV5AN4Txt4jbuBm X1BxsvE/oQDQv9yGK+juEmcXa8rgkDSksMFf66GRnjAO0MYLF3Ey30zzWbJewbZB6YCj57SAF0hEl ik2UYzi110rbX+vcMQPxZCDwZgGJSpDSA42bpmEMTHOkWbPVbzeuVnpBslUi4R5zA5Olu5a6nTV8Z ++SJwwhG6LZRaD3C2f4X+xGt1nzB8PJTeZfGUQzLhVUnNKciRT8EMlcJtaIdX3pRl3Y4oma79l3SC WNK+q494W4qNqIm833WQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rMk2v-004B5N-05; Mon, 08 Jan 2024 07:27:41 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rMk2r-004B3q-11 for linux-riscv@lists.infradead.org; Mon, 08 Jan 2024 07:27:38 +0000 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-468-0EvKdQJNPU6GEfR7VbVzJw-1; Mon, 08 Jan 2024 02:27:30 -0500 X-MC-Unique: 0EvKdQJNPU6GEfR7VbVzJw-1 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-28bd331cb57so744076a91.1 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=jeRY6jfyGLNC9rTIf2iuumZuoW0m8aluKwiYdZxnJLiS3nVe6XLRbyTTQdh08a9pkT EBR6aH6NUR5e1aHXt6yGH62ClmJw+rHF+eAm3FnAmaP3DjhgqcQTn8oikhW4X4GQwqXX DVFjGGC4DJe3xCH28kXO+HJQtSz7kfiUReq7Dfn2sZK2ohvcT76dh6tqkhxLrdyYXbI1 ticgkPWBkL8gdASlVoeX9BjfTQ8iYMD/eGkz4yD4fs7t416lBjnnVIzS/l390ixd4XhZ k2lV6SQ5jWrDEitwpIcagF9imJcyvruT+x0zHP5ShLQ7n352j7+ygfESGMv5Ol5RoDhk Sm4Q== X-Gm-Message-State: AOJu0YxpKYOY+3zMP4VcoKaGUqsoNa3HPS1PjO+aMleDZVHuiG9aU7m5 ib4S+44RnJU0iaMeOgntySCF9C/aM0VxJMJH7zY9bxv1Bw7lYLMY0PTdbUnxHunpUmo5CN5/Sw2 QLOuW5tKnssNpMMaEW/Bn2bvvhnvRjTGKmvJR X-Received: by 2002:a05:6a20:3cab:b0:199:c866:1d46 with SMTP id b43-20020a056a203cab00b00199c8661d46mr931056pzj.6.1704698848993; Sun, 07 Jan 2024 23:27:28 -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-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240107_232737_426326_8D4D8CFE X-CRM114-Status: GOOD ( 19.80 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AFF42C3DA6E for ; Mon, 8 Jan 2024 07:28:33 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Gc0TMble; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fruNds8A; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4T7lzM5rMXz3bsn for ; Mon, 8 Jan 2024 18:28:31 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Gc0TMble; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fruNds8A; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=peterx@redhat.com; receiver=lists.ozlabs.org) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4T7lyQ1D9Bz30MQ for ; Mon, 8 Jan 2024 18:27:40 +1100 (AEDT) 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= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704698857; 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=fruNds8A3ANLlfkMSXqcrMw+qTGBVIirmX1Ilom8gUz+hUuxtS/REwHX0ESBC2Eogn/B8O xaxOI6uAN451Yo8pHtc2hXvWY+zQ2v+uHWj5N//jEG38vC+C3yPHgKKRrsQsKy31qCJawZ BRSVfdXE0D7tUCrtFiMp08R/RBnV0ug= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-581-C9KymUPMNVCHrQkv95p8eg-1; Mon, 08 Jan 2024 02:27:30 -0500 X-MC-Unique: C9KymUPMNVCHrQkv95p8eg-1 Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-28cfa4a37c2so746186a91.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=lfaQRQpDcb69q2rSoMd/aYkRNVscXvRjZUGkRq3fTZpV1sr4f5SsT/QMtfprg6YHtf mFFqb2WT4+IXoF+dORjjfD1G1XlZdrerSk3/DKiU+YSt2gKOp7+XRQVryWBG+xis1SmU URHlsaB2/HoPCpJ7bFZOqA0bCbkUKAr6IXSZiCGAPp+Bkh926OVGd4XZS+KcQSuGu8Gl vd5C6HvFEw4SPDyOyxW5yaLid+1lifNAMnM6bthlpPXSruBdJiCCJmll67IilQ2/DyPK ZdvwFd/+t2Yn8OBVhNkvbNubH2ZU2PZI9DeXa0S8Bzrgs7kiTMzcq9wyKMFLUm4VEjQa s9JA== X-Gm-Message-State: AOJu0YzdNGVhqpWHjluIDfPeDD+cwROSCQkI7zWmKCiOSw3PfKIY8EqG kYbjGEQ9VaUekxuhrh3HraURO5jA1OwEtiZyefqBVUixyB5K4/MoLdTNM3dv4JUyyauGjABXa4I OU4rheOS9AXi75ATIrnL7HT8kErs7nVN7yQ== X-Received: by 2002:a05:6a20:3cab:b0:199:c866:1d46 with SMTP id b43-20020a056a203cab00b00199c8661d46mr931055pzj.6.1704698848992; Sun, 07 Jan 2024 23:27:28 -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 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: James Houghton , David Hildenbrand , Yang Shi , Andrew Jones , "linux-mm@kvack.org" , "linux-riscv@lists.infradead.org" , Andrea Arcangeli , Christoph Hellwig , Matthew Wilcox , "Aneesh Kumar K . V" , Vlastimil Babka , Jason Gunthorpe , Axel Rasmussen , Rik van Riel , John Hubbard , "Kirill A . Shutemov" , "linux-arm-kernel@lists.infradead.org" , Lorenzo Stoakes , Muchun Song , "linux-kernel@vger.kernel.org" , Andrew Morton , "linuxppc-dev@lists.ozlabs.org" , Mike Rapoport , Mike Kravetz Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99FDAC3DA6E for ; Mon, 8 Jan 2024 07:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F7UHq5k/KEl2wzDAasl4jY7lVgjlAZ1wcwwPd4JTbDY=; b=yWwy4AFFSKB0XL b2e5/rcglq+1YNcSl5CQvrVK7d8YiHUT7t+lGFJAnu+UNYbLOFK6xH1Ky4H7z0YrqXFLFU83nBnJe zajrwYwytajUGZRY/3iaIEGRPWCpuwm+83LWCvLbxeO8Cc9Y4sJa6hUv0bCg7SeVxJC14gL/TKgk4 G1PM/RXS1GYdj3F9YeDe8uBAwLxeVNRZQx7HWwXO3BauISxGmTX5b6mWwJAtRerIOgoUcc6qhQrpF RR8z3IKosM5QnYEXY1Z36Umtv4XJxghpMAm3eGfV+/fSTsK0XnnOWwP++ikd3BrdAMVAdtLLhn6T+ iM/FaInPFjUWD3A18coA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rMk2s-004B4S-2K; Mon, 08 Jan 2024 07:27:38 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rMk2p-004B35-2Y for linux-arm-kernel@lists.infradead.org; Mon, 08 Jan 2024 07:27:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704698851; 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=ICVyQ4vvWaweiGQQeg9cd9GTYQ0qgjJnb+zxvLHcmc+5VCVvmN80VpdO4hYiPbEfvFyjK3 1r7mA272zVQtL4jQGMGciDza4oL1C7XLIwL97P48LpnyQN+8JA5TXTywvw7TZqIqYxVh7M 3HT5rjWwuYN3xsybTA1XKx8sJez1VTU= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-298-LCYsCTnHPjOu4DUEtInQjQ-1; Mon, 08 Jan 2024 02:27:30 -0500 X-MC-Unique: LCYsCTnHPjOu4DUEtInQjQ-1 Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-28cfa4a37c2so746191a91.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=vdES0ZLek80zBuZJX90BkHE3qd3HH17C14/v0OTDpGzcz+/Y4CVLAfThksfeBmLVcn 7x09xnFp2pJ/1FWS/a095LpGTnbo7VWuJqxbv+xWiUiYWv8xEP668Sl1I982pplxDd8r vNiAByt0SxhXLifeuGUQugVvBwWtioIR/gXL20vZMeT/A7AVkiH/VoY3VpzyNy4FeOgT XKTT8pqPxOyS95oN1lxu575ZPFTUuXtlzOL8ekVcBdn803mSF6nscuclyuSNvVCMxEcL gP6pKaISpXTtWadb7GM3gsUomW/el/DJj1bOB0dqzlqISqf9Q/+M7HSZUm6EiZ+Q4leP nrLQ== X-Gm-Message-State: AOJu0YzSew1mYQu/XE+jEdrJMv0rALSl8p5j4eJ0vVZffPMNeo1jAVTJ Fz18MgE7x5HhvY7Z9Xqxk8lIgT0cRik6mEV6q2rhFv+6m3eX8ouYvf7gbZPaXkF02yz/eou/wbQ wMFLkKTkQXAd9z92I493MTg0/7h44RQtNM3ZBpdBGD7g= X-Received: by 2002:a05:6a20:3cab:b0:199:c866:1d46 with SMTP id b43-20020a056a203cab00b00199c8661d46mr931053pzj.6.1704698848992; Sun, 07 Jan 2024 23:27:28 -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-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240107_232735_922193_D94ADF6E X-CRM114-Status: GOOD ( 21.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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+14k9IE91oVuBDNGHRNOOl53kkjWcZ//jw1/JTBiimGluHYfwd2SYY7+Hd0fiiYtLmbtTW2Gz/bf7CoFyUmyJHeEhdSkkzSiOoO8bE8Yy7tvRLHrcZl2hhfY3OBSVy62AM2C4l4XPVV6T4qjn/5DK8cCw030j0nb8efglceiku2A2AHLipFpzJNJLE8qTfF5JbLJnvukVjsV4BECO0oZJut0Gipm0+bdpsEjPwG0jIH5rakAiIrD+oG6B9awFIaxvrvMJzU1X7WSj0SANWZJgP/2vlcuyw40mJwBPfIIayy5+yu/80NueRNM7pydtViFGnswnZvZcvllFlwBVg6t8L7IFFExlxXZHDQrk9fMITYYF9UETqfg8agjgZRIjAA3TnW+0+nEGHGor3P993mqNj7KWd9Z2BYbtllRvy4ujguakgjn3XyY59vrsNY0p9jOkcvu3fl6kD4FPj8vEc/wt/3ou1/W6EoIx1Q3SuyFTmSzhFSGz86GyTEkXR72+5K+B6QBoqrhkSKnLWk3Pc2tLf4guEBJShwbBDtLojXYWbHS7JY14nPK5ID8lDQK/9O9mSHfqUPUZkS2x0byW1opAsHdagtqC8PKDzbbuRs5q0OQ4XPOsn4poydlHznkNRpxkb++S2knduEBR+t9mBB0nKPrTuMSi6F8QkMdMHYrpi7fdrV85Hi1gk4SZM//NrP+Z06krPMP+FWZo3n867rbEYXmztDRIQZFIfHsW7rGr6R3K5RUHiF8Odw/V1970+71V/3X2g7xMrnyUCXqgasUGhyfIxNrRnqGobkQvBp1rJSCNz1DT6n5C5vHHvSbYUc8Qy2I/zwa9lAk8KPRpYYBuyAcpJ3WpBmquWRPtMw/ScUMEXra6vz5iX+uVS6z08mQbOb4BDWD3f5n/plhlkQ2NAbaiuvPT1JsPM52FptMOihtB6iHhtrcorRpy2KnVjW8zxYUz+ZID 9YqsE51/ isQC/B+mL1DVzEb6cG4AwlTcMCd1knw3jqLDrYl6m/RG3ZpR0COzoEepkaQLKRh2u4bVEKkY2SeI09FH+xN4fUPC6zxXH++NiArlMr00A7qGWXu3yHHZlsgOF7bp0A/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