Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2043156rdb; Tue, 3 Oct 2023 08:35:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGC1hKUb56nEIiaGAN+m1EQSLvWvkbkLoqkz6utBCtTsDaUqphP9agG4ifNqAs234McNDJk X-Received: by 2002:a9d:694d:0:b0:6be:e1d6:821b with SMTP id p13-20020a9d694d000000b006bee1d6821bmr15928216oto.31.1696347351611; Tue, 03 Oct 2023 08:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696347351; cv=none; d=google.com; s=arc-20160816; b=OXOljevAXUs+lupfP/WIeOIfla3X03X7qxoMSlPEq/+a5ZMoD/QERP1hxOtqSqt2mY R4gr3nxH4EVsqxgvvIUxsIcAzx82S3reFj4rVbyhuOMhZyUEvMEjXZJl5FhZzPViunSY KrI53nNhSbgaxVHlhZzeVT2maKIbdnT5B7wYPQbp9djz/RmPKTZSQmohjBiBoB7iJ+Pu 46Rj5kLnrLKcfwDegprsAtdtRlmDJT384TZQ3Sjy+toR5KzgAEL0ps5mZA4Mim8/1z8d IgowM/zJY5t5UoiTt3p2e5FmrSG2hg86QAYW9/ShhIonqXdjDjKN+fO9AUSkT7MGcsql Awcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=B9PJeeevlV/3KcEc9MFHes1ShJR9+ye4yqiQWZtcqvg=; fh=NkpOq/r/kicgYagKAQ39sTPe8hf+1WAheoIzqjPobcw=; b=VHamZYtvDoUSW4vYBOs1rWzWpmUhrCjWCsN3Ku8r341KAzXv5L8uaryE7cncqpPuCo X1mPw3SMgFyYMpAJM6LBk9900L9B/caItbOK9Bqk0NRhrK9qsmPeLXZn0p4euQoll3yz +p2HufHdfz/wK9KN4GXBmSATrEJY1KHttUffC5AJFLLeiZbZ1sm7G3mLhdQHVMdlg95B bBV3b/ZqAG4lziUzcKd9rLK57GoSS+egikfbXGJc2q8k3eZtuUXLvgdXjKM5+NYsCbXR LcTsx1iSQFZXduGNhEM8wdc3jOtD+unRoiIKFHmyOZHbUs+4aPqR0Xik3n5GAskCtt7T 8pQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id y193-20020a638aca000000b005859cd26197si1599489pgd.455.2023.10.03.08.35.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 08:35:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 846CD811906B; Tue, 3 Oct 2023 08:35:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232156AbjJCPfg (ORCPT + 99 others); Tue, 3 Oct 2023 11:35:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231521AbjJCPfe (ORCPT ); Tue, 3 Oct 2023 11:35:34 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A7A8AF for ; Tue, 3 Oct 2023 08:35:31 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 608734000D; Tue, 3 Oct 2023 15:35:23 +0000 (UTC) Message-ID: <24b6ec5c-cf71-9d01-d624-ffba2e25eaf8@ghiti.fr> Date: Tue, 3 Oct 2023 17:35:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH -fixes 2/2] riscv: Fix set_huge_pte_at() for NAPOT mappings when a swap entry is set To: Conor Dooley Cc: Alexandre Ghiti , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrew Jones , Qinglin Pan , Ryan Roberts , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230928151846.8229-1-alexghiti@rivosinc.com> <20230928151846.8229-3-alexghiti@rivosinc.com> <20230930-unnoticed-slacked-0bf5696cc265@spud> <96984fd2-2e3b-d861-5555-5b5a4e5c55d6@ghiti.fr> <20231002-unending-ether-1b9f73eb642c@spud> Content-Language: en-US From: Alexandre Ghiti In-Reply-To: <20231002-unending-ether-1b9f73eb642c@spud> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr X-Spam-Status: No, score=-1.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 03 Oct 2023 08:35:47 -0700 (PDT) Hey Conor, On 02/10/2023 15:11, Conor Dooley wrote: > On Mon, Oct 02, 2023 at 09:18:52AM +0200, Alexandre Ghiti wrote: >> Hi Conor, >> >> On 30/09/2023 11:14, Conor Dooley wrote: >>> On Thu, Sep 28, 2023 at 05:18:46PM +0200, Alexandre Ghiti wrote: >>>> We used to determine the number of page table entries to set for a NAPOT >>>> hugepage by using the pte value which actually fails when the pte to set is >>>> a swap entry. >>>> >>>> So take advantage of a recent fix for arm64 reported in [1] which >>>> introduces the size of the mapping as an argument of set_huge_pte_at(): we >>>> can then use this size to compute the number of page table entries to set >>>> for a NAPOT region. >>>> >>>> Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page") >>>> Reported-by: Ryan Roberts >>>> Closes: https://lore.kernel.org/linux-arm-kernel/20230922115804.2043771-1-ryan.roberts@arm.com/ [1] >>>> Signed-off-by: Alexandre Ghiti >>> Breaks the build. Your $subject marks this for -fixes, but this will not >>> build there, as it relies on content that's not yet in that branch. >>> AFAICT, you're going to have to resend this with akpm on CC, as the >>> dependency is in his tree... >> >> I see, but I still don't understand why -fixes does not point to the latest >> rcX instead of staying on rc1? > It's up to Palmer what he does with his fixes branch, but two thoughts. > Doing what you suggest would require rebasing things not yet sent to Linus > every week and fast-forwarding when PRs are actually merged. > IIRC, Palmer used to do something like the latter, but IIRC he got some > complaints about that and switched to the current method. > At the very least, you should point out dependencies like this, as I > figure an individual patch could be applied on top of -rc4 and merged > in. Both Palmer and I have submitted things for b4 to improve support for > doing things exactly like this ;) > >> The patch which this series depends on just made it to rc4. > However, if you do not mention what the deps for your patches are > explicitly, how are people supposed to know? The reference to the > dependency makes it look like a report for a similar problem that also > applies to riscv, not a pre-requisite for the patch. You're right, I saw the dependency being merged so I thought it would be ok but I should have mention it. I have just discussed with Palmer, and I'll +cc Andrew to see if he can take that in his tree. Thanks! Alex > > Thanks, > Conor. > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv