Re: [PATCH v8 19/32] fanotify: Pre-allocate pool of error events
From: Jan Kara <jack@suse.cz>
Date: 2021-10-19 11:52:45
Also in:
linux-ext4, linux-fsdevel
On Tue 19-10-21 08:38:34, Amir Goldstein wrote:
On Tue, Oct 19, 2021 at 3:03 AM Gabriel Krisman Bertazi [off-list ref] wrote:quoted
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 <redacted> --- 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 <amir73il@gmail.com>
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.
quoted
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 <jack@suse.cz> Honza -- Jan Kara [off-list ref] SUSE Labs, CR