Revisited the patchset for the version 4.9.0

Among other things:
* BFQ was updated to v8r7 for 4.9.0
* AUFS was updated to version 4.9-20161219
* inotify-increase-max-user-watches.patch was dropped: it is better to
  tune such things from user space instead.
This commit is contained in:
Evgenii Shatokhin 2017-01-05 18:45:46 +03:00
parent b32d565192
commit f1688e3205
8 changed files with 3589 additions and 1585 deletions

View file

@ -1,7 +1,7 @@
From f2ebe596e7d72e96e0fb2be87be90f0b96e6f1b3 Mon Sep 17 00:00:00 2001
From 465ed48c05de63f5bdd34d83915f1b8998a62134 Mon Sep 17 00:00:00 2001
From: Paolo Valente <paolo.valente@unimore.it>
Date: Tue, 7 Apr 2015 13:39:12 +0200
Subject: [PATCH 1/4] block: cgroups, kconfig, build bits for BFQ-v7r11-4.8.0
Subject: [PATCH 1/4] block: cgroups, kconfig, build bits for BFQ-v7r11-4.5.0
Update Kconfig.iosched and do the related Makefile changes to include
kernel configuration options for BFQ. Also increase the number of
@ -74,7 +74,7 @@ index 421bef9..0ee5f0f 100644
endmenu
diff --git a/block/Makefile b/block/Makefile
index 9eda232..4a36683 100644
index 36acdd7..736e91a 100644
--- a/block/Makefile
+++ b/block/Makefile
@@ -18,6 +18,7 @@ obj-$(CONFIG_BLK_DEV_THROTTLING) += blk-throttle.o
@ -86,7 +86,7 @@ index 9eda232..4a36683 100644
obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o
obj-$(CONFIG_BLK_CMDLINE_PARSER) += cmdline-parser.o
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e79055c..931ff1e 100644
index c47c358..1047d99 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -45,7 +45,7 @@ struct pr_ops;
@ -99,5 +99,5 @@ index e79055c..931ff1e 100644
typedef void (rq_end_io_fn)(struct request *, int);
--
2.7.4 (Apple Git-66)
2.10.0

View file

@ -1,8 +1,7 @@
From d9af6fcc4167cbb8433b10bbf3663c8297487f52 Mon Sep 17 00:00:00 2001
From a43c7e21bccd510d72a003e350247b1b4c6b71c3 Mon Sep 17 00:00:00 2001
From: Paolo Valente <paolo.valente@unimore.it>
Date: Thu, 9 May 2013 19:10:02 +0200
Subject: [PATCH 2/4] block: introduce the BFQ-v7r11 I/O sched, to be ported to
4.8.0
Subject: [PATCH 2/4] block: introduce the BFQ-v7r11 I/O sched for 4.5.0
The general structure is borrowed from CFQ, as much of the code for
handling I/O contexts. Over time, several useful features have been
@ -7106,5 +7105,5 @@ index 0000000..2bf54ae
+
+#endif /* _BFQ_H */
--
2.7.4 (Apple Git-66)
2.10.0

View file

@ -1,8 +1,8 @@
From 409e62551360d2802992b0175062237352793a2a Mon Sep 17 00:00:00 2001
From 52135041a6bf118c80a6858f63aff70b325389c4 Mon Sep 17 00:00:00 2001
From: Mauro Andreolini <mauro.andreolini@unimore.it>
Date: Sun, 6 Sep 2015 16:09:05 +0200
Subject: [PATCH 3/4] block, bfq: add Early Queue Merge (EQM) to BFQ-v7r11, to
port to 4.8.0
Subject: [PATCH 3/4] block, bfq: add Early Queue Merge (EQM) to BFQ-v7r11 for
4.5.0
A set of processes may happen to perform interleaved reads, i.e.,requests
whose union would give rise to a sequential read pattern. There are two
@ -1097,5 +1097,5 @@ index 2bf54ae..fcce855 100644
static void bfq_put_queue(struct bfq_queue *bfqq);
static void bfq_dispatch_insert(struct request_queue *q, struct request *rq);
--
2.7.4 (Apple Git-66)
2.10.0

View file

