kernel-hacking-2024-linux-s.../Documentation
Lukas Czerner bfff68738f ext4: add support for lazy inode table initialization
When the lazy_itable_init extended option is passed to mke2fs, it
considerably speeds up filesystem creation because inode tables are
not zeroed out.  The fact that parts of the inode table are
uninitialized is not a problem so long as the block group descriptors,
which contain information regarding how much of the inode table has
been initialized, has not been corrupted However, if the block group
checksums are not valid, e2fsck must scan the entire inode table, and
the the old, uninitialized data could potentially cause e2fsck to
report false problems.

Hence, it is important for the inode tables to be initialized as soon
as possble.  This commit adds this feature so that mke2fs can safely
use the lazy inode table initialization feature to speed up formatting
file systems.

This is done via a new new kernel thread called ext4lazyinit, which is
created on demand and destroyed, when it is no longer needed.  There
is only one thread for all ext4 filesystems in the system. When the
first filesystem with inititable mount option is mounted, ext4lazyinit
thread is created, then the filesystem can register its request in the
request list.

This thread then walks through the list of requests picking up
scheduled requests and invoking ext4_init_inode_table(). Next schedule
time for the request is computed by multiplying the time it took to
zero out last inode table with wait multiplier, which can be set with
the (init_itable=n) mount option (default is 10).  We are doing
this so we do not take the whole I/O bandwidth. When the thread is no
longer necessary (request list is empty) it frees the appropriate
structures and exits (and can be created later later by another
filesystem).

We do not disturb regular inode allocations in any way, it just do not
care whether the inode table is, or is not zeroed. But when zeroing, we
have to skip used inodes, obviously. Also we should prevent new inode
allocations from the group, while zeroing is on the way. For that we
take write alloc_sem lock in ext4_init_inode_table() and read alloc_sem
in the ext4_claim_inode, so when we are unlucky and allocator hits the
group which is currently being zeroed, it just has to wait.

