ext4: Give symbolic names to mballoc criterias
authorOjaswin Mujoo <ojaswin@linux.ibm.com>
Tue, 30 May 2023 12:33:50 +0000 (18:03 +0530)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 26 Jun 2023 23:34:56 +0000 (19:34 -0400)
commitf52f3d2b9fbab73c776f4d3386393e9bbc83b87d
treef31cade6f7a4268ab31a3c714c6f4b5dfcbf240b
parent7e170922f06bf46effa7c57f6035fc463d6edc7e
ext4: Give symbolic names to mballoc criterias

mballoc criterias have historically been called by numbers
like CR0, CR1... however this makes it confusing to understand
what each criteria is about.

Change these criterias from numbers to symbolic names and add
relevant comments. While we are at it, also reformat and add some
comments to ext4_seq_mb_stats_show() for better readability.

Additionally, define CR_FAST which signifies the criteria
below which we can make quicker decisions like:
  * quitting early if (free block < requested len)
  * avoiding to scan free extents smaller than required len.
  * avoiding to initialize buddy cache and work with existing cache
  * limiting prefetches

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/a2dc6ec5aea5e5e68cf8e788c2a964ffead9c8b0.1685449706.git.ojaswin@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/mballoc.c
fs/ext4/mballoc.h
fs/ext4/sysfs.c
include/trace/events/ext4.h