@ -1,8 +1,8 @@
Budget Fair Queueing I/O Scheduler
==================================
This patchset introduces BFQ-v8r4 into Linux 4.8.0.
For further information: http://algogroup.unimore.it/people/paolo/disk_sched/.
This patchset introduces BFQ-v8r7 into Linux 4.9.0.
For further information: http://algogroup.unimore.it/people/paolo/disk_sched/
The overall diffstat is the following:
@ -18,6 +18,120 @@ The overall diffstat is the following:
CHANGELOG
BFQ v8r7
. BUGFIX: make BFQ compile also without hierarchical support
BFQ v8r6
. BUGFIX Removed the check that, when the new queue to set in service
must be selected, the cached next_in_service entities coincide with
the entities chosen by __bfq_lookup_next_entity. This check, issuing
a warning on failure, was wrong, because the cached and the newly
chosen entity could differ in case of a CLASS_IDLE timeout.
. EFFICIENCY IMPROVEMENT (this improvement is related to the above
BUGFIX) The cached next_in_service entities are now really used to
select the next queue to serve when the in-service queue
expires. Before this change, the cached values were used only for
extra (and in general wrong) consistency checks. This caused
additional overhead instead of reducing it.
. EFFICIENCY IMPROVEMENT The next entity to serve, for each level of
the hierarchy, is now updated on every event that may change it,
i.e., on every activation or deactivation of any entity. This finer
granularity is not strictly needed for corectness, because it is
only on queue expirations that BFQ needs to know what are the next
entities to serve. Yet this change makes it possible to implement
optimizations in which it is necessary to know the next queue to
serve before the in-service queue expires.
. SERVICE-ACCURACY IMPROVEMENT The per-device CLASS_IDLE service
timeout has been turned into a much more accurate per-group timeout.
. CODE-QUALITY IMPROVEMENT The non-trivial parts touched by the above
improvements have been partially rewritten, and enriched of
comments, so as to improve their transparency and understandability.
. IMPROVEMENT Ported and improved CFQ commit 41647e7a Before this
improvememtn, BFQ used the same logic for detecting seeky queues for
rotational disks and SSDs. This logic is appropriate for the former,
as it takes into account only inter-request distance, and the latter
is the dominant latency factor on a rotational device. Yet things
change with flash-based devices, where serving a large request still
yields a high throughput, even the request is far from the previous
request served. This commits extends seeky detection to take into
accoutn also this fact with flash-based devices. In particular, this
commit is an improved port of the original commit 41647e7a for CFQ.
. CODE IMPROVEMENT Remove useless parameter from bfq_del_bfqq_busy
. OPTIMIZATION Optimize the update of next_in_service entity. If the
update of the next_in_service candidate entity is triggered by the
activation of an entity, then it is not necessary to perform full
lookups in the active trees to update next_in_service. In fact, it
is enough to check whether the just-activated entity has a higher
priority than next_in_service, or, even if it has the same priority
as next_in_service, is eligible and has a lower virtual finish time
than next_in_service. If this compound condition holds, then the new
entity can be set as the new next_in_service. Otherwise no change is
needed. This commit implements this optimization.
. BUGFIX Fix bug causing occasional loss of weight raising. When a
bfq_queue, say bfqq, is split after a merging with another
bfq_queue, BFQ checks whether it has to restore for bfqq the
weight-raising state that bfqq had before being merged. In
particular, the weight-raising is restored only if, according to the
weight-raising duration decided for bfqq when it started to be
weight-raised (before being merged), bfqq would not have already
finished its weight-raising period. Yet, by mistake, such a
duration was not saved when bfqq is merged. So, if bfqq was freed
and reallocated when it was split, then this duration was wrongly
set to zero on the split. As a consequence, the weight-raising state
of bfqq was wrongly not restored, which caused BFQ to fail in
guaranteeing a low latency to bfqq. This commit fixes this bug by
saving weight-raising duration when bfqq is merged, and correctly
restoring it when bfqq is split.
. BUGFIX Fix wrong reset of in-service entities In-service entities
were reset with an indirect logic, which happened to be even buggy
for some cases. This commit fixes this bug in two important
steps. First, by replacing this indirect logic with a direct logic,
in which all involved entities are immediately reset, with a
bubble-up loop, when the in-service queue is reset. Second, by
restructuring the code related to this change, so as to become not
only correct with respect to this change, but also cleaner and
hopefully clearer.
. CODE IMPROVEMENT Add code to be able to redirect trace log to
console.
. BUGFIX Fixed bug in optimized update of next_in_service entity.
There was a case where bfq_update_next_in_service did not update
next_in_service, even if it might need to be changed: in case of
requeueing or repositioning of the entity that happened to be
pointed exactly by next_in_service. This could result in violation
of service guarantees, because, after a change of timestamps for
such an entity, it might be the case that next_in_service had to
point to a different entity. This commit fixes this bug.
. OPTIMIZATION Stop bubble-up of next_in_service update if possible.
. BUGFIX Fixed a false-positive warning for uninitialized var
BFQ-v8r5
. DOCUMENTATION IMPROVEMENT Added documentation of BFQ benefits, inner
workings, interface and tunables.
. BUGFIX: Replaced max wrongly used for modulo numbers.
. DOCUMENTATION IMPROVEMENT Improved help message in Kconfig.iosched.
. BUGFIX: Removed wrong conversion in use of bfq_fifo_expire.
. CODE IMPROVEMENT Added parentheses to complex macros.
v8r4
. BUGFIX The function bfq_find_set_group may return a NULL pointer,
@ -589,4 +703,3 @@ correctly catch the peak rate with all disks we used
4) added the low latency mechanism described in detail in
http://algogroup.unimore.it/people/paolo/disk_sched/description.php.

