Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp79433rwd; Sat, 13 May 2023 13:21:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7nSLPnHCiA0IflQ93HwvIv6dDpPTSgFN6xU03p8QKl4UG2xPJICsIn97TG3kBd0mhiP0jD X-Received: by 2002:a17:902:cece:b0:1a6:413c:4a3e with SMTP id d14-20020a170902cece00b001a6413c4a3emr37560589plg.5.1684009289384; Sat, 13 May 2023 13:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684009289; cv=none; d=google.com; s=arc-20160816; b=afQ6zBAKVPhDwWgQUrc67L5HnufQVaErKQc7rMqtLpYRNGzbaDDSQvWBg7TH1bySNa 8QxQCr+u2kaRAtL2oZb5BrZW7cg3d3ha/hpZ7nujjlRpcZ6cx9pVAAUkK3tZOcrQcvpS 8PgGaz0ql2M/z4GBlBZSzHskOWSo7AcpPdRQg0nN97v0JDHq2WSjhIxkjIXAYm4hofuA AaEtlQp/ERuK9rAxO5VAEaxaGwXin3TfEye38nzIeUZboVlpliXdbV9BZ+xhM/aL2j05 ve6n62/XvRy1ZxRsFeVleKYdkUswjhg27+btUGbaaDhUuhQmHktKEf1ufMOQdIWCk/2C YlYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=QkxD4jDFwjLSBHfJ/c7FKLTS33arAD1vzMDqCSf5Pqw=; b=rXD9AbOKjEU16r70a0FFgx1GWuRmIy0gLBJUE6NZlhgfcJBoXwixHzdP37eHasMnB4 OTq+SCVkwsOqLiYklJSEdtO71vMgXt4p4AAnvTaGrAL/sp8ttnN1CswlBIbqeD1X69yv 78UROT360yuwAuoO89MxmY8yXyvhR4k54L6Gp5pgjPpFFhRziK9vZI9nhNsUNWSIl3si thP83w4S+Tu0lNia1ycyOrhr5GHbka6Cq82N7v8q4gQNd0h+1qaDuaO08gmIUWluAVYH MUl3tLsvvAXbfnjxwt1LyAoj/u57sFCp8zz4Pc50dgBhPbjHxkjZFaPTYdOW/AoDQpoM D2Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="WecT/scq"; dkim=neutral (no key) header.i=@linutronix.de header.b="SUX0/ToM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l185-20020a6391c2000000b0053073da1102si7317279pge.513.2023.05.13.13.21.15; Sat, 13 May 2023 13:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="WecT/scq"; dkim=neutral (no key) header.i=@linutronix.de header.b="SUX0/ToM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230326AbjEMT5C (ORCPT + 99 others); Sat, 13 May 2023 15:57:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229763AbjEMT5B (ORCPT ); Sat, 13 May 2023 15:57:01 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C0AA2D63 for ; Sat, 13 May 2023 12:56:59 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684007817; 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=QkxD4jDFwjLSBHfJ/c7FKLTS33arAD1vzMDqCSf5Pqw=; b=WecT/scqjLIK4s1VjLSGGyFo6Jr1XXzXXa7ew7a08lM3Cc2LHE+s4zmMPCPIvNECejz+09 87fbFNALX/Zp+UJRamTk9VK8yhJr+tFbUFAlSdpMq6+uNqrfb6Pxl8tTlZf5YXh6iTKo+f TWLO/fAsZChUP7p2Ke4ZEC50klOeE1NBd8F8IdQ+f42jv/Ri4LXiAAZerNVFEuO0f0OTAP 49SNHsfXxg7npfLUnrb3cg3yme5cB6bsNk9EJ0P5TDYVdftfjG8QemHEHV1r9IdMKbgoSp cuiem2FT9GMotBK2ZTViDARfY+e5A+bTiwA6e3hr1Rdw1c88Odvy6BIG1UPpsQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684007817; 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=QkxD4jDFwjLSBHfJ/c7FKLTS33arAD1vzMDqCSf5Pqw=; b=SUX0/ToMzEcB41KnS0g0Ax0kdf6JxQPb/f2pebxSdCW+QrA33POroMty+gImglWABdG5dz NygQwc3rBZelmEAQ== To: Matthew Wilcox , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?utf-8?Q?Andr=C3=A9?= Almeida Cc: linux-kernel@vger.kernel.org, Jason Gunthorpe , linux-mm@kvack.org Subject: Re: Futexes & Folios In-Reply-To: References: Date: Sat, 13 May 2023 21:56:56 +0200 Message-ID: <87cz349f93.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 13 2023 at 17:16, Matthew Wilcox wrote: > Here's a patch which converts the futex code from using pages to using > folios. I do have some questions. > > - I assume we really do want to base the key on the page offset of the > futex in the file. That is, it's not good enough to base the key > on the folio's index because the folio can be split after setting up > the key, and if it is we'd then fail to find the futex later. Correct. > - In hugetlbfs, it doesn't matter whether the pgoff is based on base > pages or huge page size -- as long as it's consistent between > invocations, everything will work Yes. The patch looks sane, but I need to have a look with brain more awake Thanks, tglx