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 D5BB8C433FE for ; Wed, 23 Nov 2022 08:36:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 433906B0071; Wed, 23 Nov 2022 03:36:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E3B66B0073; Wed, 23 Nov 2022 03:36:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2AB418E0001; Wed, 23 Nov 2022 03:36:26 -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 1D5546B0071 for ; Wed, 23 Nov 2022 03:36:26 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id DC5091A11C3 for ; Wed, 23 Nov 2022 08:36:25 +0000 (UTC) X-FDA: 80164050330.22.FEEE0CC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id 72C7A40009 for ; Wed, 23 Nov 2022 08:36:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669192583; 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=ZXpADkosxLt0AA2jYCiJ8BdnoYTtcT80XliNqZ/i9wo=; b=RCV+QVPIRHetIsmt6td2j50mzfFZe6+kd63QEgeO0WHcCt9JzurHbHIffwiKu0TIZS5TH5 CXqGblD59VUVGygoZ2dxIPLdlF9FKT6ayRo9GSqIWxRJu9L79guI3+34vi1sCq8sgj5L9w ffr/Q1b+s8QrruPkfkgR7PeSKEdX/p4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-610-hIQ5oH6kPV-Rik523lwo0w-1; Wed, 23 Nov 2022 03:36:19 -0500 X-MC-Unique: hIQ5oH6kPV-Rik523lwo0w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ABFBA802D32; Wed, 23 Nov 2022 08:36:18 +0000 (UTC) Received: from fedora (ovpn-193-217.brq.redhat.com [10.40.193.217]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6C7BD39D7C; Wed, 23 Nov 2022 08:36:17 +0000 (UTC) Date: Wed, 23 Nov 2022 09:36:15 +0100 From: Lukas Czerner To: Christoph Hellwig Cc: "Darrick J. Wong" , Hugh Dickins , Jan Kara , Eric Sandeen , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 1/3] quota: add quota in-memory format support Message-ID: <20221123083615.sj26ptongwhk6wcl@fedora> References: <20221121142854.91109-1-lczerner@redhat.com> <20221121142854.91109-2-lczerner@redhat.com> <20221122142117.epplqsm4ngwx5eyy@fedora> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=RCV+QVPI; spf=pass (imf04.hostedemail.com: domain of lczerner@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=lczerner@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669192585; a=rsa-sha256; cv=none; b=Yv070Q1aX5tKD/QjjMETAbNAa1eYmUCwjqTC2NjwEEGGBc8DYpq+qAcRaDOSUfGq7r+493 f0jtHwI8bJPoR6WQBMbf1MroYD31IC9jY45OjLkarft8J9iF3YflOfv29leKvoPRff41sn tewxsu48E/mzzpLmPiDNNthIoghURPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669192585; 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=ZXpADkosxLt0AA2jYCiJ8BdnoYTtcT80XliNqZ/i9wo=; b=5AN3ISLlFeU+5EPxLbjkeorWryVtlpnVTagymZ3kKef92E7PDu7IZynoiioj+PF2qlb4Zv A73RtnZOR5GvNkcVyIoMWgPMlM79UMyRwJ++CXswhBQ5wYnkaOsz8/LxhHcTUAUPA1ZHZR 1+guszTXJvmuBRaQg74ZYrsQnkKi+xw= X-Rspamd-Queue-Id: 72C7A40009 X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=RCV+QVPI; spf=pass (imf04.hostedemail.com: domain of lczerner@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=lczerner@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam06 X-Stat-Signature: uw46d1uhs3krftgfaa3tnoyyi7idt1g1 X-HE-Tag: 1669192584-98255 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: On Tue, Nov 22, 2022 at 11:58:33PM -0800, Christoph Hellwig wrote: > On Tue, Nov 22, 2022 at 03:21:17PM +0100, Lukas Czerner wrote: > > > That seems like a good idea for memory usage, but I think this might > > > also make the code much simpler, as that just requires fairly trivial > > > quota_read and quota_write methods in the shmem code instead of new > > > support for an in-memory quota file. > > > > You mean like the implementation in the v1 ? > > Having now found it: yes. > Jan, do you have any argument for this, since it was your suggestion? I also think that the implementation is much simpler with in-memory dquots because we will avoid all the hassle with creating and maintaining quota file in a proper format. It's not just reads and writes it's the entire machinery befind it in quota_v2.c and quota_tree.c. But it is true that even with only user modified dquots being non-reclaimable until unmount it could theoreticaly represent a substantial memory consumption. Although I do wonder if this problem is even real. How many user/group ids would you expect extremely heavy quota user would have the limits set for? 1k, 10k, million, or even more? Do you know? -Lukas