Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1954171rdb; Thu, 7 Dec 2023 13:38:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHZry8P45fWBUmAjKW1Zy3ujKqfaxFq2jqLVeBSKBw2ji06KAILeQmmvJFaHbVwKOa7u08 X-Received: by 2002:a17:907:c928:b0:a1c:7ded:a3e5 with SMTP id ui40-20020a170907c92800b00a1c7deda3e5mr1302994ejc.40.1701985139347; Thu, 07 Dec 2023 13:38:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701985139; cv=none; d=google.com; s=arc-20160816; b=z9ElYvkppcJZTihXYKo1UIZWMInq67/DKUgQt1o5zlJ3/LXhInBo2WyWCkZa6DfSgJ pOSJFpkhQj5dAfEZYUeJ8N5XrrlXHsCP9E5yK8Z2sr1qV722NtWhla0kGKi5SWx19wMM 93vCQVRQFmclBFC8WEnylTSAHxaXKRg0NDe1VD/hTIgMERKOg0IQRTZkTBQDIXW7aNKC 2NYWMgUqS/aVHYrgJOr9RbAhpMoGsvnr0NgucGfhLZWMBAgjXQnJj0+bmtUqPpJblBM2 1g3qU0KV+nJKqswa9obg2WuepdWfkQ2oi+8KeeGjRiD1CcBTg4a4Csm2/GTHilyYAbXe e5fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AWfjo1FCG0zNp8yVCNT7ypjhavVj3uaSeJIY6fXZW/Q=; fh=7eqn9xR+e2R4AiwZ2FrPmJwHnugaffixToMW5SjtyK0=; b=UgQw7CtGE0dU5/n7hl2XfqXeg9Tf8witw8mGqx+lGHqfyjCcefuX13cFBY6sM+wXx4 3iOEROJx1UsCShcBeYlub+jIy2cyVEo1dXg4FhCXIRQ/31GKI7VZz+jDlG+uog3diaJH dE1vTjJ6J9HCyQJK1/Y1z53JE2kjN9j2I/Af2JQsy4VuH1hX72TSICxUdtyHZCxvc1VO WTh7ojvuJ5P6l4beUFp8/0yKHLuJwq+8bJrnpNLIF/Bjf9+BE5aHff3f3Oj/uVQaVyyP hki1JuhIQdNMSfXpwKUlURA7OlXgdLT5UlqSvSYWQqalQDUCaODgpqnkPzOCJ1nqR+fS eI8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=HTuLP32Y; spf=pass (google.com: domain of linux-nfs+bounces-450-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-450-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bl2-20020a170906c24200b00a1d991c3a0asi167594ejb.296.2023.12.07.13.38.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 13:38:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-450-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=HTuLP32Y; spf=pass (google.com: domain of linux-nfs+bounces-450-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-450-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1893D1F2110B for ; Thu, 7 Dec 2023 21:38:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8F1957322; Thu, 7 Dec 2023 21:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="HTuLP32Y" X-Original-To: linux-nfs@vger.kernel.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE5284C3B; Thu, 7 Dec 2023 13:35:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=AWfjo1FCG0zNp8yVCNT7ypjhavVj3uaSeJIY6fXZW/Q=; b=HTuLP32YvRPL+oDE1a2yf5CShL ZnbMwPGwoi+NE6tA3HShRYkj/nFemjITFmj5Ox2jNRUaliUFlLDv9SObg0rJ5oT1WvP7zsjxun+um 1n3KXNVINV0TCPAQxQN4czj4sTVT9Of4N8CX4cSkmDyuAKQVEgGkD44HDRPlI7QwkZdWumu+qgxyR 4Q0V0xPz3VUXOTkIqALZfgsxEDxeNab4xoQyhQsDoX1YlLarOB5VF88kzf1zLdrTvw3UPcsPbwiq3 gQ2O1DcxXwjjfagYLU32Q7kUgRaotlnTsgr99KIFU7JUjVCyTwfXDfsYjgLIdajtZG/qiOgqqpm8d CB99jGig==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rBM1H-004PV4-3e; Thu, 07 Dec 2023 21:34:55 +0000 Date: Thu, 7 Dec 2023 21:34:55 +0000 From: Matthew Wilcox To: David Howells Cc: Jeff Layton , Steve French , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Dominique Martinet , Eric Van Hensbergen , Ilya Dryomov , Christian Brauner , linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 23/59] netfs: Prep to use folio->private for write grouping and streaming write Message-ID: References: <20231207212206.1379128-1-dhowells@redhat.com> <20231207212206.1379128-24-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231207212206.1379128-24-dhowells@redhat.com> On Thu, Dec 07, 2023 at 09:21:30PM +0000, David Howells wrote: > +#define NETFS_FOLIO_INFO 0x1UL /* OR'd with folio->private. */ > + > +static inline struct netfs_folio *netfs_folio_info(struct folio *folio) > +{ > + void *priv = folio_get_private(folio); > + > + if ((unsigned long)priv & NETFS_FOLIO_INFO) > + return (struct netfs_folio *)((unsigned long)priv & ~NETFS_FOLIO_INFO); Often one gets better code by using '-' instead of '& ~', and that's because 'subtract one, then load four bytes from offset 12' can be optimised into 'load four bytes from offset 11' in a way that 'clear the bottom bit, then load four bytes from offset 12' can't be.