Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp376630pxb; Tue, 19 Oct 2021 04:53:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsbbmUHvloggMW1F2msOowMtcBzFzk83ZK4sO+a+WkGJq9LwPtG4/UbVMDx6kAWmosFPFa X-Received: by 2002:a17:906:7810:: with SMTP id u16mr36562792ejm.516.1634644406150; Tue, 19 Oct 2021 04:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634644406; cv=none; d=google.com; s=arc-20160816; b=EEK2KNjxV/oStHJHOTVFlwnOyic1zbn+EFqvtQxxvKuLB07wGui+ko8o/bbCy3gEBR s1Dcfe6wicSfWoUKmakS4IssIxdWjCYK9khodY3tlebCIR7TNdmFKtFm7Sii3/H40T0o kxiOIIy2GsM65CnAOGPpOA5v3aCwvLEbBNiVocPY2lzZYhBfmCXnCzO/GxAD1ZwaOuEW cDDK5vZEnsNN8N3m1H4f01M5D1zFcwJoIb9cvf3BMVoah70IwY30EioVxpJWN9cDJ79O BWRLfG8itxNNBiJ/mPmON+tNTevo6f5ZOtV4k/iYGh8KcWcW2M0Ca4lT+UB0SUiTHbk9 /PhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=vZ6SqWivaR7J+dDBdJR9QxTbgDItdfol945P7TBlZUE=; b=qkmDW7pQYY2QCysc9cJXv4OLOMb85O/8lfwjq0wKPwsWT3LIEoGAOZVuphpFIBuiS8 Zj8Hb+LAiKWnfEmdiERCBGiLEGB9qkvWdeY68e9+wu4kpLuFbeaFW31GBZwMhV6BGQ3m mO0gef+PqCChpjFsJCYhWs6tLwG+sCLzRK3YSepdIBTHjVEdKQ2av4RTbNmOCKE3JD6O 1Axmoxa1Ixk11Q7BE2um1O9R09zaUsiWbj7n2P7r9cRfzZ9pXEf325MrCwBi2lFHc3iQ OifCvUeLDSuQx4YEjSJOnlqjz7Rw4DCQquGbkOQ0EvnCVFXqz5KehHBKyg9yemA8o5nU /EhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=zObd7a2r; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=baSY88Uo; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x44si26852721ede.131.2021.10.19.04.52.56; Tue, 19 Oct 2021 04:53:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=zObd7a2r; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=baSY88Uo; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235400AbhJSLy5 (ORCPT + 99 others); Tue, 19 Oct 2021 07:54:57 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:44706 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbhJSLy4 (ORCPT ); Tue, 19 Oct 2021 07:54:56 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id CBAD31FCA1; Tue, 19 Oct 2021 11:52:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1634644362; 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=vZ6SqWivaR7J+dDBdJR9QxTbgDItdfol945P7TBlZUE=; b=zObd7a2rc4SIjVkSCsPQj8lWgOtFi1QSA+hc781Sp22V8T6PUnBd+CQtyfxd9V+3ueKJ9z 5a//M4nSYMqNDrorLvvlWDiz2k56/W7ZGkImcpcx0hn83yWjLEDEQUrsm+WAndfceOZ23S 2cT6EIYIQHit+A9Ev+9slHYj237qjkE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1634644362; 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=vZ6SqWivaR7J+dDBdJR9QxTbgDItdfol945P7TBlZUE=; b=baSY88UoYqUEcUbmOPWUfM/aisxoqpCiG+aQBVPb4crWXUydpQdDDDa6IknUrL7wBmIaWB NgjQ/B2O9oFVmoCQ== Received: from quack2.suse.cz (unknown [10.100.200.198]) by relay2.suse.de (Postfix) with ESMTP id B83E1A3B85; Tue, 19 Oct 2021 11:52:42 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 979131E0983; Tue, 19 Oct 2021 13:52:42 +0200 (CEST) Date: Tue, 19 Oct 2021 13:52:42 +0200 From: Jan Kara To: Amir Goldstein Cc: Gabriel Krisman Bertazi , Jan Kara , "Darrick J. Wong" , Theodore Tso , Dave Chinner , David Howells , Khazhismel Kumykov , linux-fsdevel , Ext4 , Linux API , kernel@collabora.com Subject: Re: [PATCH v8 19/32] fanotify: Pre-allocate pool of error events Message-ID: <20211019115242.GH3255@quack2.suse.cz> References: <20211019000015.1666608-1-krisman@collabora.com> <20211019000015.1666608-20-krisman@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue 19-10-21 08:38:34, Amir Goldstein wrote: > On Tue, Oct 19, 2021 at 3:03 AM Gabriel Krisman Bertazi > wrote: > > > > Pre-allocate slots for file system errors to have greater chances of > > succeeding, since error events can happen in GFP_NOFS context. This > > patch introduces a group-wide mempool of error events, shared by all > > FAN_FS_ERROR marks in this group. > > > > For now, just allocate 128 positions. A future patch allows this > > array to be dynamically resized when a new mark is added. > > > > Signed-off-by: Gabriel Krisman Bertazi > > > > --- > > Changes since v7: > > - Expand limit to 128. (Amir) > > I am not sure if Jan was also on board with this request but otherwise > > Reviewed-by: Amir Goldstein I don't really care. I don't see a strong reason to go above original 32 (so I'd slightly prefer that) but OTOH I also don't think those few KB per notification group using FS_ERROR matter since I don't expect such groups to be that common. > > diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c > > index 66ee3c2805c7..f77581c5b97f 100644 > > --- a/fs/notify/fanotify/fanotify_user.c > > +++ b/fs/notify/fanotify/fanotify_user.c > > @@ -30,6 +30,7 @@ > > #define FANOTIFY_DEFAULT_MAX_EVENTS 16384 > > #define FANOTIFY_OLD_DEFAULT_MAX_MARKS 8192 > > #define FANOTIFY_DEFAULT_MAX_GROUPS 128 > > +#define FANOTIFY_DEFAULT_MAX_FEE_POOL 128 Perhaps FANOTIFY_DEFAULT_FEE_POOL_SIZE would better describe what this constant is about? Otherwise feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR