History

vfs: kill write_super and sync_supers

Finally we can kill the 'sync_supers' kernel thread along with the '->write_super()' superblock operation because all the users are gone. Now every file-system is supposed to self-manage own superblock and its dirty state. The nice thing about killing this thread is that it improves power management. Indeed, 'sync_supers' is a source of monotonic system wake-ups - it woke up every 5 seconds no matter what - even if there were no dirty superblocks and even if there were no file-systems using this service (e.g., btrfs and journalled ext4 do not need it). So it was wasting power most of the time. And because the thread was in the core of the kernel, all systems had to have it. So I am quite happy to make it go away. Interestingly, this thread is a left-over from the pdflush kernel thread which was a self-forking kernel thread responsible for all the write-back in old Linux kernels. It was turned into per-block device BDI threads, and 'sync_supers' was a left-over. Thus, R.I.P, pdflush as well.

Artem Bityutskiy committed 14 years ago

Commit f0cd2db1 parent d42d1da5 files · +0 −97Browse files

Showing the changes to include/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/backing-dev.h +0 −1
  2. include/linux/fs.h +0 −3
include/linux/backing-dev.h+0−1
@@ -124,7 +124,6 @@ void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages, · 123 unmodified lines
124124 void bdi_start_background_writeback(struct backing_dev_info *bdi);
125125 int bdi_writeback_thread(void *data);
126126 int bdi_has_dirty_io(struct backing_dev_info *bdi);
127−void bdi_arm_supers_timer(void);
128127 void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi);
129128 void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2);
130129
include/linux/fs.h+0−3
@@ -1491,7 +1491,6 @@ struct sb_writers { · 1490 unmodified lines
14911491 struct super_block {
14921492 struct list_head s_list; /* Keep this first */
14931493 dev_t s_dev; /* search index; _not_ kdev_t */
1494− unsigned char s_dirt;
14951494 unsigned char s_blocksize_bits;
14961495 unsigned long s_blocksize;
14971496 loff_t s_maxbytes; /* Max file size */
@@ -1861,7 +1860,6 @@ struct super_operations { · 363 unmodified lines
18611860 int (*drop_inode) (struct inode *);
18621861 void (*evict_inode) (struct inode *);
18631862 void (*put_super) (struct super_block *);
1864− void (*write_super) (struct super_block *);
18651863 int (*sync_fs)(struct super_block *sb, int wait);
18661864 int (*freeze_fs) (struct super_block *);
18671865 int (*unfreeze_fs) (struct super_block *);
@@ -2397,7 +2395,6 @@ extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, · 529 unmodified lines
23972395 int datasync);
23982396 extern int vfs_fsync(struct file *file, int datasync);
23992397 extern int generic_write_sync(struct file *file, loff_t pos, loff_t count);
2400−extern void sync_supers(void);
24012398 extern void emergency_sync(void);
24022399 extern void emergency_remount(void);
24032400 #ifdef CONFIG_BLOCK

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t