Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1700530rdb; Tue, 20 Feb 2024 04:39:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX9qDwGN3f9kjYz7/NaY9LhP1gMRjCX91IwVtVCjiFk+2JK506NIHGRBPiFU1Q4Za08KmJe92rq2C2G+PHoesa4Q/MJEFCEkMqsUtkEJw== X-Google-Smtp-Source: AGHT+IFgYivjLN6m47Ze/Tul4+VrtCyjbtn2RlrfaIsfNrqiz4EQGNq9pqiQS+jmaVj7TcNflIUk X-Received: by 2002:a17:906:b154:b0:a3e:cb72:b6fd with SMTP id bt20-20020a170906b15400b00a3ecb72b6fdmr2540404ejb.23.1708432764378; Tue, 20 Feb 2024 04:39:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708432764; cv=pass; d=google.com; s=arc-20160816; b=vjKdEQl2EVRikoZIDePrHIRH2Pc36IlW/M55CKI1ASG47/89QtYOLJHV5uWt11bMDN m+M96RvvapFAGMFl4bPgh453Sc1zoesJ7yq2ypJdJaclnTjio4O9egOUcOlQEDBzCMvh F4YkgBF4j+SYVjMWcwhAXOzAxDLt1UpnmfVeoYAhoDbQNwWQeMry8PzkDBl78ubA23DA OQeo0IsgAgA3Ic0WCxEvPX1+ERGKUBBoxLxJHUMK6nCX84VhgMugdvAmkQdK2Jk4nNrA 3HKG4gv5fh0DGocetO91vLBvCvxAUFOYuZalrH9Gnhgch3zFJ+BQ7VY4lpOESl1KJ2s2 iKMA== ARC-Message-Signature: i=2; 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:dkim-signature:dkim-signature :dkim-signature; bh=qVPRzXm5b8XqYXERsjzN5otP0G5DHkxP74ScWIa4OZA=; fh=nyZL6QkXO1+BfJ/gWQTkfmYJvSddjJcnymwhg6uNgkU=; b=xQPty56HSWQIWiXbgB1Cs9JjeLKoYkoSHMbJ1SNBMMXRh3DsgEd7JauFufcUaPQlST lKNsoP+vnu9K5+F0xHPiWP/dXFyH4H264mgOphfQqkLxiD2JaJ0snDH0kejHZ6O1iJts fwQ+xSH5KsNuqQ+tGeTxPzJoLLhA9+Z3e3RRQ1PGxnjSNMhzQcDaLGcSSFoQmsCZVlGE BwMnjkvop9P72e0faUZoYwkXUm6a69mBtr2/w/X8yLkasCnlWlRuBEYvnZF6edXI5CHx aojhGDgINW7afC+hy4maEP5U3iuiPFL239XbJRkhkvsOnDLUa5rFFB84NMn9JXNUY3Bf xq3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=hMKPEY0B; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=hMKPEY0B; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-73029-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73029-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 dp6-20020a170906c14600b00a3f0dfac2f6si340346ejc.1022.2024.02.20.04.39.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 04:39:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73029-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=@suse.cz header.s=susede2_rsa header.b=hMKPEY0B; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=hMKPEY0B; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-73029-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73029-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 EF6A41F24242 for ; Tue, 20 Feb 2024 12:39:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C11169D0C; Tue, 20 Feb 2024 12:39:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="hMKPEY0B"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="deho5djI"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="hMKPEY0B"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="deho5djI" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1C6C482FA; Tue, 20 Feb 2024 12:39:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708432749; cv=none; b=ZsQr19jZnexN5x3DyFnbCL8DJmYT1HJO1i+5dBIj6XBiTL4/nFrY8EbSV8t62AD5RTvSe1Rt3tyUuA4enXNiDJV7g+qx18khMSbAWi0nrZ+wiho8SuxVpjzkg4aD8bFeGseqxUWe739bb8xaW9cWaM3kqF8gnhTY0Rvj84FR6DE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708432749; c=relaxed/simple; bh=v9niZvFxoxDsNa48gJ+crQZJYJbsm2uY1lw8ejLcKjU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aFm36BaIJgCgwS8oW2X75CJdxDZyWwUCrD+UWdSFnMQLceB/SI6peRN4GF02d8BBX1f/6Ptzrtivpjq4dEfYIoExQy+/1Cm2MQgNFc00EY+c5KhYpKP1MJZuq5A/8hGNyAI4+X3a5/xPGrOPuG82M9NvPMTiFM6CPozzWBn46hM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=hMKPEY0B; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=deho5djI; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=hMKPEY0B; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=deho5djI; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A835E2207A; Tue, 20 Feb 2024 12:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1708432745; h=from:from:reply-to: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=qVPRzXm5b8XqYXERsjzN5otP0G5DHkxP74ScWIa4OZA=; b=hMKPEY0BvU4HM/T78Wkf+bOqlpsOlC2pLpwBJFmsw6jjy9PwvBaEW2NdhPRcCd8dY5DmzW CazCrehqwpv5dotrWQubx7hL0h37lltDA066/fIkBHLUVLxVeYEkptMevH3y4kUSstybnk YnDB4+XRxmglKES2BvQfyKOESnIusIM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1708432745; h=from:from:reply-to: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=qVPRzXm5b8XqYXERsjzN5otP0G5DHkxP74ScWIa4OZA=; b=deho5djI1FbNMFwU7ToyCHQwCmm7WQpGI9k3Saoold7z7pnrRAZumZIa6ixUmvOUX24Jkd FDBaWs1ok/Z/fbBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1708432745; h=from:from:reply-to: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=qVPRzXm5b8XqYXERsjzN5otP0G5DHkxP74ScWIa4OZA=; b=hMKPEY0BvU4HM/T78Wkf+bOqlpsOlC2pLpwBJFmsw6jjy9PwvBaEW2NdhPRcCd8dY5DmzW CazCrehqwpv5dotrWQubx7hL0h37lltDA066/fIkBHLUVLxVeYEkptMevH3y4kUSstybnk YnDB4+XRxmglKES2BvQfyKOESnIusIM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1708432745; h=from:from:reply-to: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=qVPRzXm5b8XqYXERsjzN5otP0G5DHkxP74ScWIa4OZA=; b=deho5djI1FbNMFwU7ToyCHQwCmm7WQpGI9k3Saoold7z7pnrRAZumZIa6ixUmvOUX24Jkd FDBaWs1ok/Z/fbBw== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 9A6001358A; Tue, 20 Feb 2024 12:39:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id Od6lJWmd1GVKFgAAn2gu4w (envelope-from ); Tue, 20 Feb 2024 12:39:05 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 486BEA0807; Tue, 20 Feb 2024 13:39:05 +0100 (CET) Date: Tue, 20 Feb 2024 13:39:05 +0100 From: Jan Kara To: Daniel Gomez Cc: Hugh Dickins , "viro@zeniv.linux.org.uk" , "brauner@kernel.org" , "jack@suse.cz" , "akpm@linux-foundation.org" , "dagmcr@gmail.com" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "willy@infradead.org" , "hch@infradead.org" , "mcgrof@kernel.org" , Pankaj Raghav , "gost.dev@samsung.com" Subject: Re: [RFC PATCH 0/9] shmem: fix llseek in hugepages Message-ID: <20240220123905.qdjn2x3dtryklibl@quack3> References: <20240209142901.126894-1-da.gomez@samsung.com> <25i3n46nanffixvzdby6jwxgboi64qnleixz33dposwuwmzj7p@6yvgyakozars> Precedence: bulk X-Mailing-List: linux-kernel@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: Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.80 X-Spamd-Result: default: False [-0.80 / 50.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_TWELVE(0.00)[15]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_CC(0.00)[google.com,zeniv.linux.org.uk,kernel.org,suse.cz,linux-foundation.org,gmail.com,vger.kernel.org,kvack.org,infradead.org,samsung.com]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[40.24%] X-Spam-Flag: NO On Tue 20-02-24 10:26:48, Daniel Gomez wrote: > On Mon, Feb 19, 2024 at 02:15:47AM -0800, Hugh Dickins wrote: > I'm uncertain when we may want to be more elastic. In the case of XFS with iomap > and support for large folios, for instance, we are 'less' elastic than here. So, > what exactly is the rationale behind wanting shmem to be 'more elastic'? Well, but if you allocated space in larger chunks - as is the case with ext4 and bigalloc feature, you will be similarly 'elastic' as tmpfs with large folio support... So simply the granularity of allocation of underlying space is what matters here. And for tmpfs the underlying space happens to be the page cache. > If we ever move shmem to large folios [1], and we use them in an oportunistic way, > then we are going to be more elastic in the default path. > > [1] https://lore.kernel.org/all/20230919135536.2165715-1-da.gomez@samsung.com > > In addition, I think that having this block granularity can benefit quota > support and the reclaim path. For example, in the generic/100 fstest, around > ~26M of data are reported as 1G of used disk when using tmpfs with huge pages. And I'd argue this is a desirable thing. If 1G worth of pages is attached to the inode, then quota should be accounting 1G usage even though you've written just 26MB of data to the file. Quota is about constraining used resources, not about "how much did I write to the file". Honza -- Jan Kara SUSE Labs, CR