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 4F6BFC48BC4 for ; Tue, 20 Feb 2024 12:39:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A33E06B0071; Tue, 20 Feb 2024 07:39:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9E40C6B0074; Tue, 20 Feb 2024 07:39:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 85DFC6B0075; Tue, 20 Feb 2024 07:39:10 -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 73ACB6B0071 for ; Tue, 20 Feb 2024 07:39:10 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 103B44067B for ; Tue, 20 Feb 2024 12:39:10 +0000 (UTC) X-FDA: 81812137260.06.1CE627C Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf19.hostedemail.com (Postfix) with ESMTP id 919491A0014 for ; Tue, 20 Feb 2024 12:39:07 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=hMKPEY0B; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=deho5djI; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=hMKPEY0B; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=deho5djI; dmarc=none; spf=pass (imf19.hostedemail.com: domain of jack@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=jack@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708432748; 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=qVPRzXm5b8XqYXERsjzN5otP0G5DHkxP74ScWIa4OZA=; b=NGUNE4fZs2CDKVnHD30yQ6slo1ZAeJK+MA2v8ALkH78QneR9xy0VJGl8vDR9KR9AUzSFJj x2xYkoCE4cbjH+fxAX8h8XoAA0jvwO8z4i8qfmHZJYzsls+VR3NHCiU2JRjHGyzTnJDdlV rsPkvnTw/LkrTL7LRAoRYkdwEyM+1BA= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=hMKPEY0B; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=deho5djI; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=hMKPEY0B; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=deho5djI; dmarc=none; spf=pass (imf19.hostedemail.com: domain of jack@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=jack@suse.cz ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708432748; a=rsa-sha256; cv=none; b=1jSoQxeOpevPRoOrcTPO6q/ZV7A3vRZ0n1FUkXazR+TGfDL7tLnFRrkzvsvnPjBg6bFUm5 +EP1Rr529kiAQVO7TS3CFg+Xkh3lGaRB/ulbMcN425lfTdPW9e/zT2SIwFhPatAdogKxBR PSXT4WIe34vpkhHX7yVHIQPMdGhgqjM= 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 919491A0014 X-Stat-Signature: 6z88kf7tym3obbiz957rkqzom6guqi9m X-Rspam-User: X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VZpWoD/Gaok18SR6W22nUuJELwfV2bL5O6V/penro8ozhWWm5osJRH/ZL1t/clKmGzpnG8RzCQ1kbTLG/JpMysF25bdojRhd+TSjNy3RTauKrc84f7CBhclI8OflZUeVD8FHKskrq3EsoPkcADNsZ5tHHqZNYFJ+xyjtOiQMpS26tvQGjzPVLg8il+EtsJflQpl+BD5jf1H8EAMmEMCugbKw+f+Nv5McRHwzFUBzvRK2uzUBY1Q+jCdeHCUiSKVrcf6XTe9uzi9DArKjeUUCG9NtKgC7DO90kY79opr0Msfqu0eJMBJrgHvMe37byuMJVeYqvC9xVcvB6S2QdBd5VIo9Lm3WtfW8A== 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: 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