View file

@ -1,8 +1,8 @@
diff --git a/Makefile b/Makefile
index 5a493e7..2055c07 100644
index b103777..e942e6a 100644
--- a/Makefile
+++ b/Makefile
@@ -540,9 +540,7 @@ ifeq ($(KBUILD_EXTMOD),)
@@ -555,9 +555,7 @@ ifeq ($(KBUILD_EXTMOD),)
# Carefully list dependencies so we do not try to build scripts twice
# in parallel
PHONY += scripts
@ -13,7 +13,7 @@ index 5a493e7..2055c07 100644
# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/
@@ -986,7 +984,7 @@ prepare0: archprepare FORCE
@@ -1033,7 +1031,7 @@ prepare0: archprepare gcc-plugins
$(Q)$(MAKE) $(build)=.
# All the preparing..
@ -22,7 +22,7 @@ index 5a493e7..2055c07 100644
ifdef CONFIG_STACK_VALIDATION
has_libelf := $(call try-run,\
@@ -1171,13 +1169,8 @@ endif # CONFIG_MODULES
@@ -1268,13 +1266,8 @@ endif # CONFIG_MODULES
CLEAN_DIRS += $(MODVERDIR)
# Directories & files removed with 'make mrproper'
@ -38,7 +38,7 @@ index 5a493e7..2055c07 100644
# clean - Delete most, but leave enough to build external modules
#
@@ -1198,7 +1191,7 @@ clean: archclean vmlinuxclean
@@ -1296,7 +1289,7 @@ clean: archclean vmlinuxclean
#
mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
@ -48,10 +48,10 @@ index 5a493e7..2055c07 100644
PHONY += $(mrproper-dirs) mrproper archmrproper
$(mrproper-dirs):
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index ebced77..7f51efa 100644
index 90a091b..7f51efa 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -19,23 +19,16 @@ endif
@@ -19,25 +19,16 @@ endif
unexport CONFIG_
xconfig: $(obj)/qconf
@ -71,11 +71,13 @@ index ebced77..7f51efa 100644
silentoldconfig: $(obj)/conf
- $(Q)mkdir -p include/config include/generated
- $(Q)test -e include/generated/autoksyms.h || \
- touch include/generated/autoksyms.h
- $< $(silent) --$@ $(Kconfig)
localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
$(Q)mkdir -p include/config include/generated
@@ -81,7 +74,6 @@ simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
@@ -83,7 +74,6 @@ simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
PHONY += $(simple-targets)
$(simple-targets): $(obj)/conf
@ -83,7 +85,7 @@ index ebced77..7f51efa 100644
PHONY += oldnoconfig savedefconfig defconfig
@@ -91,23 +83,10 @@ PHONY += oldnoconfig savedefconfig defconfig
@@ -93,23 +83,10 @@ PHONY += oldnoconfig savedefconfig defconfig
oldnoconfig: olddefconfig
savedefconfig: $(obj)/conf

File diff suppressed because it is too large Load diff

View file

@ -1,20 +0,0 @@
http://bugs.rosalinux.ru/show_bug.cgi?id=4791
It seems, many applications need max_user_watches to be at least 32768.
Let us set the default value of this parameter accordingly.
Signed-off-by: Eugene A. Shatokhin <eugene.shatokhin@rosalab.ru>
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 78a2ca3..ecd1120 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -809,7 +809,7 @@ static int __init inotify_user_setup(void)
inotify_max_queued_events = 16384;
inotify_max_user_instances = 128;
- inotify_max_user_watches = 8192;
+ inotify_max_user_watches = 32768;
return 0;
}