This can be suppresed using the mount option no_init_itable.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-10-27 21:30:05 -04:00
..
ABI USB: gadget: storage: optional SCSI WRITE FUA bit 2010-08-10 14:35:42 -07:00
accounting
acpi ACPI: introduce module parameter acpi.aml_debug_output 2010-08-14 23:02:14 -04:00
aoe Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
arm Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
auxdisplay
blackfin Blackfin: document SPI CS limitations with CPHA=0 2010-08-06 12:55:52 -04:00
block cfq-iosched: Documentation help for new tunables 2010-08-23 12:25:29 +02:00
blockdev Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
cdrom Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
cgroups cfq-iosched: Documentation help for new tunables 2010-08-23 12:25:29 +02:00
connector
console
cpu-freq
cpuidle
cris
crypto
development-process Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
device-mapper Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
DocBook docbook: skip files with no docs since they generate scary warnings 2010-09-11 16:49:21 -07:00
driver-model
dvb Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-08-04 15:31:02 -07:00
early-userspace
fault-injection
fb Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
filesystems ext4: add support for lazy inode table initialization 2010-10-27 21:30:05 -04:00
firmware_class firmware: Update hotplug script 2010-08-05 13:53:34 -07:00
frv
hwmon hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval 2010-09-17 17:24:14 +02:00
i2c i2c: Add support for custom probe function 2010-08-11 18:20:56 +02:00
i2o
ia64 Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
ide
infiniband Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
input Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-08-04 15:31:02 -07:00
ioctl Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2010-08-07 17:09:24 -07:00
isdn Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-08-04 15:31:02 -07:00
ja_JP Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
kbuild kbuild: drop unifdef-y support 2010-08-14 22:26:52 +02:00
kdump
ko_KR Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
kvm KVM: Document KVM_GET_SUPPORTED_CPUID2 ioctl 2010-08-02 06:40:50 +03:00
laptops thinkpad-acpi: untangle ACPI/vendor backlight selection 2010-08-16 11:54:50 -04:00
lguest lguest: clean up warnings in demonstration launcher. 2010-08-27 08:39:51 +09:30
m68k
make
mips
misc-devices Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
mmc mmc: add erase, secure erase, trim and secure trim operations 2010-08-12 08:43:30 -07:00
mn10300
mtd Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
namespaces
netlabel
networking Documentation/networking/wavelan.txt: deleted, not in tree 2010-08-11 08:59:18 -07:00
parisc
PCI Documentation: pci.txt: fix typo 2010-07-11 22:17:45 +02:00
pcmcia pcmcia: do not use io_req_t when calling pcmcia_request_io() 2010-08-03 09:04:11 +02:00
power regulator: Update e-mail address for Liam Girdwood 2010-09-01 12:59:34 +01:00
powerpc Documentation: fix ozlabs.org mailing list address 2010-08-20 09:55:41 -07:00
pps
prctl
RCU Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
s390 Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
scheduler
scsi Documentation: move SCSI parameters to their own text file 2010-08-14 16:20:59 -07:00
serial Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
sh
sound ALSA: hda - Add a new hp-laptop model for Conexant 5066, tested on HP G60 2010-09-02 11:49:17 +02:00
sparc
spi spi/ep93xx: implemented driver for Cirrus EP93xx SPI controller 2010-05-25 00:23:16 -06:00
sysctl oom: enable oom tasklist dump by default 2010-08-09 20:44:56 -07:00
telephony Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
thermal
timers Documentation: Add timers/timers-howto.txt 2010-08-04 11:00:45 +02:00
trace vmscan: tracing: add a postprocessing script for reclaim-related ftrace events 2010-08-09 20:45:00 -07:00
uml Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
usb USB: gadget: g_multi: added documentation and INF files 2010-08-10 14:35:37 -07:00
video4linux V4L/DVB: Documentation: add v4l2-controls.txt documenting the new controls API 2010-08-08 23:43:04 -03:00
vm Documentation/vm: fix spelling in page-types.c 2010-08-05 13:21:23 -07:00
w1 Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
watchdog watchdog: docs: add an entry for imx2_wdt 2010-07-01 16:02:55 +00:00
wimax
x86 x86, olpc: Add support for calling into OpenFirmware 2010-06-18 14:54:36 -07:00
zh_CN Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
.gitignore
00-INDEX mmc: add erase, secure erase, trim and secure trim operations 2010-08-12 08:43:30 -07:00
apparmor.txt AppArmor: update Maintainer and Documentation 2010-08-02 15:35:15 +10:00
applying-patches.txt
atomic_ops.txt
bad_memory.txt
basic_profiling.txt
binfmt_misc.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
braille-console.txt
bt8xxgpio.txt
btmrvl.txt
BUG-HUNTING
bus-virt-phys-mapping.txt documentation: fix almost duplicate filenames (IO/io-mapping.txt) 2010-07-20 17:49:30 +00:00
cachetlb.txt
Changes Documentation update broken web addresses 2010-07-11 21:55:42 +02:00
circular-buffers.txt
coccinelle.txt Documentation: fix ubuntu distro name 2010-06-29 15:27:00 +02:00
CodingStyle
cpu-hotplug.txt documentation: fix erroneous email address. 2010-08-11 23:04:10 +09:30
cpu-load.txt
cputopology.txt
credentials.txt CRED: Fix __task_cred()'s lockdep check and banner comment 2010-07-29 15:16:18 -07:00
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt dm: allow autoloading of dm mod 2010-08-12 04:14:05 +01:00
DMA-API-HOWTO.txt Documentation: DMA-API-HOWTO.txt: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-08-14 11:56:46 -07:00
DMA-API.txt dma-mapping: remove dma_is_consistent API 2010-08-11 08:59:21 -07:00
DMA-attributes.txt
DMA-ISA-LPC.txt
dmaengine.txt
dontdiff
dynamic-debug-howto.txt
edac.txt
eisa.txt
email-clients.txt
feature-removal-schedule.txt dma-mapping: add DMA_xxBIT_MASK to feature-removal-schedule.txt 2010-08-11 08:59:22 -07:00
flexible-arrays.txt
futex-requeue-pi.txt
gcov.txt
gpio.txt gpio: doc updates 2010-09-09 18:57:24 -07:00
highuid.txt
HOWTO Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
hw_random.txt
init.txt
initrd.txt
Intel-IOMMU.txt
intel_txt.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
io-mapping.txt
io_ordering.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt docbook: warn on unused doc entries 2010-09-11 16:49:21 -07:00
kernel-docs.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
kernel-parameters.txt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2010-09-07 16:00:17 -07:00
keys-request-key.txt
keys.txt
kmemcheck.txt
kmemleak.txt
kobject.txt
kprobes.txt Documentation: Mention that KProbes is supported on MIPS 2010-08-05 13:26:30 +01:00
kref.txt
ldm.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
leds-class.txt
leds-lp3944.txt
local_ops.txt
lockdep-design.txt
lockstat.txt
logo.gif
logo.txt
magic-number.txt
Makefile
ManagementStyle
mca.txt
md.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
memory-barriers.txt
memory-hotplug.txt
memory.txt
mono.txt
mutex-design.txt mutex: Fix annotations to include it in kernel-locking docbook 2010-09-03 08:19:51 +02:00
nmi_watchdog.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt
padata.txt Documentation/padata.txt: fix typos etc. 2010-08-11 08:59:18 -07:00
parport-lowlevel.txt
parport.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
printk-formats.txt
prio_tree.txt
rbtree.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rt-mutex-design.txt variable name fix to Documentation/rt-mutex-design.txt 2010-06-05 17:39:09 +02:00
rt-mutex.txt
rtc.txt
SAK.txt
SecurityBugs
SELinux.txt
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
SM501.txt
Smack.txt
sparse.txt update email address 2010-07-19 10:56:54 +02:00
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt
SubmitChecklist Documentation: update SubmitChecklist for O=objdir and kconfig testing 2010-05-24 07:31:20 -07:00
SubmittingDrivers Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
SubmittingPatches SubmittingPatches: add more about patch descriptions 2010-08-09 20:45:05 -07:00
svga.txt
sysfs-rules.txt
sysrq.txt
tomoyo.txt TOMOYO: Update version to 2.3.0 2010-08-02 15:35:10 +10:00
unaligned-memory-access.txt
unicode.txt
unshare.txt
VGA-softcursor.txt
vgaarbiter.txt
video-output.txt
volatile-considered-harmful.txt
workqueue.txt workqueue: add documentation 2010-09-13 10:26:52 +02:00
zorro.txt