diff --git a/.abf.yml b/.abf.yml index b5ea8ac..6b56a3c 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,3 +1,3 @@ sources: - linux-4.10.tar.xz: 1375424721130e93dd6f723537a4db9039a02643 - patch-4.10.16.xz: 3dc76efb3486e7a333bc924d5ea3f7437d3b0fcd + linux-4.11.tar.xz: 0d2594b7aa3e79521f229569f9e14dc56bdcbd78 + patch-4.11.3.xz: cd617485a7ed71e2bd59c498efa6a84b4cc286ec diff --git a/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.10..patch b/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.11..patch similarity index 90% rename from 0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.10..patch rename to 0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.11..patch index 45f4fd2..4555daa 100644 --- a/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.10..patch +++ b/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.11..patch @@ -1,7 +1,7 @@ -From 8500f47272575b4616beb487c483019248d8c501 Mon Sep 17 00:00:00 2001 +From a0bd3c561ad7ec10c22a5ca345c6e4c5df117e41 Mon Sep 17 00:00:00 2001 From: Paolo Valente Date: Tue, 7 Apr 2015 13:39:12 +0200 -Subject: [PATCH 1/4] block: cgroups, kconfig, build bits for BFQ-v7r11-4.10.0 +Subject: [PATCH 1/4] block: cgroups, kconfig, build bits for BFQ-v7r11-4.11.0 Update Kconfig.iosched and do the related Makefile changes to include kernel configuration options for BFQ. Also increase the number of @@ -17,7 +17,7 @@ Signed-off-by: Arianna Avanzini 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched -index 421bef9..0ee5f0f 100644 +index 58fc868..bb47b1a 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched @@ -39,6 +39,27 @@ config CFQ_GROUP_IOSCHED @@ -72,24 +72,24 @@ index 421bef9..0ee5f0f 100644 + default "bfq" if DEFAULT_BFQ default "noop" if DEFAULT_NOOP - endmenu + config MQ_IOSCHED_DEADLINE diff --git a/block/Makefile b/block/Makefile -index a827f98..3b14703 100644 +index 081bb68..91869f2 100644 --- a/block/Makefile +++ b/block/Makefile -@@ -18,6 +18,7 @@ obj-$(CONFIG_BLK_DEV_THROTTLING) += blk-throttle.o - obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o +@@ -20,6 +20,7 @@ obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o + obj-$(CONFIG_MQ_IOSCHED_DEADLINE) += mq-deadline.o +obj-$(CONFIG_IOSCHED_BFQ) += bfq-iosched.o 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 1ca8e8f..8e2d6ed 100644 +index 01a696b..29d537d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h -@@ -47,7 +47,7 @@ struct rq_wb; +@@ -48,7 +48,7 @@ struct rq_wb; * Maximum number of blkcg policies allowed to be registered concurrently. * Defined here to simplify include dependency. */ diff --git a/0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.10.0.patch b/0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.11.0.patch similarity index 99% rename from 0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.10.0.patch rename to 0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.11.0.patch index 0812a57..0c46a2e 100644 --- a/0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.10.0.patch +++ b/0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.11.0.patch @@ -1,7 +1,7 @@ -From 2f56e91506b329ffc29d0f184924ad0123c9ba9e Mon Sep 17 00:00:00 2001 +From ce617fdef48078f52afeec078dacbe7ac9d74588 Mon Sep 17 00:00:00 2001 From: Paolo Valente Date: Thu, 9 May 2013 19:10:02 +0200 -Subject: [PATCH 2/4] block: introduce the BFQ-v7r11 I/O sched for 4.10.0 +Subject: [PATCH 2/4] block: introduce the BFQ-v7r11 I/O sched for 4.11.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 @@ -69,7 +69,7 @@ Signed-off-by: Arianna Avanzini create mode 100644 block/bfq.h diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched -index 0ee5f0f..f78cd1a 100644 +index bb47b1a..b1ab0ca 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched @@ -51,14 +51,12 @@ config IOSCHED_BFQ diff --git a/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch b/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch index 28eeb1f..8a03246 100644 --- a/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch +++ b/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch @@ -1,8 +1,8 @@ -From e4d9bed2dfdec562b23491e44602c89c4a2a5ea4 Mon Sep 17 00:00:00 2001 +From d1d10983cb4b593e7970e541c4c2721bbbdc21c8 Mon Sep 17 00:00:00 2001 From: Mauro Andreolini Date: Sun, 6 Sep 2015 16:09:05 +0200 Subject: [PATCH 3/4] block, bfq: add Early Queue Merge (EQM) to BFQ-v7r11 for - 4.10.0 + 4.11.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 diff --git a/0004-Turn-BFQ-v7r11-for-4.10.0-into-BFQ-v8r8-for-4.10.0.patch b/0004-blk-bfq-turn-BFQ-v7r11-for-4.11.0-into-BFQ-v8r11-for.patch similarity index 94% rename from 0004-Turn-BFQ-v7r11-for-4.10.0-into-BFQ-v8r8-for-4.10.0.patch rename to 0004-blk-bfq-turn-BFQ-v7r11-for-4.11.0-into-BFQ-v8r11-for.patch index 48e64d9..f2a72fa 100644 --- a/0004-Turn-BFQ-v7r11-for-4.10.0-into-BFQ-v8r8-for-4.10.0.patch +++ b/0004-blk-bfq-turn-BFQ-v7r11-for-4.11.0-into-BFQ-v8r11-for.patch @@ -1,18 +1,19 @@ -From b782bbfcb5e08e92c0448d0c6a870b44db198837 Mon Sep 17 00:00:00 2001 +From f5d5a33bf31028abb87ff8e36b695aa18b284c17 Mon Sep 17 00:00:00 2001 From: Paolo Valente Date: Mon, 16 May 2016 11:16:17 +0200 -Subject: [PATCH 4/4] Turn BFQ-v7r11 for 4.10.0 into BFQ-v8r8 for 4.10.0 +Subject: [PATCH 4/4] blk, bfq: turn BFQ-v7r11 for 4.11.0 into BFQ-v8r11 for + 4.11.0 Signed-off-by: Paolo Valente --- Documentation/block/00-INDEX | 2 + Documentation/block/bfq-iosched.txt | 530 ++++++ block/Kconfig.iosched | 18 +- - block/bfq-cgroup.c | 510 +++--- - block/bfq-iosched.c | 3414 ++++++++++++++++++++++------------- - block/bfq-sched.c | 1290 ++++++++++--- - block/bfq.h | 800 ++++---- - 7 files changed, 4390 insertions(+), 2174 deletions(-) + block/bfq-cgroup.c | 511 +++--- + block/bfq-iosched.c | 3468 ++++++++++++++++++++++------------- + block/bfq-sched.c | 1400 +++++++++++--- + block/bfq.h | 804 ++++---- + 7 files changed, 4535 insertions(+), 2198 deletions(-) create mode 100644 Documentation/block/bfq-iosched.txt diff --git a/Documentation/block/00-INDEX b/Documentation/block/00-INDEX @@ -564,7 +565,7 @@ index 0000000..13b5248 + http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite- + results.pdf diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched -index f78cd1a..f2cd945 100644 +index b1ab0ca..99a4226 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched @@ -43,20 +43,20 @@ config IOSCHED_BFQ @@ -598,7 +599,7 @@ index f78cd1a..f2cd945 100644 choice prompt "Default I/O scheduler" diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c -index 0367996..0125275 100644 +index 0367996..39daaf4 100644 --- a/block/bfq-cgroup.c +++ b/block/bfq-cgroup.c @@ -7,7 +7,9 @@ @@ -1134,14 +1135,14 @@ index 0367996..0125275 100644 */ static void bfq_pd_offline(struct blkg_policy_data *pd) { -@@ -776,10 +767,16 @@ static void bfq_pd_offline(struct blkg_policy_data *pd) +@@ -776,10 +767,15 @@ static void bfq_pd_offline(struct blkg_policy_data *pd) BUG_ON(bfqg->sched_data.next_in_service); BUG_ON(bfqg->sched_data.in_service_entity); - __bfq_deactivate_entity(entity, 0); + __bfq_deactivate_entity(entity, false); bfq_put_async_queues(bfqd, bfqg); - BUG_ON(entity->tree); +- BUG_ON(entity->tree); + /* + * @blkg is going offline and will be ignored by @@ -1152,7 +1153,7 @@ index 0367996..0125275 100644 bfqg_stats_xfer_dead(bfqg); } -@@ -789,46 +786,35 @@ static void bfq_end_wr_async(struct bfq_data *bfqd) +@@ -789,46 +785,35 @@ static void bfq_end_wr_async(struct bfq_data *bfqd) list_for_each_entry(blkg, &bfqd->queue->blkg_list, q_node) { struct bfq_group *bfqg = blkg_to_bfqg(blkg); @@ -1210,7 +1211,7 @@ index 0367996..0125275 100644 if (val < BFQ_MIN_WEIGHT || val > BFQ_MAX_WEIGHT) return ret; -@@ -873,13 +859,18 @@ static int bfqio_cgroup_weight_write(struct cgroup_subsys_state *css, +@@ -873,13 +858,18 @@ static int bfqio_cgroup_weight_write(struct cgroup_subsys_state *css, return ret; } @@ -1234,7 +1235,7 @@ index 0367996..0125275 100644 } static int bfqg_print_stat(struct seq_file *sf, void *v) -@@ -899,16 +890,17 @@ static int bfqg_print_rwstat(struct seq_file *sf, void *v) +@@ -899,16 +889,17 @@ static int bfqg_print_rwstat(struct seq_file *sf, void *v) static u64 bfqg_prfill_stat_recursive(struct seq_file *sf, struct blkg_policy_data *pd, int off) { @@ -1256,7 +1257,7 @@ index 0367996..0125275 100644 return __blkg_prfill_rwstat(sf, pd, &sum); } -@@ -928,6 +920,41 @@ static int bfqg_print_rwstat_recursive(struct seq_file *sf, void *v) +@@ -928,6 +919,41 @@ static int bfqg_print_rwstat_recursive(struct seq_file *sf, void *v) return 0; } @@ -1298,7 +1299,7 @@ index 0367996..0125275 100644 static u64 bfqg_prfill_avg_queue_size(struct seq_file *sf, struct blkg_policy_data *pd, int off) { -@@ -964,38 +991,15 @@ bfq_create_group_hierarchy(struct bfq_data *bfqd, int node) +@@ -964,38 +990,15 @@ bfq_create_group_hierarchy(struct bfq_data *bfqd, int node) return blkg_to_bfqg(bfqd->queue->root_blkg); } @@ -1342,7 +1343,7 @@ index 0367996..0125275 100644 { .name = "bfq.time", .private = offsetof(struct bfq_group, stats.time), -@@ -1003,18 +1007,17 @@ static struct cftype bfqio_files[] = { +@@ -1003,18 +1006,17 @@ static struct cftype bfqio_files[] = { }, { .name = "bfq.sectors", @@ -1366,7 +1367,7 @@ index 0367996..0125275 100644 }, { .name = "bfq.io_service_time", -@@ -1045,18 +1048,17 @@ static struct cftype bfqio_files[] = { +@@ -1045,18 +1047,17 @@ static struct cftype bfqio_files[] = { }, { .name = "bfq.sectors_recursive", @@ -1390,7 +1391,7 @@ index 0367996..0125275 100644 }, { .name = "bfq.io_service_time_recursive", -@@ -1102,31 +1104,42 @@ static struct cftype bfqio_files[] = { +@@ -1102,31 +1103,42 @@ static struct cftype bfqio_files[] = { .private = offsetof(struct bfq_group, stats.dequeue), .seq_show = bfqg_print_stat, }, @@ -1453,7 +1454,7 @@ index 0367996..0125275 100644 static void bfq_init_entity(struct bfq_entity *entity, struct bfq_group *bfqg) -@@ -1142,35 +1155,22 @@ static void bfq_init_entity(struct bfq_entity *entity, +@@ -1142,35 +1154,22 @@ static void bfq_init_entity(struct bfq_entity *entity, entity->sched_data = &bfqg->sched_data; } @@ -1496,7 +1497,7 @@ index 0367996..0125275 100644 static struct bfq_group * diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c -index cf3e9b1..e5dfa5a 100644 +index cf3e9b1..a56888e 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -1,5 +1,5 @@ @@ -1571,9 +1572,13 @@ index cf3e9b1..e5dfa5a 100644 * * http://algogroup.unimo.it/people/paolo/disk_sched/bf1-v1-suite-results.pdf * -@@ -70,24 +79,23 @@ - #include "bfq.h" +@@ -67,27 +76,26 @@ + #include + #include + #include +-#include "bfq.h" #include "blk.h" ++#include "bfq.h" -/* Expiration time of sync (0) and async (1) requests, in jiffies. */ -static const int bfq_fifo_expire[2] = { HZ / 4, HZ / 8 }; @@ -1704,7 +1709,30 @@ index cf3e9b1..e5dfa5a 100644 } /* -@@ -505,13 +510,45 @@ static void bfq_weights_tree_remove(struct bfq_data *bfqd, +@@ -469,6 +474,22 @@ static void bfq_weights_tree_add(struct bfq_data *bfqd, + + entity->weight_counter = kzalloc(sizeof(struct bfq_weight_counter), + GFP_ATOMIC); ++ ++ /* ++ * In the unlucky event of an allocation failure, we just ++ * exit. This will cause the weight of entity to not be ++ * considered in bfq_differentiated_weights, which, in its ++ * turn, causes the scenario to be deemed wrongly symmetric in ++ * case entity's weight would have been the only weight making ++ * the scenario asymmetric. On the bright side, no unbalance ++ * will however occur when entity becomes inactive again (the ++ * invocation of this function is triggered by an activation ++ * of entity). In fact, bfq_weights_tree_remove does nothing ++ * if !entity->weight_counter. ++ */ ++ if (unlikely(!entity->weight_counter)) ++ return; ++ + entity->weight_counter->weight = entity->weight; + rb_link_node(&entity->weight_counter->weights_node, parent, new); + rb_insert_color(&entity->weight_counter->weights_node, root); +@@ -505,13 +526,45 @@ static void bfq_weights_tree_remove(struct bfq_data *bfqd, entity->weight_counter = NULL; } @@ -1751,7 +1779,7 @@ index cf3e9b1..e5dfa5a 100644 BUG_ON(RB_EMPTY_NODE(&last->rb_node)); -@@ -533,9 +570,19 @@ static struct request *bfq_find_next_rq(struct bfq_data *bfqd, +@@ -533,9 +586,19 @@ static struct request *bfq_find_next_rq(struct bfq_data *bfqd, static unsigned long bfq_serv_to_charge(struct request *rq, struct bfq_queue *bfqq) { @@ -1774,7 +1802,7 @@ index cf3e9b1..e5dfa5a 100644 } /** -@@ -576,7 +623,7 @@ static void bfq_updated_next_req(struct bfq_data *bfqd, +@@ -576,7 +639,7 @@ static void bfq_updated_next_req(struct bfq_data *bfqd, entity->budget = new_budget; bfq_log_bfqq(bfqd, bfqq, "updated next rq: new budget %lu", new_budget); @@ -1783,7 +1811,7 @@ index cf3e9b1..e5dfa5a 100644 } } -@@ -590,12 +637,23 @@ static unsigned int bfq_wr_duration(struct bfq_data *bfqd) +@@ -590,12 +653,23 @@ static unsigned int bfq_wr_duration(struct bfq_data *bfqd) dur = bfqd->RT_prod; do_div(dur, bfqd->peak_rate); @@ -1812,7 +1840,7 @@ index cf3e9b1..e5dfa5a 100644 } static void -@@ -605,31 +663,31 @@ bfq_bfqq_resume_state(struct bfq_queue *bfqq, struct bfq_io_cq *bic) +@@ -605,31 +679,31 @@ bfq_bfqq_resume_state(struct bfq_queue *bfqq, struct bfq_io_cq *bic) bfq_mark_bfqq_idle_window(bfqq); else bfq_clear_bfqq_idle_window(bfqq); @@ -1864,7 +1892,7 @@ index cf3e9b1..e5dfa5a 100644 } static int bfqq_process_refs(struct bfq_queue *bfqq) -@@ -639,7 +697,7 @@ static int bfqq_process_refs(struct bfq_queue *bfqq) +@@ -639,7 +713,7 @@ static int bfqq_process_refs(struct bfq_queue *bfqq) lockdep_assert_held(bfqq->bfqd->queue->queue_lock); io_refs = bfqq->allocated[READ] + bfqq->allocated[WRITE]; @@ -1873,7 +1901,7 @@ index cf3e9b1..e5dfa5a 100644 BUG_ON(process_refs < 0); return process_refs; } -@@ -654,6 +712,7 @@ static void bfq_reset_burst_list(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -654,6 +728,7 @@ static void bfq_reset_burst_list(struct bfq_data *bfqd, struct bfq_queue *bfqq) hlist_del_init(&item->burst_list_node); hlist_add_head(&bfqq->burst_list_node, &bfqd->burst_list); bfqd->burst_size = 1; @@ -1881,7 +1909,7 @@ index cf3e9b1..e5dfa5a 100644 } /* Add bfqq to the list of queues in current burst (see bfq_handle_burst) */ -@@ -662,6 +721,10 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -662,6 +737,10 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) /* Increment burst size to take into account also bfqq */ bfqd->burst_size++; @@ -1892,7 +1920,7 @@ index cf3e9b1..e5dfa5a 100644 if (bfqd->burst_size == bfqd->bfq_large_burst_thresh) { struct bfq_queue *pos, *bfqq_item; struct hlist_node *n; -@@ -671,15 +734,19 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -671,15 +750,19 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) * other to consider this burst as large. */ bfqd->large_burst = true; @@ -1913,7 +1941,7 @@ index cf3e9b1..e5dfa5a 100644 /* * From now on, and until the current burst finishes, any -@@ -691,67 +758,79 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -691,67 +774,79 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) hlist_for_each_entry_safe(pos, n, &bfqd->burst_list, burst_list_node) hlist_del_init(&pos->burst_list_node); @@ -2027,8 +2055,7 @@ index cf3e9b1..e5dfa5a 100644 + * enjoy weight raising as expected. Fortunately these false positives + * are very rare. They typically occur if some service happens to + * start doing I/O exactly when the interactive task starts. - * -- * . when the very first queue is activated, the queue is inserted into the ++ * + * Turning back to the next function, it implements all the steps + * needed to detect the occurrence of a large burst and to properly + * mark all the queues belonging to it (so that they can then be @@ -2037,12 +2064,13 @@ index cf3e9b1..e5dfa5a 100644 + * burst in progress. The list is then used to mark these queues as + * belonging to a large burst if the burst does become large. The main + * steps are the following. -+ * + * +- * . when the very first queue is activated, the queue is inserted into the + * . when the very first queue is created, the queue is inserted into the * list (as it could be the first queue in a possible burst) * * . if the current burst has not yet become large, and a queue Q that does -@@ -772,13 +851,13 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -772,13 +867,13 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) * * . the device enters a large-burst mode * @@ -2058,7 +2086,7 @@ index cf3e9b1..e5dfa5a 100644 * later, i.e., not shortly after, than the last time at which a queue * either entered the burst list or was marked as belonging to the * current large burst, then the current burst is deemed as finished and: -@@ -791,52 +870,44 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -791,52 +886,44 @@ static void bfq_add_to_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq) * in a possible new burst (then the burst list contains just Q * after this step). */ @@ -2135,7 +2163,7 @@ index cf3e9b1..e5dfa5a 100644 } /* -@@ -845,8 +916,9 @@ static void bfq_handle_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -845,8 +932,9 @@ static void bfq_handle_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq, * bfqq as belonging to this large burst immediately. */ if (bfqd->large_burst) { @@ -2146,7 +2174,7 @@ index cf3e9b1..e5dfa5a 100644 } /* -@@ -855,25 +927,490 @@ static void bfq_handle_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -855,25 +943,489 @@ static void bfq_handle_burst(struct bfq_data *bfqd, struct bfq_queue *bfqq, * queue. Then we add bfqq to the burst. */ bfq_add_to_burst(bfqd, bfqq); @@ -2604,7 +2632,6 @@ index cf3e9b1..e5dfa5a 100644 + + bfq_bfqq_expire(bfqd, bfqd->in_service_queue, + false, BFQ_BFQQ_PREEMPTED); -+ BUG_ON(in_serv->entity.budget < 0); + } } @@ -2641,7 +2668,7 @@ index cf3e9b1..e5dfa5a 100644 */ prev = bfqq->next_rq; next_rq = bfq_choose_req(bfqd, bfqq->next_rq, rq, bfqd->last_position); -@@ -886,160 +1423,10 @@ static void bfq_add_request(struct request *rq) +@@ -886,160 +1438,10 @@ static void bfq_add_request(struct request *rq) if (prev != bfqq->next_rq) bfq_pos_tree_add_move(bfqd, bfqq); @@ -2806,7 +2833,7 @@ index cf3e9b1..e5dfa5a 100644 if (bfqd->low_latency && old_wr_coeff == 1 && !rq_is_sync(rq) && time_is_before_jiffies( bfqq->last_wr_start_finish + -@@ -1048,16 +1435,43 @@ static void bfq_add_request(struct request *rq) +@@ -1048,21 +1450,48 @@ static void bfq_add_request(struct request *rq) bfqq->wr_cur_max_time = bfq_wr_duration(bfqd); bfqd->wr_busy_queues++; @@ -2825,6 +2852,11 @@ index cf3e9b1..e5dfa5a 100644 bfq_updated_next_req(bfqd, bfqq); } +- if (bfqd->low_latency && +- (old_wr_coeff == 1 || bfqq->wr_coeff == 1 || interactive)) +- bfqq->last_wr_start_finish = jiffies; +-} +- + /* + * Assign jiffies to last_wr_start_finish in the following + * cases: @@ -2851,10 +2883,15 @@ index cf3e9b1..e5dfa5a 100644 + * this is already done in bfq_bfqq_handle_idle_busy_switch if + * needed. + */ - if (bfqd->low_latency && - (old_wr_coeff == 1 || bfqq->wr_coeff == 1 || interactive)) - bfqq->last_wr_start_finish = jiffies; -@@ -1074,22 +1488,32 @@ static struct request *bfq_find_rq_fmerge(struct bfq_data *bfqd, ++ if (bfqd->low_latency && ++ (old_wr_coeff == 1 || bfqq->wr_coeff == 1 || interactive)) ++ bfqq->last_wr_start_finish = jiffies; ++} ++ + static struct request *bfq_find_rq_fmerge(struct bfq_data *bfqd, + struct bio *bio) + { +@@ -1074,21 +1503,31 @@ static struct request *bfq_find_rq_fmerge(struct bfq_data *bfqd, if (!bic) return NULL; @@ -2866,16 +2903,8 @@ index cf3e9b1..e5dfa5a 100644 return NULL; } --static void bfq_activate_request(struct request_queue *q, struct request *rq) +static sector_t get_sdist(sector_t last_pos, struct request *rq) - { -- struct bfq_data *bfqd = q->elevator->elevator_data; -- -- bfqd->rq_in_driver++; -- bfqd->last_position = blk_rq_pos(rq) + blk_rq_sectors(rq); -- bfq_log(bfqd, "activate_request: new bfqd->last_position %llu", -- (unsigned long long) bfqd->last_position); --} ++{ + sector_t sdist = 0; + + if (last_pos) { @@ -2888,15 +2917,18 @@ index cf3e9b1..e5dfa5a 100644 + return sdist; +} + -+static void bfq_activate_request(struct request_queue *q, struct request *rq) -+{ -+ struct bfq_data *bfqd = q->elevator->elevator_data; -+ bfqd->rq_in_driver++; -+} + static void bfq_activate_request(struct request_queue *q, struct request *rq) + { + struct bfq_data *bfqd = q->elevator->elevator_data; +- + bfqd->rq_in_driver++; +- bfqd->last_position = blk_rq_pos(rq) + blk_rq_sectors(rq); +- bfq_log(bfqd, "activate_request: new bfqd->last_position %llu", +- (unsigned long long) bfqd->last_position); + } static void bfq_deactivate_request(struct request_queue *q, struct request *rq) - { -@@ -1105,6 +1529,9 @@ static void bfq_remove_request(struct request *rq) +@@ -1105,6 +1544,9 @@ static void bfq_remove_request(struct request *rq) struct bfq_data *bfqd = bfqq->bfqd; const int sync = rq_is_sync(rq); @@ -2906,7 +2938,7 @@ index cf3e9b1..e5dfa5a 100644 if (bfqq->next_rq == rq) { bfqq->next_rq = bfq_find_next_rq(bfqd, bfqq, rq); bfq_updated_next_req(bfqd, bfqq); -@@ -1118,8 +1545,26 @@ static void bfq_remove_request(struct request *rq) +@@ -1118,8 +1560,29 @@ static void bfq_remove_request(struct request *rq) elv_rb_del(&bfqq->sort_list, rq); if (RB_EMPTY_ROOT(&bfqq->sort_list)) { @@ -2917,8 +2949,10 @@ index cf3e9b1..e5dfa5a 100644 + BUG_ON(bfqq->entity.budget < 0); + + if (bfq_bfqq_busy(bfqq) && bfqq != bfqd->in_service_queue) { ++ BUG_ON(bfqq->ref < 2); /* referred by rq and on tree */ + bfq_del_bfqq_busy(bfqd, bfqq, false); -+ /* bfqq emptied. In normal operation, when ++ /* ++ * bfqq emptied. In normal operation, when + * bfqq is empty, bfqq->entity.service and + * bfqq->entity.budget must contain, + * respectively, the service received and the @@ -2927,7 +2961,8 @@ index cf3e9b1..e5dfa5a 100644 + * this last removal occurred while bfqq is + * not in service. To avoid inconsistencies, + * reset both bfqq->entity.service and -+ * bfqq->entity.budget. ++ * bfqq->entity.budget, if bfqq has still a ++ * process that may issue I/O requests to it. + */ + bfqq->entity.budget = bfqq->entity.service = 0; + } @@ -2935,7 +2970,7 @@ index cf3e9b1..e5dfa5a 100644 /* * Remove queue from request-position tree as it is empty. */ -@@ -1133,9 +1578,7 @@ static void bfq_remove_request(struct request *rq) +@@ -1133,19 +1596,17 @@ static void bfq_remove_request(struct request *rq) BUG_ON(bfqq->meta_pending == 0); bfqq->meta_pending--; } @@ -2944,8 +2979,12 @@ index cf3e9b1..e5dfa5a 100644 -#endif } - static int bfq_merge(struct request_queue *q, struct request **req, -@@ -1145,7 +1588,7 @@ static int bfq_merge(struct request_queue *q, struct request **req, +-static int bfq_merge(struct request_queue *q, struct request **req, +- struct bio *bio) ++static enum elv_merge bfq_merge(struct request_queue *q, struct request **req, ++ struct bio *bio) + { + struct bfq_data *bfqd = q->elevator->elevator_data; struct request *__rq; __rq = bfq_find_rq_fmerge(bfqd, bio); @@ -2954,7 +2993,16 @@ index cf3e9b1..e5dfa5a 100644 *req = __rq; return ELEVATOR_FRONT_MERGE; } -@@ -1190,7 +1633,7 @@ static void bfq_merged_request(struct request_queue *q, struct request *req, +@@ -1154,7 +1615,7 @@ static int bfq_merge(struct request_queue *q, struct request **req, + } + + static void bfq_merged_request(struct request_queue *q, struct request *req, +- int type) ++ enum elv_merge type) + { + if (type == ELEVATOR_FRONT_MERGE && + rb_prev(&req->rb_node) && +@@ -1190,7 +1651,7 @@ static void bfq_merged_request(struct request_queue *q, struct request *req, static void bfq_bio_merged(struct request_queue *q, struct request *req, struct bio *bio) { @@ -2963,7 +3011,7 @@ index cf3e9b1..e5dfa5a 100644 } #endif -@@ -1210,7 +1653,7 @@ static void bfq_merged_requests(struct request_queue *q, struct request *rq, +@@ -1210,7 +1671,7 @@ static void bfq_merged_requests(struct request_queue *q, struct request *rq, */ if (bfqq == next_bfqq && !list_empty(&rq->queuelist) && !list_empty(&next->queuelist) && @@ -2972,7 +3020,7 @@ index cf3e9b1..e5dfa5a 100644 list_del_init(&rq->queuelist); list_replace_init(&next->queuelist, &rq->queuelist); rq->fifo_time = next->fifo_time; -@@ -1220,21 +1663,30 @@ static void bfq_merged_requests(struct request_queue *q, struct request *rq, +@@ -1220,21 +1681,30 @@ static void bfq_merged_requests(struct request_queue *q, struct request *rq, bfqq->next_rq = rq; bfq_remove_request(next); @@ -3006,7 +3054,7 @@ index cf3e9b1..e5dfa5a 100644 } static void bfq_end_wr_async_queues(struct bfq_data *bfqd, -@@ -1277,7 +1729,7 @@ static int bfq_rq_close_to_sector(void *io_struct, bool request, +@@ -1277,7 +1747,7 @@ static int bfq_rq_close_to_sector(void *io_struct, bool request, sector_t sector) { return abs(bfq_io_struct_pos(io_struct, request) - sector) <= @@ -3015,7 +3063,7 @@ index cf3e9b1..e5dfa5a 100644 } static struct bfq_queue *bfqq_find_close(struct bfq_data *bfqd, -@@ -1399,7 +1851,7 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) +@@ -1399,7 +1869,7 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) * throughput. */ bfqq->new_bfqq = new_bfqq; @@ -3024,7 +3072,7 @@ index cf3e9b1..e5dfa5a 100644 return new_bfqq; } -@@ -1430,9 +1882,23 @@ static bool bfq_may_be_close_cooperator(struct bfq_queue *bfqq, +@@ -1430,9 +1900,23 @@ static bool bfq_may_be_close_cooperator(struct bfq_queue *bfqq, } /* @@ -3051,7 +3099,7 @@ index cf3e9b1..e5dfa5a 100644 * structure otherwise. * * The OOM queue is not allowed to participate to cooperation: in fact, since -@@ -1441,6 +1907,18 @@ static bool bfq_may_be_close_cooperator(struct bfq_queue *bfqq, +@@ -1441,6 +1925,18 @@ static bool bfq_may_be_close_cooperator(struct bfq_queue *bfqq, * handle merging with the OOM queue would be quite complex and expensive * to maintain. Besides, in such a critical condition as an out of memory, * the benefits of queue merging may be little relevant, or even negligible. @@ -3070,7 +3118,7 @@ index cf3e9b1..e5dfa5a 100644 */ static struct bfq_queue * bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, -@@ -1450,16 +1928,32 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -1450,16 +1946,32 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, if (bfqq->new_bfqq) return bfqq->new_bfqq; @@ -3106,7 +3154,7 @@ index cf3e9b1..e5dfa5a 100644 unlikely(in_service_bfqq == &bfqd->oom_bfqq)) goto check_scheduled; -@@ -1481,7 +1975,15 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -1481,7 +1993,15 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, BUG_ON(new_bfqq && bfqq->entity.parent != new_bfqq->entity.parent); @@ -3123,7 +3171,7 @@ index cf3e9b1..e5dfa5a 100644 bfq_may_be_close_cooperator(bfqq, new_bfqq)) return bfq_setup_merge(bfqq, new_bfqq); -@@ -1490,53 +1992,25 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -1490,53 +2010,25 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, static void bfq_bfqq_save_state(struct bfq_queue *bfqq) { @@ -3190,7 +3238,7 @@ index cf3e9b1..e5dfa5a 100644 } static void bfq_get_bic_reference(struct bfq_queue *bfqq) -@@ -1561,6 +2035,40 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic, +@@ -1561,6 +2053,41 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic, if (bfq_bfqq_IO_bound(bfqq)) bfq_mark_bfqq_IO_bound(new_bfqq); bfq_clear_bfqq_IO_bound(bfqq); @@ -3208,7 +3256,8 @@ index cf3e9b1..e5dfa5a 100644 + new_bfqq->wr_coeff = bfqq->wr_coeff; + new_bfqq->wr_cur_max_time = bfqq->wr_cur_max_time; + new_bfqq->last_wr_start_finish = bfqq->last_wr_start_finish; -+ new_bfqq->wr_start_at_switch_to_srt = bfqq->wr_start_at_switch_to_srt; ++ new_bfqq->wr_start_at_switch_to_srt = ++ bfqq->wr_start_at_switch_to_srt; + if (bfq_bfqq_busy(new_bfqq)) + bfqd->wr_busy_queues++; + new_bfqq->entity.prio_changed = 1; @@ -3231,7 +3280,11 @@ index cf3e9b1..e5dfa5a 100644 /* * Grab a reference to the bic, to prevent it from being destroyed * before being possibly touched by a bfq_split_bfqq(). -@@ -1587,30 +2095,19 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic, +@@ -1584,33 +2111,23 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic, + */ + new_bfqq->bic = NULL; + bfqq->bic = NULL; ++ /* release process reference to bfqq */ bfq_put_queue(bfqq); } @@ -3267,7 +3320,7 @@ index cf3e9b1..e5dfa5a 100644 /* * Lookup the bfqq that this bio will be queued with. Allow -@@ -1619,9 +2116,9 @@ static int bfq_allow_merge(struct request_queue *q, struct request *rq, +@@ -1619,9 +2136,9 @@ static int bfq_allow_merge(struct request_queue *q, struct request *rq, */ bic = bfq_bic_lookup(bfqd, current->io_context); if (!bic) @@ -3279,7 +3332,7 @@ index cf3e9b1..e5dfa5a 100644 /* * We take advantage of this function to perform an early merge * of the queues of possible cooperating processes. -@@ -1636,30 +2133,111 @@ static int bfq_allow_merge(struct request_queue *q, struct request *rq, +@@ -1636,30 +2153,111 @@ static int bfq_allow_merge(struct request_queue *q, struct request *rq, * to decide whether bio and rq can be merged. */ bfqq = new_bfqq; @@ -3397,7 +3450,7 @@ index cf3e9b1..e5dfa5a 100644 bfqd->in_service_queue = bfqq; } -@@ -1675,36 +2253,11 @@ static struct bfq_queue *bfq_set_in_service_queue(struct bfq_data *bfqd) +@@ -1675,36 +2273,11 @@ static struct bfq_queue *bfq_set_in_service_queue(struct bfq_data *bfqd) return bfqq; } @@ -3435,7 +3488,7 @@ index cf3e9b1..e5dfa5a 100644 BUG_ON(!RB_EMPTY_ROOT(&bfqq->sort_list)); -@@ -1728,119 +2281,366 @@ static void bfq_arm_slice_timer(struct bfq_data *bfqd) +@@ -1728,119 +2301,366 @@ static void bfq_arm_slice_timer(struct bfq_data *bfqd) sl = bfqd->bfq_slice_idle; /* * Unless the queue is being weight-raised or the scenario is @@ -3874,7 +3927,7 @@ index cf3e9b1..e5dfa5a 100644 /* * If this bfqq is shared between multiple processes, check * to make sure that those processes are still issuing I/Os -@@ -1851,20 +2651,30 @@ static void __bfq_bfqq_expire(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -1851,20 +2671,30 @@ static void __bfq_bfqq_expire(struct bfq_data *bfqd, struct bfq_queue *bfqq) bfq_mark_bfqq_split_coop(bfqq); if (RB_EMPTY_ROOT(&bfqq->sort_list)) { @@ -3913,7 +3966,7 @@ index cf3e9b1..e5dfa5a 100644 } /** -@@ -1883,10 +2693,19 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, +@@ -1883,10 +2713,19 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, struct request *next_rq; int budget, min_budget; @@ -3935,7 +3988,7 @@ index cf3e9b1..e5dfa5a 100644 bfq_log_bfqq(bfqd, bfqq, "recalc_budg: last budg %d, budg left %d", bfqq->entity.budget, bfq_bfqq_budget_left(bfqq)); -@@ -1895,7 +2714,7 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, +@@ -1895,7 +2734,7 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, bfq_log_bfqq(bfqd, bfqq, "recalc_budg: sync %d, seeky %d", bfq_bfqq_sync(bfqq), BFQQ_SEEKY(bfqd->in_service_queue)); @@ -3944,7 +3997,7 @@ index cf3e9b1..e5dfa5a 100644 switch (reason) { /* * Caveat: in all the following cases we trade latency -@@ -1937,14 +2756,10 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, +@@ -1937,14 +2776,10 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, break; case BFQ_BFQQ_BUDGET_TIMEOUT: /* @@ -3963,7 +4016,7 @@ index cf3e9b1..e5dfa5a 100644 */ budget = min(budget * 2, bfqd->bfq_max_budget); break; -@@ -1961,17 +2776,49 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, +@@ -1961,17 +2796,49 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, budget = min(budget * 4, bfqd->bfq_max_budget); break; case BFQ_BFQQ_NO_MORE_REQUESTS: @@ -4020,7 +4073,7 @@ index cf3e9b1..e5dfa5a 100644 */ budget = bfqd->bfq_max_budget; -@@ -1982,160 +2829,120 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, +@@ -1982,160 +2849,120 @@ static void __bfq_bfqq_recalc_budget(struct bfq_data *bfqd, bfqq->max_budget = min(bfqq->max_budget, bfqd->bfq_max_budget); /* @@ -4146,8 +4199,8 @@ index cf3e9b1..e5dfa5a 100644 + delta_ktime = ktime_sub(delta_ktime, bfqd->last_budget_start); + delta_usecs = ktime_to_us(delta_ktime); + -+ /* don't trust short/unrealistic values. */ -+ if (delta_usecs < 1000 || delta_usecs >= LONG_MAX) { ++ /* don't use too short time intervals */ ++ if (delta_usecs < 1000) { + if (blk_queue_nonrot(bfqd->queue)) + /* + * give same worst-case guarantees as idling @@ -4157,7 +4210,7 @@ index cf3e9b1..e5dfa5a 100644 + else /* charge at least one seek */ + *delta_ms = bfq_slice_idle / NSEC_PER_MSEC; + -+ bfq_log(bfqd, "bfq_bfqq_is_slow: unrealistic %u", delta_usecs); ++ bfq_log(bfqd, "bfq_bfqq_is_slow: too short %u", delta_usecs); + + return slow; + } @@ -4269,7 +4322,7 @@ index cf3e9b1..e5dfa5a 100644 } /* -@@ -2193,20 +3000,35 @@ static bool bfq_update_peak_rate(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -2193,20 +3020,35 @@ static bool bfq_update_peak_rate(struct bfq_data *bfqd, struct bfq_queue *bfqq, static unsigned long bfq_bfqq_softrt_next_start(struct bfq_data *bfqd, struct bfq_queue *bfqq) { @@ -4311,7 +4364,7 @@ index cf3e9b1..e5dfa5a 100644 } /** -@@ -2216,28 +3038,24 @@ static unsigned long bfq_infinity_from_now(unsigned long now) +@@ -2216,28 +3058,24 @@ static unsigned long bfq_infinity_from_now(unsigned long now) * @compensate: if true, compensate for the time spent idling. * @reason: the reason causing the expiration. * @@ -4357,12 +4410,13 @@ index cf3e9b1..e5dfa5a 100644 */ static void bfq_bfqq_expire(struct bfq_data *bfqd, struct bfq_queue *bfqq, -@@ -2245,41 +3063,52 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, +@@ -2245,41 +3083,53 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, enum bfqq_expiration reason) { bool slow; + unsigned long delta = 0; + struct bfq_entity *entity = &bfqq->entity; ++ int ref; BUG_ON(bfqq != bfqd->in_service_queue); @@ -4370,10 +4424,20 @@ index cf3e9b1..e5dfa5a 100644 - * Update disk peak rate for autotuning and check whether the - * process is slow (see bfq_update_peak_rate). + * Check whether the process is slow (see bfq_bfqq_is_slow). -+ */ + */ +- slow = bfq_update_peak_rate(bfqd, bfqq, compensate, reason); + slow = bfq_bfqq_is_slow(bfqd, bfqq, compensate, reason, &delta); -+ -+ /* + + /* +- * As above explained, 'punish' slow (i.e., seeky), timed-out +- * and async queues, to favor sequential sync workloads. +- * +- * Processes doing I/O in the slower disk zones will tend to be +- * slow(er) even if not seeky. Hence, since the estimated peak +- * rate is actually an average over the disk surface, these +- * processes may timeout just for bad luck. To avoid punishing +- * them we do not charge a full budget to a process that +- * succeeded in consuming at least 2/3 of its budget. + * Increase service_from_backlogged before next statement, + * because the possible next invocation of + * bfq_bfqq_charge_time would likely inflate @@ -4382,22 +4446,17 @@ index cf3e9b1..e5dfa5a 100644 + * heuristic to correctly compute the bandwidth consumed by + * bfqq. */ -- slow = bfq_update_peak_rate(bfqd, bfqq, compensate, reason); +- if (slow || (reason == BFQ_BFQQ_BUDGET_TIMEOUT && +- bfq_bfqq_budget_left(bfqq) >= bfqq->entity.budget / 3)) +- bfq_bfqq_charge_full_budget(bfqq); + bfqq->service_from_backlogged += entity->service; - /* -- * As above explained, 'punish' slow (i.e., seeky), timed-out -- * and async queues, to favor sequential sync workloads. +- bfqq->service_from_backlogged += bfqq->entity.service; ++ /* + * As above explained, charge slow (typically seeky) and + * timed-out queues with the time and not the service + * received, to favor sequential workloads. - * -- * Processes doing I/O in the slower disk zones will tend to be -- * slow(er) even if not seeky. Hence, since the estimated peak -- * rate is actually an average over the disk surface, these -- * processes may timeout just for bad luck. To avoid punishing -- * them we do not charge a full budget to a process that -- * succeeded in consuming at least 2/3 of its budget. ++ * + * Processes doing I/O in the slower disk zones will tend to + * be slow(er) even if not seeky. Therefore, since the + * estimated peak rate is actually an average over the disk @@ -4407,12 +4466,7 @@ index cf3e9b1..e5dfa5a 100644 + * allows BFQ to preserve enough elasticity to still perform + * bandwidth, and not time, distribution with little unlucky + * or quasi-sequential processes. - */ -- if (slow || (reason == BFQ_BFQQ_BUDGET_TIMEOUT && -- bfq_bfqq_budget_left(bfqq) >= bfqq->entity.budget / 3)) -- bfq_bfqq_charge_full_budget(bfqq); -- -- bfqq->service_from_backlogged += bfqq->entity.service; ++ */ + if (bfqq->wr_coeff == 1 && + (slow || + (reason == BFQ_BFQQ_BUDGET_TIMEOUT && @@ -4433,7 +4487,7 @@ index cf3e9b1..e5dfa5a 100644 bfq_clear_bfqq_IO_bound(bfqq); if (bfqd->low_latency && bfqq->wr_coeff == 1) -@@ -2288,19 +3117,23 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, +@@ -2288,19 +3138,23 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, if (bfqd->low_latency && bfqd->bfq_wr_max_softrt_rate > 0 && RB_EMPTY_ROOT(&bfqq->sort_list)) { /* @@ -4465,7 +4519,7 @@ index cf3e9b1..e5dfa5a 100644 /* * The application is still waiting for the * completion of one or more requests: -@@ -2317,7 +3150,7 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, +@@ -2317,7 +3171,7 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, * happened to be in the past. */ bfqq->soft_rt_next_start = @@ -4474,7 +4528,7 @@ index cf3e9b1..e5dfa5a 100644 /* * Schedule an update of soft_rt_next_start to when * the task may be discovered to be isochronous. -@@ -2327,15 +3160,27 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, +@@ -2327,15 +3181,30 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, } bfq_log_bfqq(bfqd, bfqq, @@ -4492,19 +4546,22 @@ index cf3e9b1..e5dfa5a 100644 __bfq_bfqq_recalc_budget(bfqd, bfqq, reason); + BUG_ON(bfqq->next_rq == NULL && + bfqq->entity.budget < bfqq->entity.service); ++ ref = bfqq->ref; __bfq_bfqq_expire(bfqd, bfqq); + -+ BUG_ON(!bfq_bfqq_busy(bfqq) && reason == BFQ_BFQQ_BUDGET_EXHAUSTED && ++ BUG_ON(ref > 1 && ++ !bfq_bfqq_busy(bfqq) && reason == BFQ_BFQQ_BUDGET_EXHAUSTED && + !bfq_class_idle(bfqq)); + -+ if (!bfq_bfqq_busy(bfqq) && ++ /* mark bfqq as waiting a request only if a bic still points to it */ ++ if (ref > 1 && !bfq_bfqq_busy(bfqq) && + reason != BFQ_BFQQ_BUDGET_TIMEOUT && + reason != BFQ_BFQQ_BUDGET_EXHAUSTED) + bfq_mark_bfqq_non_blocking_wait_rq(bfqq); } /* -@@ -2345,20 +3190,17 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, +@@ -2345,20 +3214,17 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd, */ static bool bfq_bfqq_budget_timeout(struct bfq_queue *bfqq) { @@ -4533,7 +4590,7 @@ index cf3e9b1..e5dfa5a 100644 static bool bfq_may_expire_for_budg_timeout(struct bfq_queue *bfqq) { bfq_log_bfqq(bfqq->bfqd, bfqq, -@@ -2400,10 +3242,12 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) +@@ -2400,10 +3266,12 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) { struct bfq_data *bfqd = bfqq->bfqd; bool idling_boosts_thr, idling_boosts_thr_without_issues, @@ -4547,7 +4604,7 @@ index cf3e9b1..e5dfa5a 100644 /* * The next variable takes into account the cases where idling * boosts the throughput. -@@ -2466,74 +3310,27 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) +@@ -2466,74 +3334,27 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) bfqd->wr_busy_queues == 0; /* @@ -4559,7 +4616,8 @@ index cf3e9b1..e5dfa5a 100644 - * associated to the queue issues sequential/random requests - * (in the second case the queue may be tagged as seeky or - * even constantly_seeky). -- * ++ * guarantees. + * - * To introduce the first case, we note that, since - * bfq_bfqq_idle_window(bfqq) is false if the device is - * NCQ-capable and bfqq is random (see @@ -4572,8 +4630,7 @@ index cf3e9b1..e5dfa5a 100644 - * it. And, beneficially, this would imply that throughput - * would always be boosted also with random I/O on NCQ-capable - * HDDs. -+ * guarantees. - * +- * - * But we must be careful on this point, to avoid an unfair - * treatment for bfqq. In fact, because of the same above - * assignments, idling_boosts_thr_without_issues is, on the @@ -4641,7 +4698,7 @@ index cf3e9b1..e5dfa5a 100644 * (i) each of these processes must get the same throughput as * the others; * (ii) all these processes have the same I/O pattern -@@ -2555,26 +3352,53 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) +@@ -2555,26 +3376,53 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) * words, only if sub-condition (i) holds, then idling is * allowed, and the device tends to be prevented from queueing * many requests, possibly of several processes. The reason @@ -4715,7 +4772,7 @@ index cf3e9b1..e5dfa5a 100644 * * According to the above considerations, the next variable is * true (only) if sub-condition (i) holds. To compute the -@@ -2582,7 +3406,7 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) +@@ -2582,7 +3430,7 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) * the function bfq_symmetric_scenario(), but also check * whether bfqq is being weight-raised, because * bfq_symmetric_scenario() does not take into account also @@ -4724,7 +4781,7 @@ index cf3e9b1..e5dfa5a 100644 * bfq_weights_tree_add()). * * As a side note, it is worth considering that the above -@@ -2604,17 +3428,16 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) +@@ -2604,17 +3452,16 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) * bfqq. Such a case is when bfqq became active in a burst of * queue activations. Queues that became active during a large * burst benefit only from throughput, as discussed in the @@ -4747,7 +4804,7 @@ index cf3e9b1..e5dfa5a 100644 /* * We have now all the components we need to compute the return -@@ -2624,6 +3447,16 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) +@@ -2624,6 +3471,16 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) * 2) idling either boosts the throughput (without issues), or * is necessary to preserve service guarantees. */ @@ -4764,7 +4821,7 @@ index cf3e9b1..e5dfa5a 100644 return bfq_bfqq_sync(bfqq) && (idling_boosts_thr_without_issues || idling_needed_for_service_guarantees); -@@ -2635,7 +3468,7 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) +@@ -2635,7 +3492,7 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) * 1) the queue must remain in service and cannot be expired, and * 2) the device must be idled to wait for the possible arrival of a new * request for the queue. @@ -4773,7 +4830,7 @@ index cf3e9b1..e5dfa5a 100644 * why performing device idling is the best choice to boost the throughput * and preserve service guarantees when bfq_bfqq_may_idle itself * returns true. -@@ -2665,18 +3498,33 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) +@@ -2665,18 +3522,33 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) bfq_log_bfqq(bfqd, bfqq, "select_queue: already in-service queue"); if (bfq_may_expire_for_budg_timeout(bfqq) && @@ -4808,7 +4865,7 @@ index cf3e9b1..e5dfa5a 100644 reason = BFQ_BFQQ_BUDGET_EXHAUSTED; goto expire; } else { -@@ -2685,7 +3533,8 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) +@@ -2685,7 +3557,8 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) * not disable disk idling even when a new request * arrives. */ @@ -4818,7 +4875,7 @@ index cf3e9b1..e5dfa5a 100644 /* * If we get here: 1) at least a new request * has arrived but we have not disabled the -@@ -2700,10 +3549,8 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) +@@ -2700,10 +3573,8 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) * So we disable idling. */ bfq_clear_bfqq_wait_request(bfqq); @@ -4830,7 +4887,7 @@ index cf3e9b1..e5dfa5a 100644 } goto keep_queue; } -@@ -2714,7 +3561,7 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) +@@ -2714,7 +3585,7 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) * for a new request, or has requests waiting for a completion and * may idle after their completion, then keep it anyway. */ @@ -4839,7 +4896,7 @@ index cf3e9b1..e5dfa5a 100644 (bfqq->dispatched != 0 && bfq_bfqq_may_idle(bfqq))) { bfqq = NULL; goto keep_queue; -@@ -2725,9 +3572,16 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) +@@ -2725,9 +3596,16 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) bfq_bfqq_expire(bfqd, bfqq, false, reason); new_queue: bfqq = bfq_set_in_service_queue(bfqd); @@ -4858,7 +4915,7 @@ index cf3e9b1..e5dfa5a 100644 return bfqq; } -@@ -2736,6 +3590,9 @@ static void bfq_update_wr_data(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -2736,6 +3614,9 @@ static void bfq_update_wr_data(struct bfq_data *bfqd, struct bfq_queue *bfqq) struct bfq_entity *entity = &bfqq->entity; if (bfqq->wr_coeff > 1) { /* queue is being weight-raised */ @@ -4868,7 +4925,7 @@ index cf3e9b1..e5dfa5a 100644 bfq_log_bfqq(bfqd, bfqq, "raising period dur %u/%u msec, old coeff %u, w %d(%d)", jiffies_to_msecs(jiffies - bfqq->last_wr_start_finish), -@@ -2749,22 +3606,30 @@ static void bfq_update_wr_data(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -2749,22 +3630,30 @@ static void bfq_update_wr_data(struct bfq_data *bfqd, struct bfq_queue *bfqq) bfq_log_bfqq(bfqd, bfqq, "WARN: pending prio change"); /* @@ -4913,7 +4970,7 @@ index cf3e9b1..e5dfa5a 100644 } } /* Update weight both if it must be raised and if it must be lowered */ -@@ -2782,46 +3647,34 @@ static int bfq_dispatch_request(struct bfq_data *bfqd, +@@ -2782,46 +3671,34 @@ static int bfq_dispatch_request(struct bfq_data *bfqd, struct bfq_queue *bfqq) { int dispatched = 0; @@ -4979,7 +5036,7 @@ index cf3e9b1..e5dfa5a 100644 bfq_update_wr_data(bfqd, bfqq); bfq_log_bfqq(bfqd, bfqq, -@@ -2837,9 +3690,7 @@ static int bfq_dispatch_request(struct bfq_data *bfqd, +@@ -2837,9 +3714,7 @@ static int bfq_dispatch_request(struct bfq_data *bfqd, bfqd->in_service_bic = RQ_BIC(rq); } @@ -4990,7 +5047,7 @@ index cf3e9b1..e5dfa5a 100644 goto expire; return dispatched; -@@ -2885,8 +3736,8 @@ static int bfq_forced_dispatch(struct bfq_data *bfqd) +@@ -2885,8 +3760,8 @@ static int bfq_forced_dispatch(struct bfq_data *bfqd) st = bfq_entity_service_tree(&bfqq->entity); dispatched += __bfq_forced_dispatch_bfqq(bfqq); @@ -5000,7 +5057,7 @@ index cf3e9b1..e5dfa5a 100644 bfq_forget_idle(st); } -@@ -2899,37 +3750,37 @@ static int bfq_dispatch_requests(struct request_queue *q, int force) +@@ -2899,37 +3774,37 @@ static int bfq_dispatch_requests(struct request_queue *q, int force) { struct bfq_data *bfqd = q->elevator->elevator_data; struct bfq_queue *bfqq; @@ -5056,7 +5113,7 @@ index cf3e9b1..e5dfa5a 100644 if (!bfq_dispatch_request(bfqd, bfqq)) return 0; -@@ -2937,6 +3788,8 @@ static int bfq_dispatch_requests(struct request_queue *q, int force) +@@ -2937,6 +3812,8 @@ static int bfq_dispatch_requests(struct request_queue *q, int force) bfq_log_bfqq(bfqd, bfqq, "dispatched %s request", bfq_bfqq_sync(bfqq) ? "sync" : "async"); @@ -5065,7 +5122,13 @@ index cf3e9b1..e5dfa5a 100644 return 1; } -@@ -2948,23 +3801,21 @@ static int bfq_dispatch_requests(struct request_queue *q, int force) +@@ -2944,27 +3821,26 @@ static int bfq_dispatch_requests(struct request_queue *q, int force) + * Task holds one reference to the queue, dropped when task exits. Each rq + * in-flight on this queue also holds a reference, dropped when rq is freed. + * +- * Queue lock must be held here. ++ * Queue lock must be held here. Recall not to use bfqq after calling ++ * this function on it. */ static void bfq_put_queue(struct bfq_queue *bfqq) { @@ -5093,7 +5156,7 @@ index cf3e9b1..e5dfa5a 100644 if (bfq_bfqq_sync(bfqq)) /* -@@ -2977,7 +3828,7 @@ static void bfq_put_queue(struct bfq_queue *bfqq) +@@ -2977,7 +3853,7 @@ static void bfq_put_queue(struct bfq_queue *bfqq) */ hlist_del_init(&bfqq->burst_list_node); @@ -5102,7 +5165,7 @@ index cf3e9b1..e5dfa5a 100644 kmem_cache_free(bfq_pool, bfqq); #ifdef CONFIG_BFQ_GROUP_IOSCHED -@@ -3011,8 +3862,7 @@ static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -3011,38 +3887,16 @@ static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq) bfq_schedule_dispatch(bfqd); } @@ -5112,7 +5175,9 @@ index cf3e9b1..e5dfa5a 100644 bfq_put_cooperator(bfqq); -@@ -3021,28 +3871,7 @@ static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq) +- bfq_put_queue(bfqq); ++ bfq_put_queue(bfqq); /* release process reference */ + } static void bfq_init_icq(struct io_cq *icq) { @@ -5142,7 +5207,7 @@ index cf3e9b1..e5dfa5a 100644 } static void bfq_exit_icq(struct io_cq *icq) -@@ -3050,21 +3879,21 @@ static void bfq_exit_icq(struct io_cq *icq) +@@ -3050,21 +3904,21 @@ static void bfq_exit_icq(struct io_cq *icq) struct bfq_io_cq *bic = icq_to_bic(icq); struct bfq_data *bfqd = bic_to_bfqd(bic); @@ -5171,7 +5236,7 @@ index cf3e9b1..e5dfa5a 100644 } } -@@ -3072,8 +3901,8 @@ static void bfq_exit_icq(struct io_cq *icq) +@@ -3072,8 +3926,8 @@ static void bfq_exit_icq(struct io_cq *icq) * Update the entity prio values; note that the new values will not * be used until the next (re)activation. */ @@ -5182,7 +5247,16 @@ index cf3e9b1..e5dfa5a 100644 { struct task_struct *tsk = current; int ioprio_class; -@@ -3105,7 +3934,7 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) +@@ -3081,7 +3935,7 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) + ioprio_class = IOPRIO_PRIO_CLASS(bic->ioprio); + switch (ioprio_class) { + default: +- dev_err(bfqq->bfqd->queue->backing_dev_info.dev, ++ dev_err(bfqq->bfqd->queue->backing_dev_info->dev, + "bfq: bad prio class %d\n", ioprio_class); + case IOPRIO_CLASS_NONE: + /* +@@ -3105,7 +3959,7 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) break; } @@ -5191,7 +5265,7 @@ index cf3e9b1..e5dfa5a 100644 pr_crit("bfq_set_next_ioprio_data: new_ioprio %d\n", bfqq->new_ioprio); BUG(); -@@ -3113,45 +3942,40 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) +@@ -3113,45 +3967,41 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) bfqq->entity.new_weight = bfq_ioprio_to_weight(bfqq->new_ioprio); bfqq->entity.prio_changed = 1; @@ -5233,6 +5307,7 @@ index cf3e9b1..e5dfa5a 100644 - bfqq, atomic_read(&bfqq->ref)); - bfq_put_queue(bfqq); - } ++ /* release process reference on this queue */ + bfq_put_queue(bfqq); + bfqq = bfq_get_queue(bfqd, bio, BLK_RW_ASYNC, bic); + bic_set_bfqq(bic, bfqq, false); @@ -5251,7 +5326,7 @@ index cf3e9b1..e5dfa5a 100644 } static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, -@@ -3160,8 +3984,9 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -3160,8 +4010,9 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, RB_CLEAR_NODE(&bfqq->entity.rb_node); INIT_LIST_HEAD(&bfqq->fifo); INIT_HLIST_NODE(&bfqq->burst_list_node); @@ -5262,7 +5337,7 @@ index cf3e9b1..e5dfa5a 100644 bfqq->bfqd = bfqd; if (bic) -@@ -3171,6 +3996,7 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -3171,6 +4022,7 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, if (!bfq_class_idle(bfqq)) bfq_mark_bfqq_idle_window(bfqq); bfq_mark_bfqq_sync(bfqq); @@ -5270,7 +5345,7 @@ index cf3e9b1..e5dfa5a 100644 } else bfq_clear_bfqq_sync(bfqq); bfq_mark_bfqq_IO_bound(bfqq); -@@ -3180,72 +4006,19 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -3180,72 +4032,19 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, bfqq->pid = pid; bfqq->wr_coeff = 1; @@ -5327,7 +5402,8 @@ index cf3e9b1..e5dfa5a 100644 - gfp_mask | __GFP_ZERO, - bfqd->queue->node); - } -- ++ bfqq->soft_rt_next_start = bfq_greatest_from_now(); + - if (bfqq) { - bfq_init_bfqq(bfqd, bfqq, bic, current->pid, - is_sync); @@ -5343,15 +5419,14 @@ index cf3e9b1..e5dfa5a 100644 - kmem_cache_free(bfq_pool, new_bfqq); - - rcu_read_unlock(); -+ bfqq->soft_rt_next_start = bfq_greatest_from_now(); - +- - return bfqq; + /* first request is almost certainly seeky */ + bfqq->seek_history = 1; } static struct bfq_queue **bfq_async_queue_prio(struct bfq_data *bfqd, -@@ -3268,90 +4041,93 @@ static struct bfq_queue **bfq_async_queue_prio(struct bfq_data *bfqd, +@@ -3268,90 +4067,93 @@ static struct bfq_queue **bfq_async_queue_prio(struct bfq_data *bfqd, } static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd, @@ -5431,7 +5506,7 @@ index cf3e9b1..e5dfa5a 100644 - bfq_log_bfqq(bfqd, bfqq, "get_queue, at end: %p, %d", bfqq, - atomic_read(&bfqq->ref)); +out: -+ bfqq->ref++; ++ bfqq->ref++; /* get a process reference to this queue */ + bfq_log_bfqq(bfqd, bfqq, "get_queue, at end: %p, %d", bfqq, bfqq->ref); + rcu_read_unlock(); return bfqq; @@ -5499,7 +5574,7 @@ index cf3e9b1..e5dfa5a 100644 } /* -@@ -3369,7 +4145,8 @@ static void bfq_update_idle_window(struct bfq_data *bfqd, +@@ -3369,7 +4171,8 @@ static void bfq_update_idle_window(struct bfq_data *bfqd, return; /* Idle window just restored, statistics are meaningless. */ @@ -5509,7 +5584,7 @@ index cf3e9b1..e5dfa5a 100644 return; enable_idle = bfq_bfqq_idle_window(bfqq); -@@ -3409,22 +4186,13 @@ static void bfq_rq_enqueued(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -3409,22 +4212,13 @@ static void bfq_rq_enqueued(struct bfq_data *bfqd, struct bfq_queue *bfqq, bfq_update_io_thinktime(bfqd, bic); bfq_update_io_seektime(bfqd, bfqq, rq); @@ -5534,7 +5609,7 @@ index cf3e9b1..e5dfa5a 100644 bfqq->last_request_pos = blk_rq_pos(rq) + blk_rq_sectors(rq); -@@ -3438,14 +4206,15 @@ static void bfq_rq_enqueued(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -3438,14 +4232,15 @@ static void bfq_rq_enqueued(struct bfq_data *bfqd, struct bfq_queue *bfqq, * is small and the queue is not to be expired, then * just exit. * @@ -5558,7 +5633,7 @@ index cf3e9b1..e5dfa5a 100644 */ if (small_req && !budget_timeout) return; -@@ -3457,10 +4226,8 @@ static void bfq_rq_enqueued(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -3457,10 +4252,8 @@ static void bfq_rq_enqueued(struct bfq_data *bfqd, struct bfq_queue *bfqq, * timer. */ bfq_clear_bfqq_wait_request(bfqq); @@ -5570,17 +5645,22 @@ index cf3e9b1..e5dfa5a 100644 /* * The queue is not empty, because a new request just -@@ -3504,28 +4271,20 @@ static void bfq_insert_request(struct request_queue *q, struct request *rq) +@@ -3504,28 +4297,24 @@ static void bfq_insert_request(struct request_queue *q, struct request *rq) */ new_bfqq->allocated[rq_data_dir(rq)]++; bfqq->allocated[rq_data_dir(rq)]--; - atomic_inc(&new_bfqq->ref); +- bfq_put_queue(bfqq); + new_bfqq->ref++; + bfq_clear_bfqq_just_created(bfqq); - bfq_put_queue(bfqq); if (bic_to_bfqq(RQ_BIC(rq), 1) == bfqq) bfq_merge_bfqqs(bfqd, RQ_BIC(rq), bfqq, new_bfqq); ++ /* ++ * rq is about to be enqueued into new_bfqq, ++ * release rq reference on bfqq ++ */ ++ bfq_put_queue(bfqq); rq->elv.priv[1] = new_bfqq; bfqq = new_bfqq; - } else @@ -5603,7 +5683,7 @@ index cf3e9b1..e5dfa5a 100644 list_add_tail(&rq->queuelist, &bfqq->fifo); bfq_rq_enqueued(bfqd, bfqq, rq); -@@ -3533,8 +4292,8 @@ static void bfq_insert_request(struct request_queue *q, struct request *rq) +@@ -3533,8 +4322,8 @@ static void bfq_insert_request(struct request_queue *q, struct request *rq) static void bfq_update_hw_tag(struct bfq_data *bfqd) { @@ -5614,7 +5694,7 @@ index cf3e9b1..e5dfa5a 100644 if (bfqd->hw_tag == 1) return; -@@ -3560,48 +4319,85 @@ static void bfq_completed_request(struct request_queue *q, struct request *rq) +@@ -3560,48 +4349,85 @@ static void bfq_completed_request(struct request_queue *q, struct request *rq) { struct bfq_queue *bfqq = RQ_BFQQ(rq); struct bfq_data *bfqd = bfqq->bfqd; @@ -5724,7 +5804,7 @@ index cf3e9b1..e5dfa5a 100644 */ if (bfq_bfqq_softrt_update(bfqq) && bfqq->dispatched == 0 && RB_EMPTY_ROOT(&bfqq->sort_list)) -@@ -3613,10 +4409,7 @@ static void bfq_completed_request(struct request_queue *q, struct request *rq) +@@ -3613,10 +4439,7 @@ static void bfq_completed_request(struct request_queue *q, struct request *rq) * or if we want to idle in case it has no pending requests. */ if (bfqd->in_service_queue == bfqq) { @@ -5736,7 +5816,7 @@ index cf3e9b1..e5dfa5a 100644 bfq_arm_slice_timer(bfqd); goto out; } else if (bfq_may_expire_for_budg_timeout(bfqq)) -@@ -3646,7 +4439,7 @@ static int __bfq_may_queue(struct bfq_queue *bfqq) +@@ -3646,7 +4469,7 @@ static int __bfq_may_queue(struct bfq_queue *bfqq) return ELV_MQUEUE_MAY; } @@ -5745,7 +5825,7 @@ index cf3e9b1..e5dfa5a 100644 { struct bfq_data *bfqd = q->elevator->elevator_data; struct task_struct *tsk = current; -@@ -3663,7 +4456,7 @@ static int bfq_may_queue(struct request_queue *q, int rw) +@@ -3663,7 +4486,7 @@ static int bfq_may_queue(struct request_queue *q, int rw) if (!bic) return ELV_MQUEUE_MAY; @@ -5754,7 +5834,7 @@ index cf3e9b1..e5dfa5a 100644 if (bfqq) return __bfq_may_queue(bfqq); -@@ -3687,14 +4480,14 @@ static void bfq_put_request(struct request *rq) +@@ -3687,14 +4510,14 @@ static void bfq_put_request(struct request *rq) rq->elv.priv[1] = NULL; bfq_log_bfqq(bfqq->bfqd, bfqq, "put_request %p, %d", @@ -5771,7 +5851,7 @@ index cf3e9b1..e5dfa5a 100644 */ static struct bfq_queue * bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq) -@@ -3732,11 +4525,8 @@ static int bfq_set_request(struct request_queue *q, struct request *rq, +@@ -3732,37 +4555,60 @@ static int bfq_set_request(struct request_queue *q, struct request *rq, unsigned long flags; bool split = false; @@ -5784,7 +5864,11 @@ index cf3e9b1..e5dfa5a 100644 if (!bic) goto queue_fail; -@@ -3746,23 +4536,47 @@ static int bfq_set_request(struct request_queue *q, struct request *rq, + ++ bfq_check_ioprio_change(bic, bio); ++ + bfq_bic_update_cgroup(bic, bio); + new_queue: bfqq = bic_to_bfqq(bic, is_sync); if (!bfqq || bfqq == &bfqd->oom_bfqq) { @@ -5835,7 +5919,7 @@ index cf3e9b1..e5dfa5a 100644 bfqq = bfq_split_bfqq(bic, bfqq); split = true; if (!bfqq) -@@ -3771,9 +4585,8 @@ static int bfq_set_request(struct request_queue *q, struct request *rq, +@@ -3771,9 +4617,8 @@ static int bfq_set_request(struct request_queue *q, struct request *rq, } bfqq->allocated[rw]++; @@ -5847,7 +5931,7 @@ index cf3e9b1..e5dfa5a 100644 rq->elv.priv[0] = bic; rq->elv.priv[1] = bfqq; -@@ -3788,7 +4601,6 @@ static int bfq_set_request(struct request_queue *q, struct request *rq, +@@ -3788,7 +4633,6 @@ static int bfq_set_request(struct request_queue *q, struct request *rq, if (likely(bfqq != &bfqd->oom_bfqq) && bfqq_process_refs(bfqq) == 1) { bfqq->bic = bic; if (split) { @@ -5855,7 +5939,7 @@ index cf3e9b1..e5dfa5a 100644 /* * If the queue has just been split from a shared * queue, restore the idle window and the possible -@@ -3798,6 +4610,9 @@ static int bfq_set_request(struct request_queue *q, struct request *rq, +@@ -3798,6 +4642,9 @@ static int bfq_set_request(struct request_queue *q, struct request *rq, } } @@ -5865,7 +5949,7 @@ index cf3e9b1..e5dfa5a 100644 spin_unlock_irqrestore(q->queue_lock, flags); return 0; -@@ -3824,9 +4639,10 @@ static void bfq_kick_queue(struct work_struct *work) +@@ -3824,9 +4671,10 @@ static void bfq_kick_queue(struct work_struct *work) * Handler of the expiration of the timer running if the in-service queue * is idling inside its time slice. */ @@ -5878,7 +5962,7 @@ index cf3e9b1..e5dfa5a 100644 struct bfq_queue *bfqq; unsigned long flags; enum bfqq_expiration reason; -@@ -3844,6 +4660,8 @@ static void bfq_idle_slice_timer(unsigned long data) +@@ -3844,6 +4692,8 @@ static void bfq_idle_slice_timer(unsigned long data) */ if (bfqq) { bfq_log_bfqq(bfqd, bfqq, "slice_timer expired"); @@ -5887,7 +5971,7 @@ index cf3e9b1..e5dfa5a 100644 if (bfq_bfqq_budget_timeout(bfqq)) /* * Also here the queue can be safely expired -@@ -3869,11 +4687,12 @@ static void bfq_idle_slice_timer(unsigned long data) +@@ -3869,25 +4719,26 @@ static void bfq_idle_slice_timer(unsigned long data) bfq_schedule_dispatch(bfqd); spin_unlock_irqrestore(bfqd->queue->queue_lock, flags); @@ -5901,7 +5985,12 @@ index cf3e9b1..e5dfa5a 100644 cancel_work_sync(&bfqd->unplug_work); } -@@ -3885,9 +4704,9 @@ static void __bfq_put_async_bfqq(struct bfq_data *bfqd, + static void __bfq_put_async_bfqq(struct bfq_data *bfqd, +- struct bfq_queue **bfqq_ptr) ++ struct bfq_queue **bfqq_ptr) + { + struct bfq_group *root_group = bfqd->root_group; + struct bfq_queue *bfqq = *bfqq_ptr; bfq_log(bfqd, "put_async_bfqq: %p", bfqq); if (bfqq) { @@ -5913,7 +6002,7 @@ index cf3e9b1..e5dfa5a 100644 bfq_put_queue(bfqq); *bfqq_ptr = NULL; } -@@ -3922,19 +4741,18 @@ static void bfq_exit_queue(struct elevator_queue *e) +@@ -3922,19 +4773,18 @@ static void bfq_exit_queue(struct elevator_queue *e) BUG_ON(bfqd->in_service_queue); list_for_each_entry_safe(bfqq, n, &bfqd->idle_list, bfqq_list) @@ -5936,7 +6025,7 @@ index cf3e9b1..e5dfa5a 100644 kfree(bfqd->root_group); #endif -@@ -3954,6 +4772,7 @@ static void bfq_init_root_group(struct bfq_group *root_group, +@@ -3954,6 +4804,7 @@ static void bfq_init_root_group(struct bfq_group *root_group, root_group->rq_pos_tree = RB_ROOT; for (i = 0; i < BFQ_IOPRIO_CLASSES; i++) root_group->sched_data.service_tree[i] = BFQ_SERVICE_TREE_INIT; @@ -5944,7 +6033,7 @@ index cf3e9b1..e5dfa5a 100644 } static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) -@@ -3978,11 +4797,14 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) +@@ -3978,11 +4829,14 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) * will not attempt to free it. */ bfq_init_bfqq(bfqd, &bfqd->oom_bfqq, NULL, 1, 0); @@ -5960,7 +6049,7 @@ index cf3e9b1..e5dfa5a 100644 /* * Trigger weight initialization, according to ioprio, at the * oom_bfqq's first activation. The oom_bfqq's ioprio and ioprio -@@ -4001,13 +4823,10 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) +@@ -4001,13 +4855,10 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) goto out_free; bfq_init_root_group(bfqd->root_group, bfqd); bfq_init_entity(&bfqd->oom_bfqq.entity, bfqd->root_group); @@ -5976,7 +6065,7 @@ index cf3e9b1..e5dfa5a 100644 bfqd->queue_weights_tree = RB_ROOT; bfqd->group_weights_tree = RB_ROOT; -@@ -4027,21 +4846,19 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) +@@ -4027,21 +4878,19 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) bfqd->bfq_back_max = bfq_back_max; bfqd->bfq_back_penalty = bfq_back_penalty; bfqd->bfq_slice_idle = bfq_slice_idle; @@ -6005,7 +6094,7 @@ index cf3e9b1..e5dfa5a 100644 bfqd->bfq_wr_rt_max_time = msecs_to_jiffies(300); bfqd->bfq_wr_max_time = 0; bfqd->bfq_wr_min_idle_time = msecs_to_jiffies(2000); -@@ -4053,16 +4870,15 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) +@@ -4053,16 +4902,15 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) * video. */ bfqd->wr_busy_queues = 0; @@ -6026,7 +6115,7 @@ index cf3e9b1..e5dfa5a 100644 bfqd->device_speed = BFQ_BFQD_FAST; return 0; -@@ -4088,7 +4904,7 @@ static int __init bfq_slab_setup(void) +@@ -4088,7 +4936,7 @@ static int __init bfq_slab_setup(void) static ssize_t bfq_var_show(unsigned int var, char *page) { @@ -6035,7 +6124,7 @@ index cf3e9b1..e5dfa5a 100644 } static ssize_t bfq_var_store(unsigned long *var, const char *page, -@@ -4159,21 +4975,21 @@ static ssize_t bfq_weights_show(struct elevator_queue *e, char *page) +@@ -4159,21 +5007,21 @@ static ssize_t bfq_weights_show(struct elevator_queue *e, char *page) static ssize_t __FUNC(struct elevator_queue *e, char *page) \ { \ struct bfq_data *bfqd = e->elevator_data; \ @@ -6066,7 +6155,7 @@ index cf3e9b1..e5dfa5a 100644 SHOW_FUNCTION(bfq_low_latency_show, bfqd->low_latency, 0); SHOW_FUNCTION(bfq_wr_coeff_show, bfqd->bfq_wr_coeff, 0); SHOW_FUNCTION(bfq_wr_rt_max_time_show, bfqd->bfq_wr_rt_max_time, 1); -@@ -4183,6 +4999,17 @@ SHOW_FUNCTION(bfq_wr_min_inter_arr_async_show, bfqd->bfq_wr_min_inter_arr_async, +@@ -4183,6 +5031,17 @@ SHOW_FUNCTION(bfq_wr_min_inter_arr_async_show, bfqd->bfq_wr_min_inter_arr_async, SHOW_FUNCTION(bfq_wr_max_softrt_rate_show, bfqd->bfq_wr_max_softrt_rate, 0); #undef SHOW_FUNCTION @@ -6084,7 +6173,7 @@ index cf3e9b1..e5dfa5a 100644 #define STORE_FUNCTION(__FUNC, __PTR, MIN, MAX, __CONV) \ static ssize_t \ __FUNC(struct elevator_queue *e, const char *page, size_t count) \ -@@ -4194,24 +5021,22 @@ __FUNC(struct elevator_queue *e, const char *page, size_t count) \ +@@ -4194,24 +5053,22 @@ __FUNC(struct elevator_queue *e, const char *page, size_t count) \ __data = (MIN); \ else if (__data > (MAX)) \ __data = (MAX); \ @@ -6115,7 +6204,7 @@ index cf3e9b1..e5dfa5a 100644 STORE_FUNCTION(bfq_wr_coeff_store, &bfqd->bfq_wr_coeff, 1, INT_MAX, 0); STORE_FUNCTION(bfq_wr_max_time_store, &bfqd->bfq_wr_max_time, 0, INT_MAX, 1); STORE_FUNCTION(bfq_wr_rt_max_time_store, &bfqd->bfq_wr_rt_max_time, 0, INT_MAX, -@@ -4224,6 +5049,23 @@ STORE_FUNCTION(bfq_wr_max_softrt_rate_store, &bfqd->bfq_wr_max_softrt_rate, 0, +@@ -4224,6 +5081,23 @@ STORE_FUNCTION(bfq_wr_max_softrt_rate_store, &bfqd->bfq_wr_max_softrt_rate, 0, INT_MAX, 0); #undef STORE_FUNCTION @@ -6139,7 +6228,7 @@ index cf3e9b1..e5dfa5a 100644 /* do nothing for the moment */ static ssize_t bfq_weights_store(struct elevator_queue *e, const char *page, size_t count) -@@ -4231,16 +5073,6 @@ static ssize_t bfq_weights_store(struct elevator_queue *e, +@@ -4231,16 +5105,6 @@ static ssize_t bfq_weights_store(struct elevator_queue *e, return count; } @@ -6156,7 +6245,7 @@ index cf3e9b1..e5dfa5a 100644 static ssize_t bfq_max_budget_store(struct elevator_queue *e, const char *page, size_t count) { -@@ -4249,7 +5081,7 @@ static ssize_t bfq_max_budget_store(struct elevator_queue *e, +@@ -4249,7 +5113,7 @@ static ssize_t bfq_max_budget_store(struct elevator_queue *e, int ret = bfq_var_store(&__data, (page), count); if (__data == 0) @@ -6165,7 +6254,7 @@ index cf3e9b1..e5dfa5a 100644 else { if (__data > INT_MAX) __data = INT_MAX; -@@ -4261,6 +5093,10 @@ static ssize_t bfq_max_budget_store(struct elevator_queue *e, +@@ -4261,6 +5125,10 @@ static ssize_t bfq_max_budget_store(struct elevator_queue *e, return ret; } @@ -6176,7 +6265,7 @@ index cf3e9b1..e5dfa5a 100644 static ssize_t bfq_timeout_sync_store(struct elevator_queue *e, const char *page, size_t count) { -@@ -4273,9 +5109,27 @@ static ssize_t bfq_timeout_sync_store(struct elevator_queue *e, +@@ -4273,9 +5141,27 @@ static ssize_t bfq_timeout_sync_store(struct elevator_queue *e, else if (__data > INT_MAX) __data = INT_MAX; @@ -6206,7 +6295,7 @@ index cf3e9b1..e5dfa5a 100644 return ret; } -@@ -4305,10 +5159,10 @@ static struct elv_fs_entry bfq_attrs[] = { +@@ -4305,10 +5191,10 @@ static struct elv_fs_entry bfq_attrs[] = { BFQ_ATTR(back_seek_max), BFQ_ATTR(back_seek_penalty), BFQ_ATTR(slice_idle), @@ -6219,7 +6308,15 @@ index cf3e9b1..e5dfa5a 100644 BFQ_ATTR(low_latency), BFQ_ATTR(wr_coeff), BFQ_ATTR(wr_max_time), -@@ -4328,7 +5182,8 @@ static struct elevator_type iosched_bfq = { +@@ -4321,14 +5207,15 @@ static struct elv_fs_entry bfq_attrs[] = { + }; + + static struct elevator_type iosched_bfq = { +- .ops = { ++ .ops.sq = { + .elevator_merge_fn = bfq_merge, + .elevator_merged_fn = bfq_merged_request, + .elevator_merge_req_fn = bfq_merged_requests, #ifdef CONFIG_BFQ_GROUP_IOSCHED .elevator_bio_merged_fn = bfq_bio_merged, #endif @@ -6229,7 +6326,7 @@ index cf3e9b1..e5dfa5a 100644 .elevator_dispatch_fn = bfq_dispatch_requests, .elevator_add_req_fn = bfq_insert_request, .elevator_activate_req_fn = bfq_activate_request, -@@ -4351,18 +5206,28 @@ static struct elevator_type iosched_bfq = { +@@ -4351,18 +5238,28 @@ static struct elevator_type iosched_bfq = { .elevator_owner = THIS_MODULE, }; @@ -6263,11 +6360,11 @@ index cf3e9b1..e5dfa5a 100644 - - if (bfq_timeout_async == 0) - bfq_timeout_async = 1; -+ char msg[60] = "BFQ I/O-scheduler: v8r8"; ++ char msg[60] = "BFQ I/O-scheduler: v8r11"; #ifdef CONFIG_BFQ_GROUP_IOSCHED ret = blkcg_policy_register(&blkcg_policy_bfq); -@@ -4375,27 +5240,46 @@ static int __init bfq_init(void) +@@ -4375,27 +5272,46 @@ static int __init bfq_init(void) goto err_pol_unreg; /* @@ -6327,10 +6424,10 @@ index cf3e9b1..e5dfa5a 100644 return 0; diff --git a/block/bfq-sched.c b/block/bfq-sched.c -index a5ed694..2e9dc59 100644 +index a5ed694..1fde070 100644 --- a/block/bfq-sched.c +++ b/block/bfq-sched.c -@@ -7,28 +7,166 @@ +@@ -7,28 +7,173 @@ * Copyright (C) 2008 Fabio Checconi * Paolo Valente * @@ -6338,10 +6435,15 @@ index a5ed694..2e9dc59 100644 + * Copyright (C) 2015 Paolo Valente + * + * Copyright (C) 2016 Paolo Valente -+ */ -+ + */ + +-#ifdef CONFIG_BFQ_GROUP_IOSCHED +-#define for_each_entity(entity) \ +- for (; entity ; entity = entity->parent) +static struct bfq_group *bfqq_group(struct bfq_queue *bfqq); -+ + +-#define for_each_entity_safe(entity, parent) \ +- for (; entity && ({ parent = entity->parent; 1; }); entity = parent) +/** + * bfq_gt - compare two timestamps. + * @a: first ts. @@ -6357,12 +6459,16 @@ index a5ed694..2e9dc59 100644 +static struct bfq_entity *bfq_root_active_entity(struct rb_root *tree) +{ + struct rb_node *node = tree->rb_node; -+ + + return rb_entry(node, struct bfq_entity, rb_node); +} -+ + +-static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd, +- int extract, +- struct bfq_data *bfqd); +static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd); -+ + +-static struct bfq_group *bfqq_group(struct bfq_queue *bfqq); +static bool bfq_update_parent_budget(struct bfq_entity *next_in_service); + +/** @@ -6387,7 +6493,7 @@ index a5ed694..2e9dc59 100644 + * Returns true if sd->next_in_service changes in such a way that + * entity->parent may become the next_in_service for its parent + * entity. - */ ++ */ +static bool bfq_update_next_in_service(struct bfq_sched_data *sd, + struct bfq_entity *new_entity) +{ @@ -6453,24 +6559,25 @@ index a5ed694..2e9dc59 100644 + if (next_in_service) { + parent_sched_may_change = !sd->next_in_service || + bfq_update_parent_budget(next_in_service); -+ } ++ } else ++ parent_sched_may_change = sd->next_in_service; + + sd->next_in_service = next_in_service; + + if (!next_in_service) + return parent_sched_may_change; - ++ + bfqq = bfq_entity_to_bfqq(next_in_service); + if (bfqq) + bfq_log_bfqq(bfqq->bfqd, bfqq, + "update_next_in_service: chosen this queue"); - #ifdef CONFIG_BFQ_GROUP_IOSCHED --#define for_each_entity(entity) \ ++#ifdef CONFIG_BFQ_GROUP_IOSCHED + else { + struct bfq_group *bfqg = + container_of(next_in_service, + struct bfq_group, entity); -+ + +-static void bfq_update_budget(struct bfq_entity *next_in_service) + bfq_log_bfqg((struct bfq_data *)bfqg->bfqd, bfqg, + "update_next_in_service: chosen this entity"); + } @@ -6481,19 +6588,17 @@ index a5ed694..2e9dc59 100644 +#ifdef CONFIG_BFQ_GROUP_IOSCHED +/* both next loops stop at one of the child entities of the root group */ +#define for_each_entity(entity) \ - for (; entity ; entity = entity->parent) - - #define for_each_entity_safe(entity, parent) \ - for (; entity && ({ parent = entity->parent; 1; }); entity = parent) - -- --static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd, -- int extract, -- struct bfq_data *bfqd); -- --static struct bfq_group *bfqq_group(struct bfq_queue *bfqq); -- --static void bfq_update_budget(struct bfq_entity *next_in_service) ++ for (; entity ; entity = entity->parent) ++ ++/* ++ * For each iteration, compute parent in advance, so as to be safe if ++ * entity is deallocated during the iteration. Such a deallocation may ++ * happen as a consequence of a bfq_put_queue that frees the bfq_queue ++ * containing entity. ++ */ ++#define for_each_entity_safe(entity, parent) \ ++ for (; entity && ({ parent = entity->parent; 1; }); entity = parent) ++ +/* + * Returns true if this budget changes may let next_in_service->parent + * become the next_in_service entity for its parent entity. @@ -6507,7 +6612,7 @@ index a5ed694..2e9dc59 100644 BUG_ON(!next_in_service); -@@ -41,60 +179,68 @@ static void bfq_update_budget(struct bfq_entity *next_in_service) +@@ -41,60 +186,68 @@ static void bfq_update_budget(struct bfq_entity *next_in_service) * as it must never become an in-service entity. */ bfqg_entity = bfqg->my_entity; @@ -6608,7 +6713,7 @@ index a5ed694..2e9dc59 100644 /* * Shift for timestamp calculations. This actually limits the maximum -@@ -105,18 +251,6 @@ static void bfq_update_budget(struct bfq_entity *next_in_service) +@@ -105,18 +258,6 @@ static void bfq_update_budget(struct bfq_entity *next_in_service) */ #define WFQ_SERVICE_SHIFT 22 @@ -6627,7 +6732,7 @@ index a5ed694..2e9dc59 100644 static struct bfq_queue *bfq_entity_to_bfqq(struct bfq_entity *entity) { struct bfq_queue *bfqq = NULL; -@@ -151,20 +285,36 @@ static u64 bfq_delta(unsigned long service, unsigned long weight) +@@ -151,20 +292,36 @@ static u64 bfq_delta(unsigned long service, unsigned long weight) static void bfq_calc_finish(struct bfq_entity *entity, unsigned long service) { struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); @@ -6666,7 +6771,7 @@ index a5ed694..2e9dc59 100644 } } -@@ -293,10 +443,26 @@ static void bfq_update_min(struct bfq_entity *entity, struct rb_node *node) +@@ -293,10 +450,26 @@ static void bfq_update_min(struct bfq_entity *entity, struct rb_node *node) static void bfq_update_active_node(struct rb_node *node) { struct bfq_entity *entity = rb_entry(node, struct bfq_entity, rb_node); @@ -6693,7 +6798,7 @@ index a5ed694..2e9dc59 100644 } /** -@@ -386,8 +552,6 @@ static void bfq_active_insert(struct bfq_service_tree *st, +@@ -386,8 +559,6 @@ static void bfq_active_insert(struct bfq_service_tree *st, BUG_ON(!bfqg); BUG_ON(!bfqd); bfqg->active_entities++; @@ -6702,7 +6807,7 @@ index a5ed694..2e9dc59 100644 } #endif } -@@ -399,7 +563,7 @@ static void bfq_active_insert(struct bfq_service_tree *st, +@@ -399,7 +570,7 @@ static void bfq_active_insert(struct bfq_service_tree *st, static unsigned short bfq_ioprio_to_weight(int ioprio) { BUG_ON(ioprio < 0 || ioprio >= IOPRIO_BE_NR); @@ -6711,7 +6816,7 @@ index a5ed694..2e9dc59 100644 } /** -@@ -422,9 +586,9 @@ static void bfq_get_entity(struct bfq_entity *entity) +@@ -422,9 +593,9 @@ static void bfq_get_entity(struct bfq_entity *entity) struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); if (bfqq) { @@ -6723,7 +6828,7 @@ index a5ed694..2e9dc59 100644 } } -@@ -499,10 +663,6 @@ static void bfq_active_extract(struct bfq_service_tree *st, +@@ -499,10 +670,6 @@ static void bfq_active_extract(struct bfq_service_tree *st, BUG_ON(!bfqd); BUG_ON(!bfqg->active_entities); bfqg->active_entities--; @@ -6734,22 +6839,62 @@ index a5ed694..2e9dc59 100644 } #endif } -@@ -547,12 +707,12 @@ static void bfq_forget_entity(struct bfq_service_tree *st, +@@ -531,28 +698,32 @@ static void bfq_idle_insert(struct bfq_service_tree *st, + } + /** +- * bfq_forget_entity - remove an entity from the wfq trees. ++ * bfq_forget_entity - do not consider entity any longer for scheduling + * @st: the service tree. + * @entity: the entity being removed. ++ * @is_in_service: true if entity is currently the in-service entity. + * +- * Update the device status and forget everything about @entity, putting +- * the device reference to it, if it is a queue. Entities belonging to +- * groups are not refcounted. ++ * Forget everything about @entity. In addition, if entity represents ++ * a queue, and the latter is not in service, then release the service ++ * reference to the queue (the one taken through bfq_get_entity). In ++ * fact, in this case, there is really no more service reference to ++ * the queue, as the latter is also outside any service tree. If, ++ * instead, the queue is in service, then __bfq_bfqd_reset_in_service ++ * will take care of putting the reference when the queue finally ++ * stops being served. + */ + static void bfq_forget_entity(struct bfq_service_tree *st, +- struct bfq_entity *entity) ++ struct bfq_entity *entity, ++ bool is_in_service) + { + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); +- struct bfq_sched_data *sd; +- BUG_ON(!entity->on_st); - entity->on_st = 0; + entity->on_st = false; st->wsum -= entity->weight; - if (bfqq) { - sd = entity->sched_data; - bfq_log_bfqq(bfqq->bfqd, bfqq, "forget_entity: %p %d", +- if (bfqq) { +- sd = entity->sched_data; +- bfq_log_bfqq(bfqq->bfqd, bfqq, "forget_entity: %p %d", - bfqq, atomic_read(&bfqq->ref)); ++ if (bfqq && !is_in_service) { ++ bfq_log_bfqq(bfqq->bfqd, bfqq, "forget_entity (before): %p %d", + bfqq, bfqq->ref); bfq_put_queue(bfqq); } } -@@ -602,7 +762,7 @@ __bfq_entity_update_weight_prio(struct bfq_service_tree *old_st, +@@ -566,7 +737,8 @@ static void bfq_put_idle_entity(struct bfq_service_tree *st, + struct bfq_entity *entity) + { + bfq_idle_extract(st, entity); +- bfq_forget_entity(st, entity); ++ bfq_forget_entity(st, entity, ++ entity == entity->sched_data->in_service_entity); + } + + /** +@@ -602,7 +774,7 @@ __bfq_entity_update_weight_prio(struct bfq_service_tree *old_st, if (entity->prio_changed) { struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); @@ -6758,7 +6903,7 @@ index a5ed694..2e9dc59 100644 struct bfq_data *bfqd = NULL; struct rb_root *root; #ifdef CONFIG_BFQ_GROUP_IOSCHED -@@ -630,7 +790,10 @@ __bfq_entity_update_weight_prio(struct bfq_service_tree *old_st, +@@ -630,7 +802,10 @@ __bfq_entity_update_weight_prio(struct bfq_service_tree *old_st, entity->new_weight > BFQ_MAX_WEIGHT) { pr_crit("update_weight_prio: new_weight %d\n", entity->new_weight); @@ -6770,7 +6915,7 @@ index a5ed694..2e9dc59 100644 } entity->orig_weight = entity->new_weight; if (bfqq) -@@ -661,6 +824,13 @@ __bfq_entity_update_weight_prio(struct bfq_service_tree *old_st, +@@ -661,6 +836,13 @@ __bfq_entity_update_weight_prio(struct bfq_service_tree *old_st, * associated with its new weight. */ if (prev_weight != new_weight) { @@ -6784,7 +6929,7 @@ index a5ed694..2e9dc59 100644 root = bfqq ? &bfqd->queue_weights_tree : &bfqd->group_weights_tree; bfq_weights_tree_remove(bfqd, entity, root); -@@ -707,7 +877,7 @@ static void bfq_bfqq_served(struct bfq_queue *bfqq, int served) +@@ -707,7 +889,7 @@ static void bfq_bfqq_served(struct bfq_queue *bfqq, int served) st = bfq_entity_service_tree(entity); entity->service += served; @@ -6793,7 +6938,7 @@ index a5ed694..2e9dc59 100644 BUG_ON(st->wsum == 0); st->vtime += bfq_delta(served, st->wsum); -@@ -716,234 +886,574 @@ static void bfq_bfqq_served(struct bfq_queue *bfqq, int served) +@@ -716,234 +898,589 @@ static void bfq_bfqq_served(struct bfq_queue *bfqq, int served) #ifdef CONFIG_BFQ_GROUP_IOSCHED bfqg_stats_set_start_empty_time(bfqq_group(bfqq)); #endif @@ -6847,12 +6992,10 @@ index a5ed694..2e9dc59 100644 + if (time_ms > 0 && time_ms < timeout_ms) + tot_serv_to_charge = + (bfqd->bfq_max_budget * time_ms) / timeout_ms; - -- bfq_log_bfqq(bfqq->bfqd, bfqq, "charge_full_budget"); ++ + if (tot_serv_to_charge < entity->service) + tot_serv_to_charge = entity->service; - -- bfq_bfqq_served(bfqq, entity->budget - entity->service); ++ + bfq_log_bfqq(bfqq->bfqd, bfqq, + "charge_time: %lu/%u ms, %d/%d/%d sectors", + time_ms, timeout_ms, entity->service, @@ -6872,7 +7015,8 @@ index a5ed694..2e9dc59 100644 +{ + struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity); + struct bfq_sched_data *sd = entity->sched_data; -+ + +- bfq_log_bfqq(bfqq->bfqd, bfqq, "charge_full_budget"); + st = __bfq_entity_update_weight_prio(st, entity); + bfq_calc_finish(entity, entity->budget); + @@ -6914,7 +7058,8 @@ index a5ed694..2e9dc59 100644 + + if (bfqq) + delta /= bfqq->wr_coeff; -+ + +- bfq_bfqq_served(bfqq, entity->budget - entity->service); + entity->start += delta; + entity->finish += delta; + @@ -7031,6 +7176,12 @@ index a5ed694..2e9dc59 100644 - entity->start = st->vtime; + entity->start = min_vstart; st->wsum += entity->weight; ++ /* ++ * entity is about to be inserted into a service tree, ++ * and then set in service: get a reference to make ++ * sure entity does not disappear until it is no ++ * longer in service or scheduled for service. ++ */ bfq_get_entity(entity); - BUG_ON(entity->on_st); @@ -7239,27 +7390,33 @@ index a5ed694..2e9dc59 100644 + bool ins_into_idle_tree) { struct bfq_sched_data *sd = entity->sched_data; -- struct bfq_service_tree *st; + struct bfq_service_tree *st; - int was_in_service; - int ret = 0; -- ++ bool is_in_service; + - if (sd == NULL || !entity->on_st) /* never activated, or inactive */ - return 0; -+ struct bfq_service_tree *st = bfq_entity_service_tree(entity); -+ bool was_in_service = entity == sd->in_service_entity; - -- st = bfq_entity_service_tree(entity); -- was_in_service = entity == sd->in_service_entity; + if (!entity->on_st) { /* entity never activated, or already inactive */ -+ BUG_ON(entity == entity->sched_data->in_service_entity); ++ BUG_ON(sd && entity == sd->in_service_entity); + return false; + } ++ /* ++ * If we get here, then entity is active, which implies that ++ * bfq_group_set_parent has already been invoked for the group ++ * represented by entity. Therefore, the field ++ * entity->sched_data has been set, and we can safely use it. ++ */ + st = bfq_entity_service_tree(entity); +- was_in_service = entity == sd->in_service_entity; ++ is_in_service = entity == sd->in_service_entity; + - BUG_ON(was_in_service && entity->tree); -+ BUG_ON(was_in_service && entity->tree && entity->tree != &st->active); ++ BUG_ON(is_in_service && entity->tree && entity->tree != &st->active); - if (was_in_service) { -+ if (was_in_service) ++ if (is_in_service) bfq_calc_finish(entity, entity->service); - sd->in_service_entity = NULL; - } else if (entity->tree == &st->active) @@ -7267,7 +7424,7 @@ index a5ed694..2e9dc59 100644 + if (entity->tree == &st->active) bfq_active_extract(st, entity); - else if (entity->tree == &st->idle) -+ else if (!was_in_service && entity->tree == &st->idle) ++ else if (!is_in_service && entity->tree == &st->idle) bfq_idle_extract(st, entity); else if (entity->tree) BUG(); @@ -7276,8 +7433,9 @@ index a5ed694..2e9dc59 100644 - ret = bfq_update_next_in_service(sd); - - if (!requeue || !bfq_gt(entity->finish, st->vtime)) +- bfq_forget_entity(st, entity); + if (!ins_into_idle_tree || !bfq_gt(entity->finish, st->vtime)) - bfq_forget_entity(st, entity); ++ bfq_forget_entity(st, entity, is_in_service); else bfq_idle_insert(st, entity); @@ -7325,8 +7483,8 @@ index a5ed694..2e9dc59 100644 - * The parent entity is still backlogged, and - * we don't need to update it as it is still - * in service. -+ * Entity is not any tree any more, so, this -+ * deactivation is a no-op, and there is ++ * entity is not in any tree any more, so ++ * this deactivation is a no-op, and there is + * nothing to change for upper-level entities + * (in case of expiration, this can never + * happen). @@ -7338,29 +7496,29 @@ index a5ed694..2e9dc59 100644 + */ + return; + } ++ ++ if (sd->next_in_service == entity) ++ /* ++ * entity was the next_in_service entity, ++ * then, since entity has just been ++ * deactivated, a new one must be found. ++ */ ++ bfq_update_next_in_service(sd, NULL); - if (sd->next_in_service) -+ if (sd->next_in_service == entity) ++ if (sd->next_in_service) { /* - * The parent entity is still backlogged and - * the budgets on the path towards the root - * need to be updated. -+ * entity was the next_in_service entity, -+ * then, since entity has just been -+ * deactivated, a new one must be found. - */ -- goto update; -+ bfq_update_next_in_service(sd, NULL); -+ -+ if (sd->next_in_service) { -+ /* + * The parent entity is still backlogged, + * because next_in_service is not NULL. So, no + * further upwards deactivation must be + * performed. Yet, next_in_service has + * changed. Then the schedule does need to be + * updated upwards. -+ */ + */ +- goto update; + BUG_ON(sd->next_in_service == entity); + break; + } @@ -7491,7 +7649,7 @@ index a5ed694..2e9dc59 100644 bfq_forget_idle(st); } } -@@ -952,6 +1462,7 @@ static void bfq_update_vtime(struct bfq_service_tree *st) +@@ -952,6 +1489,7 @@ static void bfq_update_vtime(struct bfq_service_tree *st) * bfq_first_active_entity - find the eligible entity with * the smallest finish time * @st: the service tree to select from. @@ -7499,7 +7657,7 @@ index a5ed694..2e9dc59 100644 * * This function searches the first schedulable entity, starting from the * root of the tree and going on the left every time on this side there is -@@ -959,7 +1470,8 @@ static void bfq_update_vtime(struct bfq_service_tree *st) +@@ -959,7 +1497,8 @@ static void bfq_update_vtime(struct bfq_service_tree *st) * the right is followed only if a) the left subtree contains no eligible * entities and b) no eligible entity has been found yet. */ @@ -7509,7 +7667,7 @@ index a5ed694..2e9dc59 100644 { struct bfq_entity *entry, *first = NULL; struct rb_node *node = st->active.rb_node; -@@ -967,15 +1479,15 @@ static struct bfq_entity *bfq_first_active_entity(struct bfq_service_tree *st) +@@ -967,15 +1506,15 @@ static struct bfq_entity *bfq_first_active_entity(struct bfq_service_tree *st) while (node) { entry = rb_entry(node, struct bfq_entity, rb_node); left: @@ -7528,7 +7686,7 @@ index a5ed694..2e9dc59 100644 node = node->rb_left; goto left; } -@@ -993,31 +1505,84 @@ static struct bfq_entity *bfq_first_active_entity(struct bfq_service_tree *st) +@@ -993,31 +1532,84 @@ static struct bfq_entity *bfq_first_active_entity(struct bfq_service_tree *st) * __bfq_lookup_next_entity - return the first eligible entity in @st. * @st: the service tree. * @@ -7628,7 +7786,7 @@ index a5ed694..2e9dc59 100644 return entity; } -@@ -1025,50 +1590,81 @@ static struct bfq_entity *__bfq_lookup_next_entity(struct bfq_service_tree *st, +@@ -1025,50 +1617,81 @@ static struct bfq_entity *__bfq_lookup_next_entity(struct bfq_service_tree *st, /** * bfq_lookup_next_entity - return the first eligible entity in @sd. * @sd: the sched_data. @@ -7742,7 +7900,7 @@ index a5ed694..2e9dc59 100644 /* * Get next queue for service. */ -@@ -1083,58 +1679,208 @@ static struct bfq_queue *bfq_get_next_queue(struct bfq_data *bfqd) +@@ -1083,58 +1706,273 @@ static struct bfq_queue *bfq_get_next_queue(struct bfq_data *bfqd) if (bfqd->busy_queues == 0) return NULL; @@ -7890,14 +8048,16 @@ index a5ed694..2e9dc59 100644 static void __bfq_bfqd_reset_in_service(struct bfq_data *bfqd) { -+ struct bfq_entity *entity = &bfqd->in_service_queue->entity; ++ struct bfq_queue *in_serv_bfqq = bfqd->in_service_queue; ++ struct bfq_entity *in_serv_entity = &in_serv_bfqq->entity; ++ struct bfq_entity *entity = in_serv_entity; + if (bfqd->in_service_bic) { put_io_context(bfqd->in_service_bic->icq.ioc); bfqd->in_service_bic = NULL; } -+ bfq_clear_bfqq_wait_request(bfqd->in_service_queue); ++ bfq_clear_bfqq_wait_request(in_serv_bfqq); + hrtimer_try_to_cancel(&bfqd->idle_slice_timer); bfqd->in_service_queue = NULL; - del_timer(&bfqd->idle_slice_timer); @@ -7910,6 +8070,66 @@ index a5ed694..2e9dc59 100644 + */ + for_each_entity(entity) + entity->sched_data->in_service_entity = NULL; ++ ++ /* ++ * in_serv_entity is no longer in service, so, if it is in no ++ * service tree either, then release the service reference to ++ * the queue it represents (taken with bfq_get_entity). ++ */ ++ if (!in_serv_entity->on_st) ++ bfq_put_queue(in_serv_bfqq); ++} ++ ++static void set_next_in_service_bfqq(struct bfq_data *bfqd) ++{ ++ struct bfq_entity *entity = NULL; ++ struct bfq_queue *bfqq; ++ struct bfq_sched_data *sd = &bfqd->root_group->sched_data; ++ ++ BUG_ON(!sd); ++ ++ /* Traverse the path from the root to the in-service leaf entity */ ++ for (; sd ; sd = entity->my_sched_data) { ++#ifdef CONFIG_BFQ_GROUP_IOSCHED ++ if (entity) { ++ struct bfq_group *bfqg = ++ container_of(entity, struct bfq_group, entity); ++ ++ bfq_log_bfqg(bfqd, bfqg, ++ "set_next_in_service_bfqq: lookup in this group"); ++ } else ++ bfq_log_bfqg(bfqd, bfqd->root_group, ++ "set_next_in_service_bfqq: lookup in root group"); ++#endif ++ ++ entity = sd->next_in_service; ++ ++ if (!entity) { ++ bfqd->next_in_service_queue = NULL; ++ return; ++ } ++ ++ /* Log some information */ ++ bfqq = bfq_entity_to_bfqq(entity); ++ if (bfqq) ++ bfq_log_bfqq(bfqd, bfqq, ++ "set_next_in_service_bfqq: this queue, finish %llu", ++ (((entity->finish>>10)*1000)>>10)>>2); ++#ifdef CONFIG_BFQ_GROUP_IOSCHED ++ else { ++ struct bfq_group *bfqg = ++ container_of(entity, struct bfq_group, entity); ++ ++ bfq_log_bfqg(bfqd, bfqg, ++ "set_next_in_service_bfqq: this entity, finish %llu", ++ (((entity->finish>>10)*1000)>>10)>>2); ++ } ++#endif ++ ++ } ++ BUG_ON(!bfq_entity_to_bfqq(entity)); ++ ++ bfqd->next_in_service_queue = bfq_entity_to_bfqq(entity); } static void bfq_deactivate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, @@ -7923,6 +8143,7 @@ index a5ed694..2e9dc59 100644 - - bfq_deactivate_entity(entity, requeue); + bfq_deactivate_entity(entity, ins_into_idle_tree, expiration); ++ set_next_in_service_bfqq(bfqd); } static void bfq_activate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq) @@ -7938,6 +8159,7 @@ index a5ed694..2e9dc59 100644 + bfq_activate_requeue_entity(entity, bfq_bfqq_non_blocking_wait_rq(bfqq), + false); + bfq_clear_bfqq_non_blocking_wait_rq(bfqq); ++ set_next_in_service_bfqq(bfqd); +} + +static void bfq_requeue_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq) @@ -7946,6 +8168,7 @@ index a5ed694..2e9dc59 100644 + + bfq_activate_requeue_entity(entity, false, + bfqq == bfqd->in_service_queue); ++ set_next_in_service_bfqq(bfqd); } -#ifdef CONFIG_BFQ_GROUP_IOSCHED @@ -7964,7 +8187,7 @@ index a5ed694..2e9dc59 100644 { BUG_ON(!bfq_bfqq_busy(bfqq)); BUG_ON(!RB_EMPTY_ROOT(&bfqq->sort_list)); -@@ -1146,27 +1892,20 @@ static void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq, +@@ -1146,27 +1984,18 @@ static void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq, BUG_ON(bfqd->busy_queues == 0); bfqd->busy_queues--; @@ -7994,12 +8217,10 @@ index a5ed694..2e9dc59 100644 + BUG_ON(bfqq->entity.budget < 0); + + bfq_deactivate_bfqq(bfqd, bfqq, true, expiration); -+ -+ BUG_ON(bfqq->entity.budget < 0); } /* -@@ -1184,16 +1923,11 @@ static void bfq_add_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq) +@@ -1184,16 +2013,11 @@ static void bfq_add_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq) bfq_mark_bfqq_busy(bfqq); bfqd->busy_queues++; @@ -8019,13 +8240,13 @@ index a5ed694..2e9dc59 100644 bfqd->wr_busy_queues++; } diff --git a/block/bfq.h b/block/bfq.h -index fcce855..2a2bc30 100644 +index fcce855..5f08990 100644 --- a/block/bfq.h +++ b/block/bfq.h @@ -1,5 +1,5 @@ /* - * BFQ-v7r11 for 4.5.0: data structures and common functions prototypes. -+ * BFQ v8r8 for 4.10.0: data structures and common functions prototypes. ++ * BFQ v8r11 for 4.11.0: data structures and common functions prototypes. * * Based on ideas and code from CFQ: * Copyright (C) 2003 Jens Axboe @@ -8040,7 +8261,16 @@ index fcce855..2a2bc30 100644 */ #ifndef _BFQ_H -@@ -28,20 +30,21 @@ +@@ -15,8 +17,6 @@ + + #include + #include +-#include +-#include + #include + + #define BFQ_IOPRIO_CLASSES 3 +@@ -28,20 +28,21 @@ #define BFQ_DEFAULT_QUEUE_IOPRIO 4 @@ -8069,7 +8299,7 @@ index fcce855..2a2bc30 100644 * * Each service tree represents a B-WF2Q+ scheduler on its own. Each * ioprio_class has its own independent scheduler, and so its own -@@ -49,27 +52,28 @@ struct bfq_entity; +@@ -49,27 +50,28 @@ struct bfq_entity; * of the containing bfqd. */ struct bfq_service_tree { @@ -8108,7 +8338,7 @@ index fcce855..2a2bc30 100644 * * The supported ioprio_classes are the same as in CFQ, in descending * priority order, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE. -@@ -79,48 +83,32 @@ struct bfq_service_tree { +@@ -79,48 +81,32 @@ struct bfq_service_tree { * All the fields are protected by the queue lock of the containing bfqd. */ struct bfq_sched_data { @@ -8169,7 +8399,7 @@ index fcce855..2a2bc30 100644 * * A bfq_entity is used to represent either a bfq_queue (leaf node in the * cgroup hierarchy) or a bfq_group into the upper level scheduler. Each -@@ -147,27 +135,52 @@ struct bfq_weight_counter { +@@ -147,27 +133,52 @@ struct bfq_weight_counter { * containing bfqd. */ struct bfq_entity { @@ -8229,7 +8459,7 @@ index fcce855..2a2bc30 100644 int prio_changed; }; -@@ -175,56 +188,6 @@ struct bfq_group; +@@ -175,56 +186,6 @@ struct bfq_group; /** * struct bfq_queue - leaf schedulable entity. @@ -8286,7 +8516,7 @@ index fcce855..2a2bc30 100644 * * A bfq_queue is a leaf request queue; it can be associated with an * io_context or more, if it is async or shared between cooperating -@@ -235,117 +198,175 @@ struct bfq_group; +@@ -235,117 +196,175 @@ struct bfq_group; * All the fields are protected by the queue lock of the containing bfqd. */ struct bfq_queue { @@ -8508,7 +8738,7 @@ index fcce855..2a2bc30 100644 }; enum bfq_device_speed { -@@ -354,224 +375,232 @@ enum bfq_device_speed { +@@ -354,224 +373,234 @@ enum bfq_device_speed { }; /** @@ -8713,6 +8943,8 @@ index fcce855..2a2bc30 100644 + /* bfq_queue in service */ struct bfq_queue *in_service_queue; ++ /* candidate bfq_queue to become the next in-service queue */ ++ struct bfq_queue *next_in_service_queue; + /* bfq_io_cq (bic) associated with the @in_service_queue */ struct bfq_io_cq *in_service_bic; diff --git a/README.BFQ b/README.BFQ index 28d5f1d..4aa2425 100644 --- a/README.BFQ +++ b/README.BFQ @@ -1,7 +1,7 @@ Budget Fair Queueing I/O Scheduler ================================== -This patchset introduces BFQ-v8r8 into Linux 4.10.0. +This patchset introduces BFQ-v8r11 into Linux 4.11.0. For further information: http://algogroup.unimore.it/people/paolo/disk_sched/ The overall diffstat is the following: @@ -21,6 +21,43 @@ The overall diffstat is the following: CHANGELOG +BFQ v8r11 + + BUGFIX: use pointer entity->sched_data only if set. + In the function __bfq_deactivate_entity, the pointer + entity->sched_data could happen to be used before being properly + initialized. This led to a NULL pointer dereference. This commit fixes + this bug by just using this pointer only where it is safe to do so. + Reported-by: Tom Harrison + Tested-by: Tom Harrison + + BUGFIX: don't dereference bic before null checking it. + The call to bfq_check_ioprio_change will dereference bic, however, + the null check for bic is after this call. Move the the null + check on bic to before the call to avoid any potential null + pointer dereference issues. + Detected by CoverityScan, CID#1430138 ("Dereference before null check") + Signed-off-by: Colin Ian King + Signed-off-by: Jens Axboe + +BFQ v8r10 + + BUGFIX: Handle failure of weight-counter allocation + Reported-by: Bart Van Assche + + BUGFIX: Remove problematic check on max service duration + Reported-by: Bart Van Assche + +BFQ v8r9 + + BUGIFX: remove use of bfq queues after free + bfq queues occasionally happened to be used after being freed, because + they were accessed after some invocations of bfq_put_queue that could + cause them to be freed. This commit refactors code, when needed, to + avoid any occurrence of such a use-after-free of a bfq queue. This + commit also adds comments to make references to bfq queues easier to + follow. + BFQ v8r8 . BUGFIX: Removed a wrong compilation warning, due to the compiler diff --git a/disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch b/disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch index b7c4447..4d0c606 100644 --- a/disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch +++ b/disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch @@ -1,8 +1,8 @@ diff --git a/Makefile b/Makefile -index b103777..e942e6a 100644 +index 7bab127..f327099 100644 --- a/Makefile +++ b/Makefile -@@ -555,9 +555,7 @@ ifeq ($(KBUILD_EXTMOD),) +@@ -557,9 +557,7 @@ ifeq ($(KBUILD_EXTMOD),) # Carefully list dependencies so we do not try to build scripts twice # in parallel PHONY += scripts @@ -13,16 +13,16 @@ index b103777..e942e6a 100644 # Objects we will link into vmlinux / subdirs we need to visit init-y := init/ -@@ -1033,7 +1031,7 @@ prepare0: archprepare gcc-plugins +@@ -1047,7 +1045,7 @@ prepare0: archprepare gcc-plugins $(Q)$(MAKE) $(build)=. # All the preparing.. -prepare: prepare0 prepare-objtool +prepare: - ifdef CONFIG_STACK_VALIDATION - has_libelf := $(call try-run,\ -@@ -1268,13 +1266,8 @@ endif # CONFIG_MODULES + PHONY += prepare-objtool + prepare-objtool: $(objtool_target) +@@ -1270,13 +1268,8 @@ endif # CONFIG_MODULES CLEAN_DIRS += $(MODVERDIR) # Directories & files removed with 'make mrproper' @@ -38,7 +38,7 @@ index b103777..e942e6a 100644 # clean - Delete most, but leave enough to build external modules # -@@ -1296,7 +1289,7 @@ clean: archclean vmlinuxclean +@@ -1298,7 +1291,7 @@ clean: archclean vmlinuxclean # mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) diff --git a/fs-aufs4.patch b/fs-aufs4.patch index c4a227f..a2fe38a 100644 --- a/fs-aufs4.patch +++ b/fs-aufs4.patch @@ -1772,10 +1772,10 @@ index 0000000..b7ba75d +Currently this approach is applied to address_space_operations for +regular files only. diff --git a/MAINTAINERS b/MAINTAINERS -index 527d137..b6ea8ae 100644 +index 38d3e4e..c2b31bf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -2308,6 +2308,19 @@ F: include/linux/audit.h +@@ -2319,6 +2319,19 @@ F: include/linux/audit.h F: include/uapi/linux/audit.h F: kernel/audit* @@ -1796,7 +1796,7 @@ index 527d137..b6ea8ae 100644 M: Miguel Ojeda Sandonis W: http://miguelojeda.es/auxdisplay.htm diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index 7fd5a6a..fa7cee0 100644 +index 0ecb646..cf39138 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -701,6 +701,24 @@ static inline int is_loop_device(struct file *file) @@ -2153,10 +2153,10 @@ index 0000000..7f5eb78 +#endif /* __AUFS_H__ */ diff --git a/fs/aufs/branch.c b/fs/aufs/branch.c new file mode 100644 -index 0000000..57fd10e +index 0000000..1cca020 --- /dev/null +++ b/fs/aufs/branch.c -@@ -0,0 +1,1412 @@ +@@ -0,0 +1,1423 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -2195,7 +2195,9 @@ index 0000000..57fd10e + + if (br->br_xino.xi_file) + fput(br->br_xino.xi_file); -+ mutex_destroy(&br->br_xino.xi_nondir_mtx); ++ for (i = br->br_xino.xi_nondir.total - 1; i >= 0; i--) ++ AuDebugOn(br->br_xino.xi_nondir.array[i]); ++ kfree(br->br_xino.xi_nondir.array); + + AuDebugOn(au_br_count(br)); + au_br_count_fin(br); @@ -2210,7 +2212,7 @@ index 0000000..57fd10e + + if (br->br_fhsm) { + au_br_fhsm_fin(br->br_fhsm); -+ au_delayed_kfree(br->br_fhsm); ++ kfree(br->br_fhsm); + } + + key = br->br_dykey; @@ -2225,8 +2227,8 @@ index 0000000..57fd10e + path_put(&br->br_path); + lockdep_on(); + if (wbr) -+ au_delayed_kfree(wbr); -+ au_delayed_kfree(br); ++ kfree(wbr); ++ kfree(br); +} + +/* @@ -2290,14 +2292,19 @@ index 0000000..57fd10e + int err; + + err = -ENOMEM; -+ root = sb->s_root; + add_branch = kzalloc(sizeof(*add_branch), GFP_NOFS); + if (unlikely(!add_branch)) + goto out; ++ add_branch->br_xino.xi_nondir.total = 8; /* initial size */ ++ add_branch->br_xino.xi_nondir.array ++ = kzalloc(sizeof(ino_t) * add_branch->br_xino.xi_nondir.total, ++ GFP_NOFS); ++ if (unlikely(!add_branch->br_xino.xi_nondir.array)) ++ goto out_br; + + err = au_hnotify_init_br(add_branch, perm); + if (unlikely(err)) -+ goto out_br; ++ goto out_xinondir; + + if (au_br_writable(perm)) { + /* may be freed separately at changing the branch permission */ @@ -2313,6 +2320,7 @@ index 0000000..57fd10e + goto out_wbr; + } + ++ root = sb->s_root; + err = au_sbr_realloc(au_sbi(sb), new_nbranch, /*may_shrink*/0); + if (!err) + err = au_di_realloc(au_di(root), new_nbranch, /*may_shrink*/0); @@ -2325,11 +2333,13 @@ index 0000000..57fd10e + +out_wbr: + if (add_branch->br_wbr) -+ au_delayed_kfree(add_branch->br_wbr); ++ kfree(add_branch->br_wbr); +out_hnotify: + au_hnotify_fin_br(add_branch); ++out_xinondir: ++ kfree(add_branch->br_xino.xi_nondir.array); +out_br: -+ au_delayed_kfree(add_branch); ++ kfree(add_branch); +out: + return ERR_PTR(err); +} @@ -2495,7 +2505,7 @@ index 0000000..57fd10e + br->br_perm = old_perm; + + if (!err && wbr && !au_br_writable(new_perm)) { -+ au_delayed_kfree(wbr); ++ kfree(wbr); + br->br_wbr = NULL; + } + @@ -2541,7 +2551,8 @@ index 0000000..57fd10e + struct inode *h_inode; + + err = 0; -+ mutex_init(&br->br_xino.xi_nondir_mtx); ++ spin_lock_init(&br->br_xino.xi_nondir.spin); ++ init_waitqueue_head(&br->br_xino.xi_nondir.wqh); + br->br_perm = add->perm; + br->br_path = add->path; /* set first, path_get() later */ + spin_lock_init(&br->br_dykey_lock); @@ -3521,7 +3532,7 @@ index 0000000..57fd10e + if (br->br_wbr) { + err = au_wbr_init(br, sb, mod->perm); + if (unlikely(err)) { -+ au_delayed_kfree(br->br_wbr); ++ kfree(br->br_wbr); + br->br_wbr = NULL; + } + } @@ -3533,7 +3544,7 @@ index 0000000..57fd10e + if (!au_br_fhsm(mod->perm)) { + /* fhsm --> non-fhsm */ + au_br_fhsm_fin(br->br_fhsm); -+ au_delayed_kfree(br->br_fhsm); ++ kfree(br->br_fhsm); + br->br_fhsm = NULL; + } + } else if (au_br_fhsm(mod->perm)) @@ -3546,7 +3557,7 @@ index 0000000..57fd10e + +out_bf: + if (bf) -+ au_delayed_kfree(bf); ++ kfree(bf); +out: + AuTraceErr(err); + return err; @@ -3571,10 +3582,10 @@ index 0000000..57fd10e +} diff --git a/fs/aufs/branch.h b/fs/aufs/branch.h new file mode 100644 -index 0000000..13aa12e +index 0000000..e9591cf --- /dev/null +++ b/fs/aufs/branch.h -@@ -0,0 +1,309 @@ +@@ -0,0 +1,321 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -3611,7 +3622,14 @@ index 0000000..13aa12e +/* a xino file */ +struct au_xino_file { + struct file *xi_file; -+ struct mutex xi_nondir_mtx; ++ struct { ++ spinlock_t spin; ++ ino_t *array; ++ int total; ++ /* reserved for future use */ ++ /* unsigned long *bitmap; */ ++ wait_queue_head_t wqh; ++ } xi_nondir; + + /* todo: make xino files an array to support huge inode number */ + @@ -3810,6 +3828,11 @@ index 0000000..13aa12e +struct file *au_xino_def(struct super_block *sb); +int au_xino_path(struct seq_file *seq, struct file *file); + ++void au_xinondir_leave(struct super_block *sb, aufs_bindex_t bindex, ++ ino_t h_ino, int idx); ++int au_xinondir_enter(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ int *idx); ++ +/* ---------------------------------------------------------------------- */ + +/* Superblock to branch */ @@ -3930,10 +3953,10 @@ index 0000000..0bbb2d3 +-include ${srctree}/${src}/conf_priv.mk diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c new file mode 100644 -index 0000000..4749fe2 +index 0000000..f5ca12b --- /dev/null +++ b/fs/aufs/cpup.c -@@ -0,0 +1,1388 @@ +@@ -0,0 +1,1407 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -4293,9 +4316,9 @@ index 0000000..4749fe2 + dst->f_pos = 0; + err = au_do_copy_file(dst, src, len, buf, blksize); + if (do_kfree) -+ au_delayed_kfree(buf); ++ kfree(buf); + else -+ au_delayed_free_page((unsigned long)buf); ++ free_page((unsigned long)buf); + +out: + return err; @@ -4329,7 +4352,7 @@ index 0000000..4749fe2 + .label = &&out_src + } + }; -+ struct super_block *sb; ++ struct super_block *sb, *h_src_sb; + struct inode *h_src_inode; + struct task_struct *tsk = current; + @@ -4347,9 +4370,28 @@ index 0000000..4749fe2 + + /* try stopping to update while we copyup */ + h_src_inode = d_inode(file[SRC].dentry); -+ if (!au_test_nfs(h_src_inode->i_sb)) ++ h_src_sb = h_src_inode->i_sb; ++ if (!au_test_nfs(h_src_sb)) + IMustLock(h_src_inode); -+ err = au_copy_file(file[DST].file, file[SRC].file, cpg->len); ++ ++ if (h_src_sb != file_inode(file[DST].file)->i_sb ++ || !file[DST].file->f_op->clone_file_range) ++ err = au_copy_file(file[DST].file, file[SRC].file, cpg->len); ++ else { ++ if (!au_test_nfs(h_src_sb)) { ++ inode_unlock(h_src_inode); ++ err = vfsub_clone_file_range(file[SRC].file, ++ file[DST].file, cpg->len); ++ inode_lock(h_src_inode); ++ } else ++ err = vfsub_clone_file_range(file[SRC].file, ++ file[DST].file, cpg->len); ++ if (unlikely(err == -EOPNOTSUPP && au_test_nfs(h_src_sb))) ++ /* the backend fs on NFS may not support cloning */ ++ err = au_copy_file(file[DST].file, file[SRC].file, ++ cpg->len); ++ AuTraceErr(err); ++ } + + /* i wonder if we had O_NO_DELAY_FPUT flag */ + if (tsk->flags & PF_KTHREAD) @@ -4457,7 +4499,7 @@ index 0000000..4749fe2 + sym.k[symlen] = 0; + err = vfsub_symlink(h_dir, h_path, sym.k); + } -+ au_delayed_free_page((unsigned long)sym.k); ++ free_page((unsigned long)sym.k); + +out: + return err; @@ -4831,7 +4873,7 @@ index 0000000..4749fe2 + } +out_parent: + dput(dst_parent); -+ au_delayed_kfree(a); ++ kfree(a); +out: + return err; +} @@ -5424,7 +5466,7 @@ index 0000000..9c20116 +#endif /* __AUFS_CPUP_H__ */ diff --git a/fs/aufs/dbgaufs.c b/fs/aufs/dbgaufs.c new file mode 100644 -index 0000000..ace36ed +index 0000000..30913f4 --- /dev/null +++ b/fs/aufs/dbgaufs.c @@ -0,0 +1,438 @@ @@ -5471,7 +5513,7 @@ index 0000000..ace36ed +static int dbgaufs_xi_release(struct inode *inode __maybe_unused, + struct file *file) +{ -+ au_delayed_kfree(file->private_data); ++ kfree(file->private_data); + return 0; +} + @@ -5533,7 +5575,7 @@ index 0000000..ace36ed +static int dbgaufs_plink_release(struct inode *inode __maybe_unused, + struct file *file) +{ -+ au_delayed_free_page((unsigned long)file->private_data); ++ free_page((unsigned long)file->private_data); + return 0; +} + @@ -5597,7 +5639,7 @@ index 0000000..ace36ed + goto out; /* success */ + +out_free: -+ au_delayed_free_page((unsigned long)p); ++ free_page((unsigned long)p); +out: + return err; +} @@ -5922,7 +5964,7 @@ index 0000000..d0c01c8 +#endif /* __DBGAUFS_H__ */ diff --git a/fs/aufs/dcsub.c b/fs/aufs/dcsub.c new file mode 100644 -index 0000000..63516a1 +index 0000000..0e02131 --- /dev/null +++ b/fs/aufs/dcsub.c @@ -0,0 +1,225 @@ @@ -5957,7 +5999,7 @@ index 0000000..63516a1 + p = dpage->dentries; + for (i = 0; i < dpage->ndentry; i++) + dput(*p++); -+ au_delayed_free_page((unsigned long)dpage->dentries); ++ free_page((unsigned long)dpage->dentries); +} + +int au_dpages_init(struct au_dcsub_pages *dpages, gfp_t gfp) @@ -5980,7 +6022,7 @@ index 0000000..63516a1 + return 0; /* success */ + +out_dpages: -+ au_delayed_kfree(dpages->dpages); ++ kfree(dpages->dpages); +out: + return err; +} @@ -5993,7 +6035,7 @@ index 0000000..63516a1 + p = dpages->dpages; + for (i = 0; i < dpages->ndpage; i++) + au_dpage_free(p++); -+ au_delayed_kfree(dpages->dpages); ++ kfree(dpages->dpages); +} + +static int au_dpages_append(struct au_dcsub_pages *dpages, @@ -6295,7 +6337,7 @@ index 0000000..92d6f91 +#endif /* __AUFS_DCSUB_H__ */ diff --git a/fs/aufs/debug.c b/fs/aufs/debug.c new file mode 100644 -index 0000000..0529b3f +index 0000000..12cc993 --- /dev/null +++ b/fs/aufs/debug.c @@ -0,0 +1,440 @@ @@ -6637,7 +6679,7 @@ index 0000000..0529b3f + au_br_count_init(&a->fake); + err = do_pri_br(-1, &a->fake); + au_br_count_fin(&a->fake); -+ au_delayed_kfree(a); ++ kfree(a); + dpri("dev 0x%x\n", sb->s_dev); + if (err || !au_test_aufs(sb)) + return; @@ -6972,7 +7014,7 @@ index 0000000..270628d +#endif /* __AUFS_DEBUG_H__ */ diff --git a/fs/aufs/dentry.c b/fs/aufs/dentry.c new file mode 100644 -index 0000000..95e8ffd +index 0000000..91952bd --- /dev/null +++ b/fs/aufs/dentry.c @@ -0,0 +1,1130 @@ @@ -7192,7 +7234,7 @@ index 0000000..95e8ffd + +out_parent: + dput(parent); -+ au_delayed_kfree(whname.name); ++ kfree(whname.name); +out: + return err; +} @@ -8108,10 +8150,10 @@ index 0000000..95e8ffd +}; diff --git a/fs/aufs/dentry.h b/fs/aufs/dentry.h new file mode 100644 -index 0000000..d9dc991 +index 0000000..adb40ed --- /dev/null +++ b/fs/aufs/dentry.h -@@ -0,0 +1,255 @@ +@@ -0,0 +1,252 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -8152,10 +8194,7 @@ index 0000000..d9dc991 + struct au_rwsem di_rwsem; + aufs_bindex_t di_btop, di_bbot, di_bwh, di_bdiropq; + unsigned char di_tmpfile; /* to allow the different name */ -+ union { -+ struct au_hdentry *di_hdentry; -+ struct llist_node di_lnode; /* delayed free */ -+ }; ++ struct au_hdentry *di_hdentry; +} ____cacheline_aligned_in_smp; + +/* ---------------------------------------------------------------------- */ @@ -8369,7 +8408,7 @@ index 0000000..d9dc991 +#endif /* __AUFS_DENTRY_H__ */ diff --git a/fs/aufs/dinfo.c b/fs/aufs/dinfo.c new file mode 100644 -index 0000000..a092544 +index 0000000..8b19f94 --- /dev/null +++ b/fs/aufs/dinfo.c @@ -0,0 +1,553 @@ @@ -8428,7 +8467,7 @@ index 0000000..a092544 + goto out; + } + -+ au_cache_dfree_dinfo(dinfo); ++ au_cache_free_dinfo(dinfo); + dinfo = NULL; + +out: @@ -8448,8 +8487,8 @@ index 0000000..a092544 + while (bindex++ <= bbot) + au_hdput(p++); + } -+ au_delayed_kfree(dinfo->di_hdentry); -+ au_cache_dfree_dinfo(dinfo); ++ kfree(dinfo->di_hdentry); ++ au_cache_free_dinfo(dinfo); +} + +void au_di_swap(struct au_dinfo *a, struct au_dinfo *b) @@ -8651,11 +8690,11 @@ index 0000000..a092544 + || d_inode(d1) == d_inode(d2) + || d1->d_sb != d2->d_sb); + -+ if (isdir && au_test_subdir(d1, d2)) { ++ if ((isdir && au_test_subdir(d1, d2)) ++ || d1 < d2) { + di_write_lock_child(d1); + di_write_lock_child2(d2); + } else { -+ /* there should be no races */ + di_write_lock_child(d2); + di_write_lock_child2(d1); + } @@ -8667,11 +8706,11 @@ index 0000000..a092544 + || d_inode(d1) == d_inode(d2) + || d1->d_sb != d2->d_sb); + -+ if (isdir && au_test_subdir(d1, d2)) { ++ if ((isdir && au_test_subdir(d1, d2)) ++ || d1 < d2) { + di_write_lock_parent(d1); + di_write_lock_parent2(d2); + } else { -+ /* there should be no races */ + di_write_lock_parent(d2); + di_write_lock_parent2(d1); + } @@ -8928,10 +8967,10 @@ index 0000000..a092544 +} diff --git a/fs/aufs/dir.c b/fs/aufs/dir.c new file mode 100644 -index 0000000..a677d04 +index 0000000..a6b7e96 --- /dev/null +++ b/fs/aufs/dir.c -@@ -0,0 +1,762 @@ +@@ -0,0 +1,759 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -9090,7 +9129,7 @@ index 0000000..a677d04 +out: + dput(a->dentry); + au_nwt_done(&au_sbi(sb)->si_nowait); -+ au_delayed_kfree(arg); ++ kfree(arg); +} + +void au_dir_ts(struct inode *dir, aufs_bindex_t bindex) @@ -9126,7 +9165,7 @@ index 0000000..a677d04 + if (unlikely(wkq_err)) { + pr_err("wkq %d\n", wkq_err); + dput(dentry); -+ au_delayed_kfree(arg); ++ kfree(arg); + } + +out: @@ -9245,7 +9284,7 @@ index 0000000..a677d04 + }; + err = au_do_open(file, &args); + if (unlikely(err)) -+ au_delayed_kfree(fidir); ++ kfree(fidir); + } + si_read_unlock(sb); + return err; @@ -9259,9 +9298,7 @@ index 0000000..a677d04 + struct au_fidir *fidir; + struct au_hfile *hf; + aufs_bindex_t bindex, bbot; -+ int execed, delayed; + -+ delayed = (current->flags & PF_KTHREAD) || in_interrupt(); + finfo = au_fi(file); + fidir = finfo->fi_hdir; + if (fidir) { @@ -9269,11 +9306,10 @@ index 0000000..a677d04 + &au_sbi(file->f_path.dentry->d_sb)->si_files); + vdir_cache = fidir->fd_vdir_cache; /* lock-free */ + if (vdir_cache) -+ au_vdir_free(vdir_cache, delayed); ++ au_vdir_free(vdir_cache); + + bindex = finfo->fi_btop; + if (bindex >= 0) { -+ execed = vfsub_file_execed(file); + hf = fidir->fd_hfile + bindex; + /* + * calls fput() instead of filp_close(), @@ -9282,12 +9318,12 @@ index 0000000..a677d04 + bbot = fidir->fd_bbot; + for (; bindex <= bbot; bindex++, hf++) + if (hf->hf_file) -+ au_hfput(hf, execed); ++ au_hfput(hf, /*execed*/0); + } -+ au_delayed_kfree(fidir); ++ kfree(fidir); + finfo->fi_hdir = NULL; + } -+ au_finfo_fin(file, delayed); ++ au_finfo_fin(file); + return 0; +} + @@ -9352,7 +9388,7 @@ index 0000000..a677d04 + struct super_block *sb; + struct inode *inode; + -+ err = au_reval_and_lock_fdi(file, reopen_dir, /*wlock*/1); ++ err = au_reval_and_lock_fdi(file, reopen_dir, /*wlock*/1, /*fi_lsc*/0); + if (unlikely(err)) + goto out; + @@ -9421,7 +9457,7 @@ index 0000000..a677d04 + + sb = dentry->d_sb; + si_read_lock(sb, AuLock_FLUSH); -+ err = au_reval_and_lock_fdi(file, reopen_dir, /*wlock*/1); ++ err = au_reval_and_lock_fdi(file, reopen_dir, /*wlock*/1, /*fi_lsc*/0); + if (unlikely(err)) + goto out; + err = au_alive_dir(dentry); @@ -9696,10 +9732,10 @@ index 0000000..a677d04 +}; diff --git a/fs/aufs/dir.h b/fs/aufs/dir.h new file mode 100644 -index 0000000..5ff6c17 +index 0000000..b107309 --- /dev/null +++ b/fs/aufs/dir.h -@@ -0,0 +1,137 @@ +@@ -0,0 +1,131 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -9744,10 +9780,7 @@ index 0000000..5ff6c17 + +struct au_vdir_dehstr { + struct hlist_node hash; -+ union { -+ struct au_vdir_destr *str; -+ struct llist_node lnode; /* delayed free */ -+ }; ++ struct au_vdir_destr *str; +} ____cacheline_aligned_in_smp; + +struct au_vdir_de { @@ -9785,10 +9818,7 @@ index 0000000..5ff6c17 + + unsigned long vd_version; + unsigned int vd_deblk_sz; -+ union { -+ unsigned long vd_jiffy; -+ struct llist_node vd_lnode; /* delayed free */ -+ }; ++ unsigned long vd_jiffy; +} ____cacheline_aligned_in_smp; + +/* ---------------------------------------------------------------------- */ @@ -9812,7 +9842,7 @@ index 0000000..5ff6c17 +int au_nhash_append_wh(struct au_nhash *whlist, char *name, int nlen, ino_t ino, + unsigned int d_type, aufs_bindex_t bindex, + unsigned char shwh); -+void au_vdir_free(struct au_vdir *vdir, int atonce); ++void au_vdir_free(struct au_vdir *vdir); +int au_vdir_init(struct file *file); +int au_vdir_fill_de(struct file *file, struct dir_context *ctx); + @@ -9839,7 +9869,7 @@ index 0000000..5ff6c17 +#endif /* __AUFS_DIR_H__ */ diff --git a/fs/aufs/dynop.c b/fs/aufs/dynop.c new file mode 100644 -index 0000000..c47e1a1 +index 0000000..443791a --- /dev/null +++ b/fs/aufs/dynop.c @@ -0,0 +1,371 @@ @@ -9959,7 +9989,7 @@ index 0000000..c47e1a1 + + key = container_of(rcu, struct au_dykey, dk_rcu); + DyPrSym(key); -+ kfree(key); /* not delayed */ ++ kfree(key); +} + +static void dy_free(struct kref *kref) @@ -10087,7 +10117,7 @@ index 0000000..c47e1a1 + p->set(key, op->dy_hop, au_br_sb(br)); + old = dy_gadd(sphl, key); + if (old) { -+ au_delayed_kfree(key); ++ kfree(key); + key = old; + } + @@ -10296,7 +10326,7 @@ index 0000000..c19c675 +#endif /* __AUFS_DYNOP_H__ */ diff --git a/fs/aufs/export.c b/fs/aufs/export.c new file mode 100644 -index 0000000..4c187d6 +index 0000000..34b391c --- /dev/null +++ b/fs/aufs/export.c @@ -0,0 +1,836 @@ @@ -10718,7 +10748,7 @@ index 0000000..4c187d6 + } + +out_name: -+ au_delayed_free_page((unsigned long)arg.name); ++ free_page((unsigned long)arg.name); +out_file: + fput(file); +out: @@ -10872,7 +10902,7 @@ index 0000000..4c187d6 + dentry = ERR_PTR(-ESTALE); + } +out_pathname: -+ au_delayed_free_page((unsigned long)pathname); ++ free_page((unsigned long)pathname); +out_h_parent: + dput(h_parent); +out: @@ -11138,10 +11168,10 @@ index 0000000..4c187d6 +} diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c new file mode 100644 -index 0000000..61a38fd +index 0000000..97c2f19 --- /dev/null +++ b/fs/aufs/f_op.c -@@ -0,0 +1,723 @@ +@@ -0,0 +1,816 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -11243,7 +11273,6 @@ index 0000000..61a38fd +{ + struct au_finfo *finfo; + aufs_bindex_t bindex; -+ int delayed; + + finfo = au_fi(file); + au_sphl_del(&finfo->fi_hlist, @@ -11252,8 +11281,7 @@ index 0000000..61a38fd + if (bindex >= 0) + au_set_h_fptr(file, bindex, NULL); + -+ delayed = (current->flags & PF_KTHREAD) || in_interrupt(); -+ au_finfo_fin(file, delayed); ++ au_finfo_fin(file); + return 0; +} + @@ -11286,12 +11314,12 @@ index 0000000..61a38fd + */ + +/* Callers should call au_read_post() or fput() in the end */ -+struct file *au_read_pre(struct file *file, int keep_fi) ++struct file *au_read_pre(struct file *file, int keep_fi, unsigned int lsc) +{ + struct file *h_file; + int err; + -+ err = au_reval_and_lock_fdi(file, au_reopen_nondir, /*wlock*/0); ++ err = au_reval_and_lock_fdi(file, au_reopen_nondir, /*wlock*/0, lsc); + if (!err) { + di_read_unlock(file->f_path.dentry, AuLock_IR); + h_file = au_hf_top(file); @@ -11312,6 +11340,10 @@ index 0000000..61a38fd +} + +struct au_write_pre { ++ /* input */ ++ unsigned int lsc; ++ ++ /* output */ + blkcnt_t blks; + aufs_bindex_t btop; +}; @@ -11327,9 +11359,13 @@ index 0000000..61a38fd + struct file *h_file; + struct dentry *dentry; + int err; ++ unsigned int lsc; + struct au_pin pin; + -+ err = au_reval_and_lock_fdi(file, au_reopen_nondir, /*wlock*/1); ++ lsc = 0; ++ if (wpre) ++ lsc = wpre->lsc; ++ err = au_reval_and_lock_fdi(file, au_reopen_nondir, /*wlock*/1, lsc); + h_file = ERR_PTR(err); + if (unlikely(err)) + goto out; @@ -11371,12 +11407,11 @@ index 0000000..61a38fd + h_inode = file_inode(h_file); + inode->i_mode = h_inode->i_mode; + ii_write_unlock(inode); -+ fput(h_file); -+ + /* AuDbg("blks %llu, %llu\n", (u64)blks, (u64)h_inode->i_blocks); */ + if (written > 0) + au_fhsm_wrote(inode->i_sb, wpre->btop, + /*force*/h_inode->i_blocks > wpre->blks); ++ fput(h_file); +} + +static ssize_t aufs_read(struct file *file, char __user *buf, size_t count, @@ -11391,7 +11426,7 @@ index 0000000..61a38fd + sb = inode->i_sb; + si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); + -+ h_file = au_read_pre(file, /*keep_fi*/0); ++ h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) + goto out; @@ -11441,6 +11476,7 @@ index 0000000..61a38fd + inode = file_inode(file); + au_mtx_and_read_lock(inode); + ++ wpre.lsc = 0; + h_file = au_write_pre(file, /*do_ready*/1, &wpre); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) @@ -11500,7 +11536,7 @@ index 0000000..61a38fd + sb = inode->i_sb; + si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); + -+ h_file = au_read_pre(file, /*keep_fi*/1); ++ h_file = au_read_pre(file, /*keep_fi*/1, /*lsc*/0); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) + goto out; @@ -11535,6 +11571,7 @@ index 0000000..61a38fd + inode = file_inode(file); + au_mtx_and_read_lock(inode); + ++ wpre.lsc = 0; + h_file = au_write_pre(file, /*do_ready*/1, &wpre); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) @@ -11562,7 +11599,7 @@ index 0000000..61a38fd + sb = inode->i_sb; + si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); + -+ h_file = au_read_pre(file, /*keep_fi*/0); ++ h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) + goto out; @@ -11589,6 +11626,7 @@ index 0000000..61a38fd + inode = file_inode(file); + au_mtx_and_read_lock(inode); + ++ wpre.lsc = 0; + h_file = au_write_pre(file, /*do_ready*/1, &wpre); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) @@ -11614,6 +11652,7 @@ index 0000000..61a38fd + inode = file_inode(file); + au_mtx_and_read_lock(inode); + ++ wpre.lsc = 0; + h_file = au_write_pre(file, /*do_ready*/1, &wpre); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) @@ -11630,6 +11669,88 @@ index 0000000..61a38fd + return err; +} + ++static ssize_t aufs_copy_file_range(struct file *src, loff_t src_pos, ++ struct file *dst, loff_t dst_pos, ++ size_t len, unsigned int flags) ++{ ++ ssize_t err; ++ struct au_write_pre wpre; ++ enum { SRC, DST }; ++ struct { ++ struct inode *inode; ++ struct file *h_file; ++ struct super_block *h_sb; ++ } a[2]; ++#define a_src a[SRC] ++#define a_dst a[DST] ++ ++ err = -EINVAL; ++ a_src.inode = file_inode(src); ++ if (unlikely(!S_ISREG(a_src.inode->i_mode))) ++ goto out; ++ a_dst.inode = file_inode(dst); ++ if (unlikely(!S_ISREG(a_dst.inode->i_mode))) ++ goto out; ++ ++ au_mtx_and_read_lock(a_dst.inode); ++ /* ++ * in order to match the order in di_write_lock2_{child,parent}(), ++ * use f_path.dentry for this comparision. ++ */ ++ if (src->f_path.dentry < dst->f_path.dentry) { ++ a_src.h_file = au_read_pre(src, /*keep_fi*/1, AuLsc_FI_1); ++ err = PTR_ERR(a_src.h_file); ++ if (IS_ERR(a_src.h_file)) ++ goto out_si; ++ ++ wpre.lsc = AuLsc_FI_2; ++ a_dst.h_file = au_write_pre(dst, /*do_ready*/1, &wpre); ++ err = PTR_ERR(a_dst.h_file); ++ if (IS_ERR(a_dst.h_file)) { ++ au_read_post(a_src.inode, a_src.h_file); ++ goto out_si; ++ } ++ } else { ++ wpre.lsc = AuLsc_FI_1; ++ a_dst.h_file = au_write_pre(dst, /*do_ready*/1, &wpre); ++ err = PTR_ERR(a_dst.h_file); ++ if (IS_ERR(a_dst.h_file)) ++ goto out_si; ++ ++ a_src.h_file = au_read_pre(src, /*keep_fi*/1, AuLsc_FI_2); ++ err = PTR_ERR(a_src.h_file); ++ if (IS_ERR(a_src.h_file)) { ++ au_write_post(a_dst.inode, a_dst.h_file, &wpre, ++ /*written*/0); ++ goto out_si; ++ } ++ } ++ ++ err = -EXDEV; ++ a_src.h_sb = file_inode(a_src.h_file)->i_sb; ++ a_dst.h_sb = file_inode(a_dst.h_file)->i_sb; ++ if (unlikely(a_src.h_sb != a_dst.h_sb)) { ++ AuDbgFile(src); ++ AuDbgFile(dst); ++ goto out_file; ++ } ++ ++ err = vfsub_copy_file_range(a_src.h_file, src_pos, a_dst.h_file, ++ dst_pos, len, flags); ++ ++out_file: ++ au_write_post(a_dst.inode, a_dst.h_file, &wpre, err); ++ fi_read_unlock(src); ++ au_read_post(a_src.inode, a_src.h_file); ++out_si: ++ si_read_unlock(a_dst.inode->i_sb); ++ inode_unlock(a_dst.inode); ++out: ++ return err; ++#undef a_src ++#undef a_dst ++} ++ +/* ---------------------------------------------------------------------- */ + +/* @@ -11759,6 +11880,7 @@ index 0000000..61a38fd + inode = file_inode(file); + au_mtx_and_read_lock(inode); + ++ wpre.lsc = 0; + h_file = au_write_pre(file, /*do_ready*/1, &wpre); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) @@ -11783,7 +11905,7 @@ index 0000000..61a38fd + sb = file->f_path.dentry->d_sb; + si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); + -+ h_file = au_read_pre(file, /*keep_fi*/0); ++ h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) + goto out; @@ -11806,7 +11928,7 @@ index 0000000..61a38fd + sb = file->f_path.dentry->d_sb; + si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); + -+ h_file = au_read_pre(file, /*keep_fi*/0); ++ h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) + goto out; @@ -11863,7 +11985,8 @@ index 0000000..61a38fd + .aio_splice_write = aufs_aio_splice_write, + .aio_splice_read = aufs_aio_splice_read, +#endif -+ .fallocate = aufs_fallocate ++ .fallocate = aufs_fallocate, ++ .copy_file_range = aufs_copy_file_range +}; diff --git a/fs/aufs/fhsm.c b/fs/aufs/fhsm.c new file mode 100644 @@ -12299,10 +12422,10 @@ index 0000000..ef6f99e +} diff --git a/fs/aufs/file.c b/fs/aufs/file.c new file mode 100644 -index 0000000..a16aa52 +index 0000000..daaecab --- /dev/null +++ b/fs/aufs/file.c -@@ -0,0 +1,857 @@ +@@ -0,0 +1,858 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -12578,7 +12701,7 @@ index 0000000..a16aa52 + } + if (unlikely(err)) { + finfo->fi_hdir = NULL; -+ au_finfo_fin(file, /*atonce*/0); ++ au_finfo_fin(file); + } + +out: @@ -12898,7 +13021,6 @@ index 0000000..a16aa52 + +static void au_do_refresh_dir(struct file *file) +{ -+ int execed; + aufs_bindex_t bindex, bbot, new_bindex, brid; + struct au_hfile *p, tmp, *q; + struct au_finfo *finfo; @@ -12937,7 +13059,6 @@ index 0000000..a16aa52 + } + } + -+ execed = vfsub_file_execed(file); + p = fidir->fd_hfile; + if (!au_test_mmapped(file) && !d_unlinked(file->f_path.dentry)) { + bbot = au_sbbot(sb); @@ -12946,14 +13067,14 @@ index 0000000..a16aa52 + if (p->hf_file) { + if (file_inode(p->hf_file)) + break; -+ au_hfput(p, execed); ++ au_hfput(p, /*execed*/0); + } + } else { + bbot = au_br_index(sb, brid); + for (finfo->fi_btop = 0; finfo->fi_btop < bbot; + finfo->fi_btop++, p++) + if (p->hf_file) -+ au_hfput(p, execed); ++ au_hfput(p, /*execed*/0); + bbot = au_sbbot(sb); + } + @@ -12963,7 +13084,7 @@ index 0000000..a16aa52 + if (p->hf_file) { + if (file_inode(p->hf_file)) + break; -+ au_hfput(p, execed); ++ au_hfput(p, /*execed*/0); + } + AuDebugOn(fidir->fd_bbot < finfo->fi_btop); +} @@ -13025,7 +13146,7 @@ index 0000000..a16aa52 + +/* common function to regular file and dir */ +int au_reval_and_lock_fdi(struct file *file, int (*reopen)(struct file *file), -+ int wlock) ++ int wlock, unsigned int fi_lsc) +{ + int err; + unsigned int sigen, figen; @@ -13038,9 +13159,12 @@ index 0000000..a16aa52 + dentry = file->f_path.dentry; + inode = d_inode(dentry); + sigen = au_sigen(dentry->d_sb); -+ fi_write_lock(file); ++ fi_write_lock_nested(file, fi_lsc); + figen = au_figen(file); -+ di_write_lock_child(dentry); ++ if (!fi_lsc) ++ di_write_lock_child(dentry); ++ else ++ di_write_lock_child2(dentry); + btop = au_dbtop(dentry); + pseudo_link = (btop != au_ibtop(inode)); + if (sigen == figen && !pseudo_link && au_fbtop(file) == btop) { @@ -13162,10 +13286,10 @@ index 0000000..a16aa52 +}; diff --git a/fs/aufs/file.h b/fs/aufs/file.h new file mode 100644 -index 0000000..4fc7eca +index 0000000..d12fd97 --- /dev/null +++ b/fs/aufs/file.h -@@ -0,0 +1,294 @@ +@@ -0,0 +1,330 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -13231,10 +13355,7 @@ index 0000000..4fc7eca + struct au_fidir *fi_hdir; /* for dir only */ + + struct hlist_node fi_hlist; -+ union { -+ struct file *fi_file; /* very ugly */ -+ struct llist_node fi_lnode; /* delayed free */ -+ }; ++ struct file *fi_file; /* very ugly */ +} ____cacheline_aligned_in_smp; + +/* ---------------------------------------------------------------------- */ @@ -13256,7 +13377,7 @@ index 0000000..4fc7eca +struct au_pin; +int au_ready_to_write(struct file *file, loff_t len, struct au_pin *pin); +int au_reval_and_lock_fdi(struct file *file, int (*reopen)(struct file *file), -+ int wlock); ++ int wlock, unsigned int fi_lsc); +int au_do_flush(struct file *file, fl_owner_t id, + int (*flush)(struct file *file, fl_owner_t id)); + @@ -13282,7 +13403,7 @@ index 0000000..4fc7eca +extern const struct file_operations aufs_file_fop; +int au_do_open_nondir(struct file *file, int flags, struct file *h_file); +int aufs_release_nondir(struct inode *inode __maybe_unused, struct file *file); -+struct file *au_read_pre(struct file *file, int keep_fi); ++struct file *au_read_pre(struct file *file, int keep_fi, unsigned int lsc); + +/* finfo.c */ +void au_hfput(struct au_hfile *hf, int execed); @@ -13294,7 +13415,7 @@ index 0000000..4fc7eca +int au_fidir_realloc(struct au_finfo *finfo, int nbr, int may_shrink); + +void au_fi_init_once(void *_fi); -+void au_finfo_fin(struct file *file, int atonce); ++void au_finfo_fin(struct file *file); +int au_finfo_init(struct file *file, struct au_fidir *fidir); + +/* ioctl.c */ @@ -13321,6 +13442,45 @@ index 0000000..4fc7eca + */ +AuSimpleRwsemFuncs(fi, struct file *f, &au_fi(f)->fi_rwsem); + ++/* lock subclass for finfo */ ++enum { ++ AuLsc_FI_1, ++ AuLsc_FI_2 ++}; ++ ++static inline void fi_read_lock_nested(struct file *f, unsigned int lsc) ++{ ++ au_rw_read_lock_nested(&au_fi(f)->fi_rwsem, lsc); ++} ++ ++static inline void fi_write_lock_nested(struct file *f, unsigned int lsc) ++{ ++ au_rw_write_lock_nested(&au_fi(f)->fi_rwsem, lsc); ++} ++ ++/* ++ * fi_read_lock_1, fi_write_lock_1, ++ * fi_read_lock_2, fi_write_lock_2 ++ */ ++#define AuReadLockFunc(name) \ ++static inline void fi_read_lock_##name(struct file *f) \ ++{ fi_read_lock_nested(f, AuLsc_FI_##name); } ++ ++#define AuWriteLockFunc(name) \ ++static inline void fi_write_lock_##name(struct file *f) \ ++{ fi_write_lock_nested(f, AuLsc_FI_##name); } ++ ++#define AuRWLockFuncs(name) \ ++ AuReadLockFunc(name) \ ++ AuWriteLockFunc(name) ++ ++AuRWLockFuncs(1); ++AuRWLockFuncs(2); ++ ++#undef AuReadLockFunc ++#undef AuWriteLockFunc ++#undef AuRWLockFuncs ++ +#define FiMustNoWaiters(f) AuRwMustNoWaiters(&au_fi(f)->fi_rwsem) +#define FiMustAnyLock(f) AuRwMustAnyLock(&au_fi(f)->fi_rwsem) +#define FiMustWriteLock(f) AuRwMustWriteLock(&au_fi(f)->fi_rwsem) @@ -13462,10 +13622,10 @@ index 0000000..4fc7eca +#endif /* __AUFS_FILE_H__ */ diff --git a/fs/aufs/finfo.c b/fs/aufs/finfo.c new file mode 100644 -index 0000000..5dfa1ed +index 0000000..3a8131d4 --- /dev/null +++ b/fs/aufs/finfo.c -@@ -0,0 +1,151 @@ +@@ -0,0 +1,148 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -13570,7 +13730,7 @@ index 0000000..5dfa1ed + +/* ---------------------------------------------------------------------- */ + -+void au_finfo_fin(struct file *file, int atonce) ++void au_finfo_fin(struct file *file) +{ + struct au_finfo *finfo; + @@ -13579,10 +13739,7 @@ index 0000000..5dfa1ed + finfo = au_fi(file); + AuDebugOn(finfo->fi_hdir); + AuRwDestroy(&finfo->fi_rwsem); -+ if (!atonce) -+ au_cache_dfree_finfo(finfo); -+ else -+ au_cache_free_finfo(finfo); ++ au_cache_free_finfo(finfo); +} + +void au_fi_init_once(void *_finfo) @@ -14025,7 +14182,7 @@ index 0000000..4624f1e +#endif /* __AUFS_FSTYPE_H__ */ diff --git a/fs/aufs/hfsnotify.c b/fs/aufs/hfsnotify.c new file mode 100644 -index 0000000..567f080 +index 0000000..7298c57 --- /dev/null +++ b/fs/aufs/hfsnotify.c @@ -0,0 +1,287 @@ @@ -14063,7 +14220,7 @@ index 0000000..567f080 + struct au_hnotify *hn = container_of(mark, struct au_hnotify, + hn_mark); + /* AuDbg("here\n"); */ -+ au_cache_dfree_hnotify(hn); ++ au_cache_free_hnotify(hn); + smp_mb__before_atomic(); + if (atomic64_dec_and_test(&au_hfsn_ifree)) + wake_up(&au_hfsn_wq); @@ -14187,7 +14344,7 @@ index 0000000..567f080 + struct au_br_hfsnotify *hfsn = group->private; + + /* AuDbg("here\n"); */ -+ au_delayed_kfree(hfsn); ++ kfree(hfsn); +} + +static int au_hfsn_handle_event(struct fsnotify_group *group, @@ -14281,7 +14438,7 @@ index 0000000..567f080 + goto out; /* success */ + +out_hfsn: -+ au_delayed_kfree(hfsn); ++ kfree(hfsn); +out: + return err; +} @@ -14380,10 +14537,10 @@ index 0000000..b5b6547 +} diff --git a/fs/aufs/hnotify.c b/fs/aufs/hnotify.c new file mode 100644 -index 0000000..d901ea2 +index 0000000..773a1d2 --- /dev/null +++ b/fs/aufs/hnotify.c -@@ -0,0 +1,723 @@ +@@ -0,0 +1,711 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -14421,7 +14578,7 @@ index 0000000..d901ea2 + AuTraceErr(err); + if (unlikely(err)) { + hinode->hi_notify = NULL; -+ au_cache_dfree_hnotify(hn); ++ au_cache_free_hnotify(hn); + /* + * The upper dir was removed by udba, but the same named + * dir left. In this case, aufs assignes a new inode @@ -14445,7 +14602,7 @@ index 0000000..d901ea2 + if (hn) { + hinode->hi_notify = NULL; + if (au_hnotify_op.free(hinode, hn)) -+ au_cache_dfree_hnotify(hn); ++ au_cache_free_hnotify(hn); + } +} + @@ -14918,7 +15075,7 @@ index 0000000..d901ea2 + iput(a->dir); + si_write_unlock(sb); + au_nwt_done(&sbinfo->si_nowait); -+ au_delayed_kfree(a); ++ kfree(a); +} + +/* ---------------------------------------------------------------------- */ @@ -15024,7 +15181,7 @@ index 0000000..d901ea2 + iput(args->h_child_inode); + iput(args->h_dir); + iput(args->dir); -+ au_delayed_kfree(args); ++ kfree(args); + } + +out: @@ -15065,26 +15222,17 @@ index 0000000..d901ea2 + +static void au_hn_destroy_cache(void) +{ -+ struct au_cache *cp; -+ -+ flush_delayed_work(&au_dfree.dwork); -+ cp = au_dfree.cache + AuCache_HNOTIFY; -+ AuDebugOn(!llist_empty(&cp->llist)); -+ kmem_cache_destroy(cp->cache); -+ cp->cache = NULL; ++ kmem_cache_destroy(au_cache[AuCache_HNOTIFY]); ++ au_cache[AuCache_HNOTIFY] = NULL; +} + -+AU_CACHE_DFREE_FUNC(hnotify, HNOTIFY, hn_lnode); -+ +int __init au_hnotify_init(void) +{ + int err; -+ struct au_cache *cp; + + err = -ENOMEM; -+ cp = au_dfree.cache + AuCache_HNOTIFY; -+ cp->cache = AuCache(au_hnotify); -+ if (cp->cache) { ++ au_cache[AuCache_HNOTIFY] = AuCache(au_hnotify); ++ if (au_cache[AuCache_HNOTIFY]) { + err = 0; + if (au_hnotify_op.init) + err = au_hnotify_op.init(); @@ -15097,22 +15245,19 @@ index 0000000..d901ea2 + +void au_hnotify_fin(void) +{ -+ struct au_cache *cp; -+ + if (au_hnotify_op.fin) + au_hnotify_op.fin(); + + /* cf. au_cache_fin() */ -+ cp = au_dfree.cache + AuCache_HNOTIFY; -+ if (cp->cache) ++ if (au_cache[AuCache_HNOTIFY]) + au_hn_destroy_cache(); +} diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c new file mode 100644 -index 0000000..9063f32 +index 0000000..c2a7cbe --- /dev/null +++ b/fs/aufs/i_op.c -@@ -0,0 +1,1448 @@ +@@ -0,0 +1,1449 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -16025,7 +16170,8 @@ index 0000000..9063f32 + /* currently ftruncate(2) only */ + AuDebugOn(!d_is_reg(dentry)); + file = ia->ia_file; -+ err = au_reval_and_lock_fdi(file, au_reopen_nondir, /*wlock*/1); ++ err = au_reval_and_lock_fdi(file, au_reopen_nondir, /*wlock*/1, ++ /*fi_lsc*/0); + if (unlikely(err)) + goto out_si; + ia->ia_file = au_hf_top(file); @@ -16115,7 +16261,7 @@ index 0000000..9063f32 +out_si: + si_read_unlock(sb); +out_kfree: -+ au_delayed_kfree(a); ++ kfree(a); +out: + AuTraceErr(err); + return err; @@ -16206,7 +16352,7 @@ index 0000000..9063f32 + di_write_unlock(dentry); + si_read_unlock(sb); +out_kfree: -+ au_delayed_kfree(a); ++ kfree(a); +out: + AuTraceErr(err); + return err; @@ -16563,7 +16709,7 @@ index 0000000..9063f32 +}; diff --git a/fs/aufs/i_op_add.c b/fs/aufs/i_op_add.c new file mode 100644 -index 0000000..955e5b0 +index 0000000..c3bd0f0 --- /dev/null +++ b/fs/aufs/i_op_add.c @@ -0,0 +1,928 @@ @@ -16914,7 +17060,7 @@ index 0000000..955e5b0 + if (!try_aopen) + aufs_read_unlock(dentry, AuLock_DW); +out_free: -+ au_delayed_kfree(a); ++ kfree(a); +out: + return err; +} @@ -17382,7 +17528,7 @@ index 0000000..955e5b0 + } + aufs_read_and_write_unlock2(dentry, src_dentry); +out_kfree: -+ au_delayed_kfree(a); ++ kfree(a); +out: + AuTraceErr(err); + return err; @@ -17491,13 +17637,13 @@ index 0000000..955e5b0 + } + aufs_read_unlock(dentry, AuLock_DW); +out_free: -+ au_delayed_kfree(a); ++ kfree(a); +out: + return err; +} diff --git a/fs/aufs/i_op_del.c b/fs/aufs/i_op_del.c new file mode 100644 -index 0000000..ae2c911 +index 0000000..f67b74b --- /dev/null +++ b/fs/aufs/i_op_del.c @@ -0,0 +1,511 @@ @@ -17897,7 +18043,7 @@ index 0000000..ae2c911 +out_unlock: + aufs_read_unlock(dentry, AuLock_DW); +out_free: -+ au_delayed_kfree(a); ++ kfree(a); +out: + return err; +} @@ -18007,14 +18153,14 @@ index 0000000..ae2c911 +out_unlock: + aufs_read_unlock(dentry, AuLock_DW); +out_free: -+ au_delayed_kfree(a); ++ kfree(a); +out: + AuTraceErr(err); + return err; +} diff --git a/fs/aufs/i_op_ren.c b/fs/aufs/i_op_ren.c new file mode 100644 -index 0000000..74f429f +index 0000000..0c30670 --- /dev/null +++ b/fs/aufs/i_op_ren.c @@ -0,0 +1,1165 @@ @@ -19178,14 +19324,14 @@ index 0000000..74f429f + iput(a->dst_inode); + if (a->thargs) + au_whtmp_rmdir_free(a->thargs); -+ au_delayed_kfree(a); ++ kfree(a); +out: + AuTraceErr(err); + return err; +} diff --git a/fs/aufs/iinfo.c b/fs/aufs/iinfo.c new file mode 100644 -index 0000000..ce9f157 +index 0000000..4d3a55c --- /dev/null +++ b/fs/aufs/iinfo.c @@ -0,0 +1,285 @@ @@ -19459,7 +19605,7 @@ index 0000000..ce9f157 + + iinfo = au_ii(inode); + if (iinfo->ii_vdir) -+ au_vdir_free(iinfo->ii_vdir, /*atonce*/0); ++ au_vdir_free(iinfo->ii_vdir); + + bindex = iinfo->ii_btop; + if (bindex >= 0) { @@ -19471,15 +19617,15 @@ index 0000000..ce9f157 + hi++; + } + } -+ au_delayed_kfree(iinfo->ii_hinode); ++ kfree(iinfo->ii_hinode); + AuRwDestroy(&iinfo->ii_rwsem); +} diff --git a/fs/aufs/inode.c b/fs/aufs/inode.c new file mode 100644 -index 0000000..2cce490 +index 0000000..d361e25 --- /dev/null +++ b/fs/aufs/inode.c -@@ -0,0 +1,519 @@ +@@ -0,0 +1,527 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -19817,32 +19963,34 @@ index 0000000..2cce490 +int au_ino(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, + unsigned int d_type, ino_t *ino) +{ -+ int err; -+ struct mutex *mtx; ++ int err, idx; ++ const int isnondir = d_type != DT_DIR; + + /* prevent hardlinked inode number from race condition */ -+ mtx = NULL; -+ if (d_type != DT_DIR) { -+ mtx = &au_sbr(sb, bindex)->br_xino.xi_nondir_mtx; -+ mutex_lock(mtx); ++ if (isnondir) { ++ err = au_xinondir_enter(sb, bindex, h_ino, &idx); ++ if (unlikely(err)) ++ goto out; + } ++ + err = au_xino_read(sb, bindex, h_ino, ino); + if (unlikely(err)) -+ goto out; ++ goto out_xinondir; + + if (!*ino) { + err = -EIO; + *ino = au_xino_new_ino(sb); + if (unlikely(!*ino)) -+ goto out; ++ goto out_xinondir; + err = au_xino_write(sb, bindex, h_ino, *ino); + if (unlikely(err)) -+ goto out; ++ goto out_xinondir; + } + ++out_xinondir: ++ if (isnondir && idx >= 0) ++ au_xinondir_leave(sb, bindex, h_ino, idx); +out: -+ if (mtx) -+ mutex_unlock(mtx); + return err; +} + @@ -19853,9 +20001,8 @@ index 0000000..2cce490 + struct inode *inode, *h_inode; + struct dentry *h_dentry; + struct super_block *sb; -+ struct mutex *mtx; + ino_t h_ino, ino; -+ int err; ++ int err, idx, hlinked; + aufs_bindex_t btop; + + sb = dentry->d_sb; @@ -19863,28 +20010,30 @@ index 0000000..2cce490 + h_dentry = au_h_dptr(dentry, btop); + h_inode = d_inode(h_dentry); + h_ino = h_inode->i_ino; ++ hlinked = !d_is_dir(h_dentry) && h_inode->i_nlink > 1; + ++new_ino: + /* + * stop 'race'-ing between hardlinks under different + * parents. + */ -+ mtx = NULL; -+ if (!d_is_dir(h_dentry)) -+ mtx = &au_sbr(sb, btop)->br_xino.xi_nondir_mtx; ++ if (hlinked) { ++ err = au_xinondir_enter(sb, btop, h_ino, &idx); ++ inode = ERR_PTR(err); ++ if (unlikely(err)) ++ goto out; ++ } + -+new_ino: -+ if (mtx) -+ mutex_lock(mtx); + err = au_xino_read(sb, btop, h_ino, &ino); + inode = ERR_PTR(err); + if (unlikely(err)) -+ goto out; ++ goto out_xinondir; + + if (!ino) { + ino = au_xino_new_ino(sb); + if (unlikely(!ino)) { + inode = ERR_PTR(-EIO); -+ goto out; ++ goto out_xinondir; + } + } + @@ -19892,7 +20041,7 @@ index 0000000..2cce490 + inode = au_iget_locked(sb, ino); + err = PTR_ERR(inode); + if (IS_ERR(inode)) -+ goto out; ++ goto out_xinondir; + + AuDbg("%lx, new %d\n", inode->i_state, !!(inode->i_state & I_NEW)); + if (inode->i_state & I_NEW) { @@ -19900,7 +20049,7 @@ index 0000000..2cce490 + err = set_inode(inode, dentry); + if (!err) { + unlock_new_inode(inode); -+ goto out; /* success */ ++ goto out_xinondir; /* success */ + } + + /* @@ -19919,19 +20068,23 @@ index 0000000..2cce490 + * horrible race condition between lookup, readdir and copyup + * (or something). + */ -+ if (mtx) -+ mutex_unlock(mtx); ++ if (hlinked && idx >= 0) ++ au_xinondir_leave(sb, btop, h_ino, idx); + err = reval_inode(inode, dentry); + if (unlikely(err < 0)) { -+ mtx = NULL; ++ hlinked = 0; + goto out_iput; + } -+ -+ if (!err) { -+ mtx = NULL; ++ if (!err) + goto out; /* success */ -+ } else if (mtx) -+ mutex_lock(mtx); ++ else if (hlinked && idx >= 0) { ++ err = au_xinondir_enter(sb, btop, h_ino, &idx); ++ if (unlikely(err)) { ++ iput(inode); ++ inode = ERR_PTR(err); ++ goto out; ++ } ++ } + } + + if (unlikely(au_test_fs_unique_ino(h_inode))) @@ -19943,17 +20096,18 @@ index 0000000..2cce490 + err = au_xino_write(sb, btop, h_ino, /*ino*/0); + if (!err) { + iput(inode); -+ if (mtx) -+ mutex_unlock(mtx); ++ if (hlinked && idx >= 0) ++ au_xinondir_leave(sb, btop, h_ino, idx); + goto new_ino; + } + +out_iput: + iput(inode); + inode = ERR_PTR(err); ++out_xinondir: ++ if (hlinked && idx >= 0) ++ au_xinondir_leave(sb, btop, h_ino, idx); +out: -+ if (mtx) -+ mutex_unlock(mtx); + return inode; +} + @@ -20001,10 +20155,10 @@ index 0000000..2cce490 +} diff --git a/fs/aufs/inode.h b/fs/aufs/inode.h new file mode 100644 -index 0000000..ac36c5b +index 0000000..debe3ce --- /dev/null +++ b/fs/aufs/inode.h -@@ -0,0 +1,692 @@ +@@ -0,0 +1,686 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -20042,10 +20196,7 @@ index 0000000..ac36c5b + /* never use fsnotify_add_vfsmount_mark() */ + struct fsnotify_mark hn_mark; +#endif -+ union { -+ struct inode *hn_aufs_inode; /* no get/put */ -+ struct llist_node hn_lnode; /* delayed free */ -+ }; ++ struct inode *hn_aufs_inode; /* no get/put */ +#endif +} ____cacheline_aligned_in_smp; + @@ -20088,10 +20239,7 @@ index 0000000..ac36c5b +struct au_icntnr { + struct au_iinfo iinfo; + struct inode vfs_inode; -+ union { -+ struct hlist_node plink; -+ struct llist_node lnode; /* delayed free */ -+ }; ++ struct hlist_node plink; +} ____cacheline_aligned_in_smp; + +/* au_pin flags */ @@ -20924,7 +21072,7 @@ index 0000000..5e501c5 +#endif diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c new file mode 100644 -index 0000000..1b31f47 +index 0000000..1acb82f --- /dev/null +++ b/fs/aufs/loop.c @@ -0,0 +1,147 @@ @@ -21073,7 +21221,7 @@ index 0000000..1b31f47 +{ + if (backing_file_func) + symbol_put(loop_backing_file); -+ au_delayed_kfree(au_warn_loopback_array); ++ kfree(au_warn_loopback_array); +} diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h new file mode 100644 @@ -21171,10 +21319,10 @@ index 0000000..4f83bdf +endif diff --git a/fs/aufs/module.c b/fs/aufs/module.c new file mode 100644 -index 0000000..e89e65d +index 0000000..35027d5 --- /dev/null +++ b/fs/aufs/module.c -@@ -0,0 +1,333 @@ +@@ -0,0 +1,269 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -21211,7 +21359,7 @@ index 0000000..e89e65d + if (p) { +#if 0 /* unused */ + if (!new_sz) { -+ au_delayed_kfree(p); ++ kfree(p); + p = NULL; + goto out; + } @@ -21235,7 +21383,7 @@ index 0000000..e89e65d + if (q) { + if (p) { + memcpy(q, p, new_sz); -+ au_delayed_kfree(p); ++ kfree(p); + } + p = q; + } else @@ -21260,60 +21408,11 @@ index 0000000..e89e65d + * aufs caches + */ + -+struct au_dfree au_dfree; -+ -+/* delayed free */ -+static void au_do_dfree(struct work_struct *work __maybe_unused) -+{ -+ struct llist_head *head; -+ struct llist_node *node, *next; -+ -+#define AU_CACHE_DFREE_DO_BODY(name, idx, lnode) do { \ -+ head = &au_dfree.cache[AuCache_##idx].llist; \ -+ node = llist_del_all(head); \ -+ for (; node; node = next) { \ -+ struct au_##name *p \ -+ = llist_entry(node, struct au_##name, \ -+ lnode); \ -+ next = llist_next(node); \ -+ au_cache_free_##name(p); \ -+ } \ -+ } while (0) -+ -+ AU_CACHE_DFREE_DO_BODY(dinfo, DINFO, di_lnode); -+ AU_CACHE_DFREE_DO_BODY(icntnr, ICNTNR, lnode); -+ AU_CACHE_DFREE_DO_BODY(finfo, FINFO, fi_lnode); -+ AU_CACHE_DFREE_DO_BODY(vdir, VDIR, vd_lnode); -+ AU_CACHE_DFREE_DO_BODY(vdir_dehstr, DEHSTR, lnode); -+#ifdef CONFIG_AUFS_HNOTIFY -+ AU_CACHE_DFREE_DO_BODY(hnotify, HNOTIFY, hn_lnode); -+#endif -+ -+#define AU_DFREE_DO_BODY(llist, func) do { \ -+ node = llist_del_all(llist); \ -+ for (; node; node = next) { \ -+ next = llist_next(node); \ -+ func(node); \ -+ } \ -+ } while (0) -+ -+ AU_DFREE_DO_BODY(au_dfree.llist + AU_DFREE_KFREE, kfree); -+ AU_DFREE_DO_BODY(au_dfree.llist + AU_DFREE_FREE_PAGE, au_free_page); -+ -+#undef AU_CACHE_DFREE_DO_BODY -+#undef AU_DFREE_DO_BODY -+} -+ -+AU_CACHE_DFREE_FUNC(dinfo, DINFO, di_lnode); -+AU_CACHE_DFREE_FUNC(icntnr, ICNTNR, lnode); -+AU_CACHE_DFREE_FUNC(finfo, FINFO, fi_lnode); -+AU_CACHE_DFREE_FUNC(vdir, VDIR, vd_lnode); -+AU_CACHE_DFREE_FUNC(vdir_dehstr, DEHSTR, lnode); ++struct kmem_cache *au_cache[AuCache_Last]; + +static void au_cache_fin(void) +{ + int i; -+ struct au_cache *cp; + + /* + * Make sure all delayed rcu free inodes are flushed before we @@ -21323,33 +21422,27 @@ index 0000000..e89e65d + + /* excluding AuCache_HNOTIFY */ + BUILD_BUG_ON(AuCache_HNOTIFY + 1 != AuCache_Last); -+ flush_delayed_work(&au_dfree.dwork); + for (i = 0; i < AuCache_HNOTIFY; i++) { -+ cp = au_dfree.cache + i; -+ AuDebugOn(!llist_empty(&cp->llist)); -+ kmem_cache_destroy(cp->cache); -+ cp->cache = NULL; ++ kmem_cache_destroy(au_cache[i]); ++ au_cache[i] = NULL; + } +} + +static int __init au_cache_init(void) +{ -+ struct au_cache *cp; -+ -+ cp = au_dfree.cache; -+ cp[AuCache_DINFO].cache = AuCacheCtor(au_dinfo, au_di_init_once); -+ if (cp[AuCache_DINFO].cache) ++ au_cache[AuCache_DINFO] = AuCacheCtor(au_dinfo, au_di_init_once); ++ if (au_cache[AuCache_DINFO]) + /* SLAB_DESTROY_BY_RCU */ -+ cp[AuCache_ICNTNR].cache = AuCacheCtor(au_icntnr, ++ au_cache[AuCache_ICNTNR] = AuCacheCtor(au_icntnr, + au_icntnr_init_once); -+ if (cp[AuCache_ICNTNR].cache) -+ cp[AuCache_FINFO].cache = AuCacheCtor(au_finfo, ++ if (au_cache[AuCache_ICNTNR]) ++ au_cache[AuCache_FINFO] = AuCacheCtor(au_finfo, + au_fi_init_once); -+ if (cp[AuCache_FINFO].cache) -+ cp[AuCache_VDIR].cache = AuCache(au_vdir); -+ if (cp[AuCache_VDIR].cache) -+ cp[AuCache_DEHSTR].cache = AuCache(au_vdir_dehstr); -+ if (cp[AuCache_DEHSTR].cache) ++ if (au_cache[AuCache_FINFO]) ++ au_cache[AuCache_VDIR] = AuCache(au_vdir); ++ if (au_cache[AuCache_VDIR]) ++ au_cache[AuCache_DEHSTR] = AuCache(au_vdir_dehstr); ++ if (au_cache[AuCache_DEHSTR]) + return 0; + + au_cache_fin(); @@ -21398,9 +21491,9 @@ index 0000000..e89e65d + int err; + + err = seq_path(seq, path, au_esc_chars); -+ if (err > 0) ++ if (err >= 0) + err = 0; -+ else if (err < 0) ++ else + err = -ENOMEM; + + return err; @@ -21412,7 +21505,6 @@ index 0000000..e89e65d +{ + int err, i; + char *p; -+ struct au_cache *cp; + + p = au_esc_chars; + for (i = 1; i <= ' '; i++) @@ -21427,15 +21519,9 @@ index 0000000..e89e65d + for (i = 0; i < AuIop_Last; i++) + aufs_iop_nogetattr[i].getattr = NULL; + -+ /* First, initialize au_dfree */ -+ for (i = 0; i < AuCache_Last; i++) { /* including hnotify */ -+ cp = au_dfree.cache + i; -+ cp->cache = NULL; -+ init_llist_head(&cp->llist); -+ } -+ for (i = 0; i < AU_DFREE_Last; i++) -+ init_llist_head(au_dfree.llist + i); -+ INIT_DELAYED_WORK(&au_dfree.dwork, au_do_dfree); ++ /* First, initialize au_cache */ ++ for (i = 0; i < AuCache_Last; i++) /* including hnotify */ ++ au_cache[i] = NULL; + + au_sbilist_init(); + sysaufs_brs_init(); @@ -21487,7 +21573,6 @@ index 0000000..e89e65d +out_sysaufs: + sysaufs_fin(); + au_dy_fin(); -+ flush_delayed_work(&au_dfree.dwork); +out: + return err; +} @@ -21503,17 +21588,16 @@ index 0000000..e89e65d + au_procfs_fin(); + sysaufs_fin(); + au_dy_fin(); -+ flush_delayed_work(&au_dfree.dwork); +} + +module_init(aufs_init); +module_exit(aufs_exit); diff --git a/fs/aufs/module.h b/fs/aufs/module.h new file mode 100644 -index 0000000..e0ade15 +index 0000000..d099cdf --- /dev/null +++ b/fs/aufs/module.h -@@ -0,0 +1,156 @@ +@@ -0,0 +1,102 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -21580,7 +21664,7 @@ index 0000000..e0ade15 + +/* ---------------------------------------------------------------------- */ + -+/* kmem cache and delayed free */ ++/* kmem cache */ +enum { + AuCache_DINFO, + AuCache_ICNTNR, @@ -21591,28 +21675,7 @@ index 0000000..e0ade15 + AuCache_Last +}; + -+enum { -+ AU_DFREE_KFREE, -+ AU_DFREE_FREE_PAGE, -+ AU_DFREE_Last -+}; -+ -+struct au_cache { -+ struct kmem_cache *cache; -+ struct llist_head llist; /* delayed free */ -+}; -+ -+/* -+ * in order to reduce the cost of the internal timer, consolidate all the -+ * delayed free works into a single delayed_work. -+ */ -+struct au_dfree { -+ struct au_cache cache[AuCache_Last]; -+ struct llist_head llist[AU_DFREE_Last]; -+ struct delayed_work dwork; -+}; -+ -+extern struct au_dfree au_dfree; ++extern struct kmem_cache *au_cache[AuCache_Last]; + +#define AuCacheFlags (SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD) +#define AuCache(type) KMEM_CACHE(type, AuCacheFlags) @@ -21620,25 +21683,11 @@ index 0000000..e0ade15 + kmem_cache_create(#type, sizeof(struct type), \ + __alignof__(struct type), AuCacheFlags, ctor) + -+#define AU_DFREE_DELAY msecs_to_jiffies(10) -+#define AU_DFREE_BODY(lnode, llist) do { \ -+ if (llist_add(lnode, llist)) \ -+ schedule_delayed_work(&au_dfree.dwork, \ -+ AU_DFREE_DELAY); \ -+ } while (0) -+#define AU_CACHE_DFREE_FUNC(name, idx, lnode) \ -+ void au_cache_dfree_##name(struct au_##name *p) \ -+ { \ -+ struct au_cache *cp = au_dfree.cache + AuCache_##idx; \ -+ AU_DFREE_BODY(&p->lnode, &cp->llist); \ -+ } -+ +#define AuCacheFuncs(name, index) \ +static inline struct au_##name *au_cache_alloc_##name(void) \ -+{ return kmem_cache_alloc(au_dfree.cache[AuCache_##index].cache, GFP_NOFS); } \ ++{ return kmem_cache_alloc(au_cache[AuCache_##index], GFP_NOFS); } \ +static inline void au_cache_free_##name(struct au_##name *p) \ -+{ kmem_cache_free(au_dfree.cache[AuCache_##index].cache, p); } \ -+void au_cache_dfree_##name(struct au_##name *p) ++{ kmem_cache_free(au_cache[AuCache_##index], p); } + +AuCacheFuncs(dinfo, DINFO); +AuCacheFuncs(icntnr, ICNTNR); @@ -21649,30 +21698,11 @@ index 0000000..e0ade15 +AuCacheFuncs(hnotify, HNOTIFY); +#endif + -+static inline void au_delayed_kfree(const void *p) -+{ -+ AuDebugOn(!p); -+ AuDebugOn(ksize(p) < sizeof(struct llist_node)); -+ -+ AU_DFREE_BODY((void *)p, au_dfree.llist + AU_DFREE_KFREE); -+} -+ -+/* cast only */ -+static inline void au_free_page(void *p) -+{ -+ free_page((unsigned long)p); -+} -+ -+static inline void au_delayed_free_page(unsigned long addr) -+{ -+ AU_DFREE_BODY((void *)addr, au_dfree.llist + AU_DFREE_FREE_PAGE); -+} -+ +#endif /* __KERNEL__ */ +#endif /* __AUFS_MODULE_H__ */ diff --git a/fs/aufs/mvdown.c b/fs/aufs/mvdown.c new file mode 100644 -index 0000000..523a15d +index 0000000..0fb18b8 --- /dev/null +++ b/fs/aufs/mvdown.c @@ -0,0 +1,704 @@ @@ -22375,14 +22405,14 @@ index 0000000..523a15d + e = copy_to_user(uarg, &args->mvdown, sizeof(args->mvdown)); + if (unlikely(e)) + err = -EFAULT; -+ au_delayed_kfree(args); ++ kfree(args); +out: + AuTraceErr(err); + return err; +} diff --git a/fs/aufs/opts.c b/fs/aufs/opts.c new file mode 100644 -index 0000000..8dbecc1 +index 0000000..069d0d1 --- /dev/null +++ b/fs/aufs/opts.c @@ -0,0 +1,1848 @@ @@ -23630,7 +23660,7 @@ index 0000000..8dbecc1 + } + } + -+ au_delayed_kfree(a); ++ kfree(a); + dump_opts(opts); + if (unlikely(err)) + au_opts_free(opts); @@ -24055,7 +24085,7 @@ index 0000000..8dbecc1 + + if (!err && do_free) { + if (wbr) -+ au_delayed_kfree(wbr); ++ kfree(wbr); + br->br_wbr = NULL; + } + } @@ -24975,7 +25005,7 @@ index 0000000..8f3dd67 +} diff --git a/fs/aufs/poll.c b/fs/aufs/poll.c new file mode 100644 -index 0000000..cf7abdf +index 0000000..1aea194 --- /dev/null +++ b/fs/aufs/poll.c @@ -0,0 +1,52 @@ @@ -25015,7 +25045,7 @@ index 0000000..cf7abdf + sb = file->f_path.dentry->d_sb; + si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); + -+ h_file = au_read_pre(file, /*keep_fi*/0); ++ h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) + goto out; @@ -25907,7 +25937,7 @@ index 0000000..2abe89f +#endif /* __AUFS_RWSEM_H__ */ diff --git a/fs/aufs/sbinfo.c b/fs/aufs/sbinfo.c new file mode 100644 -index 0000000..4997060 +index 0000000..995514e --- /dev/null +++ b/fs/aufs/sbinfo.c @@ -0,0 +1,304 @@ @@ -25957,11 +25987,11 @@ index 0000000..4997060 + au_br_free(sbinfo); + au_rw_write_unlock(&sbinfo->si_rwsem); + -+ au_delayed_kfree(sbinfo->si_branch); ++ kfree(sbinfo->si_branch); + mutex_destroy(&sbinfo->si_xib_mtx); + AuRwDestroy(&sbinfo->si_rwsem); + -+ au_delayed_kfree(sbinfo); ++ kfree(sbinfo); +} + +int au_si_alloc(struct super_block *sb) @@ -26032,9 +26062,9 @@ index 0000000..4997060 + return 0; /* success */ + +out_br: -+ au_delayed_kfree(sbinfo->si_branch); ++ kfree(sbinfo->si_branch); +out_sbinfo: -+ au_delayed_kfree(sbinfo); ++ kfree(sbinfo); +out: + return err; +} @@ -26336,7 +26366,7 @@ index 0000000..2845873 +#endif /* __AUFS_SPL_H__ */ diff --git a/fs/aufs/super.c b/fs/aufs/super.c new file mode 100644 -index 0000000..3f0a969 +index 0000000..d893730 --- /dev/null +++ b/fs/aufs/super.c @@ -0,0 +1,1044 @@ @@ -26388,7 +26418,7 @@ index 0000000..3f0a969 +{ + struct inode *inode = container_of(head, struct inode, i_rcu); + -+ au_cache_dfree_icntnr(container_of(inode, struct au_icntnr, vfs_inode)); ++ au_cache_free_icntnr(container_of(inode, struct au_icntnr, vfs_inode)); +} + +static void aufs_destroy_inode(struct inode *inode) @@ -27176,7 +27206,7 @@ index 0000000..3f0a969 +out_mtx: + inode_unlock(inode); +out_opts: -+ au_delayed_free_page((unsigned long)opts.opt); ++ free_page((unsigned long)opts.opt); +out: + err = cvt_err(err); + AuTraceErr(err); @@ -27317,7 +27347,7 @@ index 0000000..3f0a969 + kobject_put(&sbinfo->si_kobj); + sb->s_fs_info = NULL; +out_opts: -+ au_delayed_free_page((unsigned long)opts.opt); ++ free_page((unsigned long)opts.opt); +out: + AuTraceErr(err); + err = cvt_err(err); @@ -28226,7 +28256,7 @@ index 0000000..3330733 +#endif /* __SYSAUFS_H__ */ diff --git a/fs/aufs/sysfs.c b/fs/aufs/sysfs.c new file mode 100644 -index 0000000..ccbd98e +index 0000000..096bde9 --- /dev/null +++ b/fs/aufs/sysfs.c @@ -0,0 +1,376 @@ @@ -28441,7 +28471,7 @@ index 0000000..ccbd98e + if (unlikely(err == PAGE_SIZE)) + err = -EFBIG; + } -+ au_delayed_kfree(seq); ++ kfree(seq); +out_unlock: + si_read_unlock(sb); +out: @@ -28512,9 +28542,9 @@ index 0000000..ccbd98e + err = -EFAULT; + +out_seq: -+ au_delayed_kfree(seq); ++ kfree(seq); +out_buf: -+ au_delayed_free_page((unsigned long)buf); ++ free_page((unsigned long)buf); +out: + si_read_unlock(sb); + return err; @@ -28771,10 +28801,10 @@ index 0000000..98d5ad2 +} diff --git a/fs/aufs/vdir.c b/fs/aufs/vdir.c new file mode 100644 -index 0000000..5a52f31 +index 0000000..b7583e9 --- /dev/null +++ b/fs/aufs/vdir.c -@@ -0,0 +1,900 @@ +@@ -0,0 +1,892 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -28887,7 +28917,7 @@ index 0000000..5a52f31 + struct hlist_node *node; + + hlist_for_each_entry_safe(pos, node, head, wh_hash) -+ au_delayed_kfree(pos); ++ kfree(pos); +} + +static void au_nhash_de_do_free(struct hlist_head *head) @@ -28896,7 +28926,7 @@ index 0000000..5a52f31 + struct hlist_node *node; + + hlist_for_each_entry_safe(pos, node, head, hash) -+ au_cache_dfree_vdir_dehstr(pos); ++ au_cache_free_vdir_dehstr(pos); +} + +static void au_nhash_do_free(struct au_nhash *nhash, @@ -28914,7 +28944,7 @@ index 0000000..5a52f31 + nhash_count(head); + free(head++); + } -+ au_delayed_kfree(nhash->nh_head); ++ kfree(nhash->nh_head); +} + +void au_nhash_wh_free(struct au_nhash *whlist) @@ -29127,23 +29157,15 @@ index 0000000..5a52f31 + +/* ---------------------------------------------------------------------- */ + -+void au_vdir_free(struct au_vdir *vdir, int atonce) ++void au_vdir_free(struct au_vdir *vdir) +{ + unsigned char **deblk; + + deblk = vdir->vd_deblk; -+ if (!atonce) { -+ while (vdir->vd_nblk--) -+ au_delayed_kfree(*deblk++); -+ au_delayed_kfree(vdir->vd_deblk); -+ au_cache_dfree_vdir(vdir); -+ } else { -+ /* not delayed */ -+ while (vdir->vd_nblk--) -+ kfree(*deblk++); -+ kfree(vdir->vd_deblk); -+ au_cache_free_vdir(vdir); -+ } ++ while (vdir->vd_nblk--) ++ kfree(*deblk++); ++ kfree(vdir->vd_deblk); ++ au_cache_free_vdir(vdir); +} + +static struct au_vdir *alloc_vdir(struct file *file) @@ -29177,10 +29199,10 @@ index 0000000..5a52f31 + if (!err) + return vdir; /* success */ + -+ au_delayed_kfree(vdir->vd_deblk); ++ kfree(vdir->vd_deblk); + +out_free: -+ au_cache_dfree_vdir(vdir); ++ au_cache_free_vdir(vdir); +out: + vdir = ERR_PTR(err); + return vdir; @@ -29192,7 +29214,7 @@ index 0000000..5a52f31 + union au_vdir_deblk_p p, deblk_end; + + while (vdir->vd_nblk > 1) { -+ au_delayed_kfree(vdir->vd_deblk[vdir->vd_nblk - 1]); ++ kfree(vdir->vd_deblk[vdir->vd_nblk - 1]); + /* vdir->vd_deblk[vdir->vd_nblk - 1] = NULL; */ + vdir->vd_nblk--; + } @@ -29323,7 +29345,7 @@ index 0000000..5a52f31 + } + } + -+ au_delayed_free_page((unsigned long)o); ++ free_page((unsigned long)o); + +out: + AuTraceErr(err); @@ -29462,7 +29484,7 @@ index 0000000..5a52f31 + if (allocated) + au_set_ivdir(inode, allocated); + } else if (allocated) -+ au_vdir_free(allocated, /*atonce*/0); ++ au_vdir_free(allocated); + +out: + return err; @@ -29557,7 +29579,7 @@ index 0000000..5a52f31 + if (allocated) + au_set_fvdir_cache(file, allocated); + } else if (allocated) -+ au_vdir_free(allocated, /*atonce*/0); ++ au_vdir_free(allocated); + +out: + return err; @@ -30582,10 +30604,10 @@ index 0000000..3cf429c +} diff --git a/fs/aufs/vfsub.h b/fs/aufs/vfsub.h new file mode 100644 -index 0000000..be702f6 +index 0000000..aeb5891 --- /dev/null +++ b/fs/aufs/vfsub.h -@@ -0,0 +1,318 @@ +@@ -0,0 +1,348 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -30854,6 +30876,36 @@ index 0000000..be702f6 + struct file *h_file); +int vfsub_fsync(struct file *file, struct path *path, int datasync); + ++/* ++ * re-use branch fs's ioctl(FICLONE) while aufs itself doesn't support such ++ * ioctl. ++ */ ++static inline int vfsub_clone_file_range(struct file *src, struct file *dst, ++ u64 len) ++{ ++ int err; ++ ++ lockdep_off(); ++ err = vfs_clone_file_range(src, 0, dst, 0, len); ++ lockdep_on(); ++ ++ return err; ++} ++ ++/* copy_file_range(2) is a systemcall */ ++static inline ssize_t vfsub_copy_file_range(struct file *src, loff_t src_pos, ++ struct file *dst, loff_t dst_pos, ++ size_t len, unsigned int flags) ++{ ++ ssize_t ssz; ++ ++ lockdep_off(); ++ ssz = vfs_copy_file_range(src, src_pos, dst, dst_pos, len, flags); ++ lockdep_on(); ++ ++ return ssz; ++} ++ +/* ---------------------------------------------------------------------- */ + +static inline loff_t vfsub_llseek(struct file *file, loff_t offset, int origin) @@ -30906,7 +30958,7 @@ index 0000000..be702f6 +#endif /* __AUFS_VFSUB_H__ */ diff --git a/fs/aufs/wbr_policy.c b/fs/aufs/wbr_policy.c new file mode 100644 -index 0000000..bddf015 +index 0000000..a28296d --- /dev/null +++ b/fs/aufs/wbr_policy.c @@ -0,0 +1,830 @@ @@ -31373,7 +31425,7 @@ index 0000000..bddf015 + + mfs->mfsrr_bytes = bavail; + AuDbg("b%d\n", mfs->mfs_bindex); -+ au_delayed_kfree(st); ++ kfree(st); +} + +static int au_wbr_create_mfs(struct dentry *dentry, unsigned int flags) @@ -31742,7 +31794,7 @@ index 0000000..bddf015 +}; diff --git a/fs/aufs/whout.c b/fs/aufs/whout.c new file mode 100644 -index 0000000..4e060ea +index 0000000..05c069e --- /dev/null +++ b/fs/aufs/whout.c @@ -0,0 +1,1061 @@ @@ -31910,7 +31962,7 @@ index 0000000..4e060ea + +out_name: + if (name != defname) -+ au_delayed_kfree(name); ++ kfree(name); +out: + AuTraceErrPtr(dentry); + return dentry; @@ -32350,7 +32402,7 @@ index 0000000..4e060ea + au_br_put(a->br); + si_write_unlock(a->sb); + au_nwt_done(&au_sbi(a->sb)->si_nowait); -+ au_delayed_kfree(arg); ++ kfree(arg); + if (unlikely(err)) + AuIOErr("err %d\n", err); +} @@ -32378,7 +32430,7 @@ index 0000000..4e060ea + if (unlikely(wkq_err)) { + atomic_dec(&br->br_wbr->wbr_wh_running); + au_br_put(br); -+ au_delayed_kfree(arg); ++ kfree(arg); + } + do_dec = 0; + } @@ -32537,7 +32589,7 @@ index 0000000..4e060ea + wh_dentry = ERR_PTR(err); + if (!err) { + wh_dentry = vfsub_lkup_one(&wh_name, h_parent); -+ au_delayed_kfree(wh_name.name); ++ kfree(wh_name.name); + } + return wh_dentry; +} @@ -32613,7 +32665,7 @@ index 0000000..4e060ea + break; + } + } -+ au_delayed_free_page((unsigned long)wh_name.name); ++ free_page((unsigned long)wh_name.name); + +out: + return err; @@ -32655,7 +32707,7 @@ index 0000000..4e060ea + rdhash = AUFS_RDHASH_DEF; + err = au_nhash_alloc(&whtmp->whlist, rdhash, gfp); + if (unlikely(err)) { -+ au_delayed_kfree(whtmp); ++ kfree(whtmp); + whtmp = ERR_PTR(err); + } + @@ -32670,7 +32722,7 @@ index 0000000..4e060ea + dput(whtmp->wh_dentry); + iput(whtmp->dir); + au_nhash_wh_free(&whtmp->whlist); -+ au_delayed_kfree(whtmp); ++ kfree(whtmp); +} + +/* @@ -32809,10 +32861,10 @@ index 0000000..4e060ea +} diff --git a/fs/aufs/whout.h b/fs/aufs/whout.h new file mode 100644 -index 0000000..eb4b182 +index 0000000..d06f3b2 --- /dev/null +++ b/fs/aufs/whout.h -@@ -0,0 +1,85 @@ +@@ -0,0 +1,84 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -32845,7 +32897,6 @@ index 0000000..eb4b182 +int au_wh_name_alloc(struct qstr *wh, const struct qstr *name); +int au_wh_test(struct dentry *h_parent, struct qstr *wh_name, int try_sio); +int au_diropq_test(struct dentry *h_dentry); -+struct au_branch; +struct dentry *au_whtmp_lkup(struct dentry *h_parent, struct au_branch *br, + struct qstr *prefix); +int au_whtmp_ren(struct dentry *h_dentry, struct au_branch *br); @@ -32900,7 +32951,7 @@ index 0000000..eb4b182 +#endif /* __AUFS_WHOUT_H__ */ diff --git a/fs/aufs/wkq.c b/fs/aufs/wkq.c new file mode 100644 -index 0000000..aab4f303 +index 0000000..7371d91 --- /dev/null +++ b/fs/aufs/wkq.c @@ -0,0 +1,213 @@ @@ -32960,7 +33011,7 @@ index 0000000..aab4f303 + else { + kobject_put(wkinfo->kobj); + module_put(THIS_MODULE); /* todo: ?? */ -+ au_delayed_kfree(wkinfo); ++ kfree(wkinfo); + } +} + @@ -32983,7 +33034,7 @@ index 0000000..aab4f303 + +static void au_wkq_comp_free(struct completion *comp) +{ -+ au_delayed_kfree(comp); ++ kfree(comp); +} + +#else @@ -33218,7 +33269,7 @@ index 0000000..0f1f42d +#endif /* __AUFS_WKQ_H__ */ diff --git a/fs/aufs/xattr.c b/fs/aufs/xattr.c new file mode 100644 -index 0000000..25961f2 +index 0000000..7cdf37e --- /dev/null +++ b/fs/aufs/xattr.c @@ -0,0 +1,357 @@ @@ -33403,11 +33454,11 @@ index 0000000..25961f2 + } + + if (value) -+ au_delayed_kfree(value); ++ kfree(value); + +out_free: + if (o) -+ au_delayed_kfree(o); ++ kfree(o); +out: + if (!unlocked) + inode_unlock(h_isrc); @@ -33581,10 +33632,10 @@ index 0000000..25961f2 +} diff --git a/fs/aufs/xino.c b/fs/aufs/xino.c new file mode 100644 -index 0000000..64dc097 +index 0000000..1d41d57 --- /dev/null +++ b/fs/aufs/xino.c -@@ -0,0 +1,1318 @@ +@@ -0,0 +1,1415 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -33925,7 +33976,7 @@ index 0000000..64dc097 + AuErr1("statfs err %d, ignored\n", err); + +out_st: -+ au_delayed_kfree(st); ++ kfree(st); +out: + return err; +} @@ -33960,7 +34011,7 @@ index 0000000..64dc097 + au_br_put(br); + si_write_unlock(sb); + au_nwt_done(&au_sbi(sb)->si_nowait); -+ au_delayed_kfree(args); ++ kfree(args); +} + +static int xino_trunc_test(struct super_block *sb, struct au_branch *br) @@ -34014,7 +34065,7 @@ index 0000000..64dc097 + + pr_err("wkq %d\n", wkq_err); + au_br_put(br); -+ au_delayed_kfree(args); ++ kfree(args); + +out: + atomic_dec(&br->br_xino_running); @@ -34538,7 +34589,7 @@ index 0000000..64dc097 + (sb, au_sbr(sb, bindex)->br_xino.xi_file, page); + else + AuDbg("b%d\n", bindex); -+ au_delayed_free_page((unsigned long)page); ++ free_page((unsigned long)page); + +out: + return err; @@ -34616,7 +34667,7 @@ index 0000000..64dc097 + fput(sbinfo->si_xib); + sbinfo->si_xib = NULL; + if (sbinfo->si_xib_buf) -+ au_delayed_free_page((unsigned long)sbinfo->si_xib_buf); ++ free_page((unsigned long)sbinfo->si_xib_buf); + sbinfo->si_xib_buf = NULL; +} + @@ -34660,7 +34711,7 @@ index 0000000..64dc097 + +out_free: + if (sbinfo->si_xib_buf) -+ au_delayed_free_page((unsigned long)sbinfo->si_xib_buf); ++ free_page((unsigned long)sbinfo->si_xib_buf); + sbinfo->si_xib_buf = NULL; + if (err >= 0) + err = -EIO; @@ -34753,7 +34804,7 @@ index 0000000..64dc097 + fput(p->new); + else + break; -+ au_delayed_kfree(fpair); ++ kfree(fpair); +out: + return err; +} @@ -34864,7 +34915,7 @@ index 0000000..64dc097 + if (!IS_ERR(file)) + au_xino_brid_set(sb, br->br_id); + } -+ au_delayed_free_page((unsigned long)page); ++ free_page((unsigned long)page); + } else { + file = au_xino_create(sb, AUFS_XINO_DEFPATH, /*silent*/0); + if (IS_ERR(file)) @@ -34903,6 +34954,103 @@ index 0000000..64dc097 +out: + return err; +} ++ ++/* ---------------------------------------------------------------------- */ ++ ++void au_xinondir_leave(struct super_block *sb, aufs_bindex_t bindex, ++ ino_t h_ino, int idx) ++{ ++ struct au_xino_file *xino; ++ ++ AuDebugOn(!au_opt_test(au_mntflags(sb), XINO)); ++ xino = &au_sbr(sb, bindex)->br_xino; ++ AuDebugOn(idx < 0 || xino->xi_nondir.total <= idx); ++ ++ spin_lock(&xino->xi_nondir.spin); ++ AuDebugOn(xino->xi_nondir.array[idx] != h_ino); ++ xino->xi_nondir.array[idx] = 0; ++ spin_unlock(&xino->xi_nondir.spin); ++ wake_up_all(&xino->xi_nondir.wqh); ++} ++ ++static int au_xinondir_find(struct au_xino_file *xino, ino_t h_ino) ++{ ++ int found, total, i; ++ ++ found = -1; ++ total = xino->xi_nondir.total; ++ for (i = 0; i < total; i++) { ++ if (xino->xi_nondir.array[i] != h_ino) ++ continue; ++ found = i; ++ break; ++ } ++ ++ return found; ++} ++ ++static int au_xinondir_expand(struct au_xino_file *xino) ++{ ++ int err, sz; ++ ino_t *p; ++ ++ BUILD_BUG_ON(KMALLOC_MAX_SIZE > INT_MAX); ++ ++ err = -ENOMEM; ++ sz = xino->xi_nondir.total * sizeof(ino_t); ++ if (unlikely(sz > KMALLOC_MAX_SIZE / 2)) ++ goto out; ++ p = au_kzrealloc(xino->xi_nondir.array, sz, sz << 1, GFP_ATOMIC, ++ /*may_shrink*/0); ++ if (p) { ++ xino->xi_nondir.array = p; ++ xino->xi_nondir.total <<= 1; ++ AuDbg("xi_nondir.total %d\n", xino->xi_nondir.total); ++ err = 0; ++ } ++ ++out: ++ return err; ++} ++ ++int au_xinondir_enter(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ int *idx) ++{ ++ int err, found, empty; ++ struct au_xino_file *xino; ++ ++ err = 0; ++ *idx = -1; ++ if (!au_opt_test(au_mntflags(sb), XINO)) ++ goto out; /* no xino */ ++ ++ xino = &au_sbr(sb, bindex)->br_xino; ++ ++again: ++ spin_lock(&xino->xi_nondir.spin); ++ found = au_xinondir_find(xino, h_ino); ++ if (found == -1) { ++ empty = au_xinondir_find(xino, /*h_ino*/0); ++ if (empty == -1) { ++ empty = xino->xi_nondir.total; ++ err = au_xinondir_expand(xino); ++ if (unlikely(err)) ++ goto out_unlock; ++ } ++ xino->xi_nondir.array[empty] = h_ino; ++ *idx = empty; ++ } else { ++ spin_unlock(&xino->xi_nondir.spin); ++ wait_event(xino->xi_nondir.wqh, ++ xino->xi_nondir.array[found] != h_ino); ++ goto again; ++ } ++ ++out_unlock: ++ spin_unlock(&xino->xi_nondir.spin); ++out: ++ return err; ++} diff --git a/fs/dcache.c b/fs/dcache.c index 95d71ed..b1ff5be 100644 --- a/fs/dcache.c @@ -34933,10 +35081,10 @@ index 95d71ed..b1ff5be 100644 /** * d_ancestor - search for an ancestor diff --git a/fs/exec.c b/fs/exec.c -index e579466..2566b16 100644 +index 65145a3..8d35776 100644 --- a/fs/exec.c +++ b/fs/exec.c -@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path) +@@ -109,6 +109,7 @@ bool path_noexec(const struct path *path) return (path->mnt->mnt_flags & MNT_NOEXEC) || (path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC); } @@ -34945,10 +35093,10 @@ index e579466..2566b16 100644 #ifdef CONFIG_USELIB /* diff --git a/fs/fcntl.c b/fs/fcntl.c -index e1c54f2..d60b682 100644 +index be8fbe2..c671660 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c -@@ -29,7 +29,7 @@ +@@ -30,7 +30,7 @@ #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME) @@ -34957,7 +35105,7 @@ index e1c54f2..d60b682 100644 { struct inode * inode = file_inode(filp); int error = 0; -@@ -60,6 +60,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg) +@@ -61,6 +61,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg) if (filp->f_op->check_flags) error = filp->f_op->check_flags(arg); @@ -34966,7 +35114,7 @@ index e1c54f2..d60b682 100644 if (error) return error; -@@ -80,6 +82,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg) +@@ -81,6 +83,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg) out: return error; } @@ -34975,10 +35123,10 @@ index e1c54f2..d60b682 100644 static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, int force) diff --git a/fs/file_table.c b/fs/file_table.c -index 6d982b5..9a3c6c8 100644 +index 954d510..4fb5b10 100644 --- a/fs/file_table.c +++ b/fs/file_table.c -@@ -147,6 +147,7 @@ struct file *get_empty_filp(void) +@@ -148,6 +148,7 @@ struct file *get_empty_filp(void) } return ERR_PTR(-ENFILE); } @@ -34986,7 +35134,7 @@ index 6d982b5..9a3c6c8 100644 /** * alloc_file - allocate and initialize a 'struct file' -@@ -258,6 +259,7 @@ void flush_delayed_fput(void) +@@ -259,6 +260,7 @@ void flush_delayed_fput(void) { delayed_fput(NULL); } @@ -34994,7 +35142,7 @@ index 6d982b5..9a3c6c8 100644 static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput); -@@ -300,6 +302,7 @@ void __fput_sync(struct file *file) +@@ -301,6 +303,7 @@ void __fput_sync(struct file *file) } EXPORT_SYMBOL(fput); @@ -35002,7 +35150,7 @@ index 6d982b5..9a3c6c8 100644 void put_filp(struct file *file) { -@@ -308,6 +311,7 @@ void put_filp(struct file *file) +@@ -309,6 +312,7 @@ void put_filp(struct file *file) file_free(file); } } @@ -35050,10 +35198,10 @@ index 88110fd..11789ff 100644 /** * touch_atime - update the access time diff --git a/fs/namespace.c b/fs/namespace.c -index 8bfad42..1c4c9bd 100644 +index cc1375ef..9b4c67c 100644 --- a/fs/namespace.c +++ b/fs/namespace.c -@@ -462,6 +462,7 @@ void __mnt_drop_write(struct vfsmount *mnt) +@@ -465,6 +465,7 @@ void __mnt_drop_write(struct vfsmount *mnt) mnt_dec_writers(real_mount(mnt)); preempt_enable(); } @@ -35061,7 +35209,7 @@ index 8bfad42..1c4c9bd 100644 /** * mnt_drop_write - give up write access to a mount -@@ -1881,6 +1882,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, +@@ -1884,6 +1885,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, } return 0; } @@ -35142,7 +35290,7 @@ index 6043306..fdb50e4 100644 /* * Destroy all marks in destroy_list, waits for SRCU period to finish before diff --git a/fs/open.c b/fs/open.c -index 9921f70..80d94c0 100644 +index 949cef2..9a892fb 100644 --- a/fs/open.c +++ b/fs/open.c @@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, @@ -35153,7 +35301,7 @@ index 9921f70..80d94c0 100644 long vfs_truncate(const struct path *path, loff_t length) { -@@ -695,6 +696,7 @@ int open_check_o_direct(struct file *f) +@@ -693,6 +694,7 @@ int open_check_o_direct(struct file *f) } return 0; } @@ -35162,10 +35310,10 @@ index 9921f70..80d94c0 100644 static int do_dentry_open(struct file *f, struct inode *inode, diff --git a/fs/proc/base.c b/fs/proc/base.c -index 87c9a9a..a0196f0 100644 +index c87b6b9..6b71643 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c -@@ -1958,7 +1958,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) +@@ -1946,7 +1946,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) down_read(&mm->mmap_sem); vma = find_exact_vma(mm, vm_start, vm_end); if (vma && vma->vm_file) { @@ -35191,10 +35339,10 @@ index 7563437..7c0dc0f 100644 ino = inode->i_ino; } diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index 8f96a49..0d10404 100644 +index 3125780..519b5c3 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c -@@ -291,7 +291,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) +@@ -292,7 +292,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) const char *name = NULL; if (file) { @@ -35206,7 +35354,7 @@ index 8f96a49..0d10404 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; -@@ -1628,7 +1631,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) +@@ -1636,7 +1639,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) struct proc_maps_private *proc_priv = &numa_priv->proc_maps; struct vm_area_struct *vma = v; struct numa_maps *md = &numa_priv->md; @@ -35216,10 +35364,10 @@ index 8f96a49..0d10404 100644 struct mm_walk walk = { .hugetlb_entry = gather_hugetlb_stats, diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c -index 3717562..6a328f1 100644 +index 23266694..58e59b6 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c -@@ -155,7 +155,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma, +@@ -157,7 +157,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma, file = vma->vm_file; if (file) { @@ -35232,10 +35380,10 @@ index 3717562..6a328f1 100644 ino = inode->i_ino; pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; diff --git a/fs/read_write.c b/fs/read_write.c -index 5816d4c..f9f8bb1 100644 +index c4f88af..b69e687 100644 --- a/fs/read_write.c +++ b/fs/read_write.c -@@ -515,6 +515,30 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, +@@ -513,6 +513,30 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, } EXPORT_SYMBOL(__vfs_write); @@ -35267,10 +35415,10 @@ index 5816d4c..f9f8bb1 100644 { mm_segment_t old_fs; diff --git a/fs/splice.c b/fs/splice.c -index 4ef78aa..d1569fa 100644 +index 006ba50..0efa652 100644 --- a/fs/splice.c +++ b/fs/splice.c -@@ -857,8 +857,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); +@@ -859,8 +859,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); /* * Attempt to initiate a splice from pipe to file. */ @@ -35281,7 +35429,7 @@ index 4ef78aa..d1569fa 100644 { ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); -@@ -870,13 +870,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, +@@ -872,13 +872,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, return splice_write(pipe, out, ppos, len, flags); } @@ -35299,7 +35447,7 @@ index 4ef78aa..d1569fa 100644 { ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); -@@ -899,6 +900,7 @@ static long do_splice_to(struct file *in, loff_t *ppos, +@@ -901,6 +902,7 @@ static long do_splice_to(struct file *in, loff_t *ppos, return splice_read(in, ppos, pipe, len, flags); } @@ -35308,7 +35456,7 @@ index 4ef78aa..d1569fa 100644 /** * splice_direct_to_actor - splices data directly between two non-pipes diff --git a/fs/sync.c b/fs/sync.c -index 2a54c1f..c9b9d46 100644 +index 11ba023..c86fe9c 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -27,7 +27,7 @@ @@ -35329,7 +35477,7 @@ index 2a54c1f..c9b9d46 100644 /* * Write out and wait upon all dirty data associated with this diff --git a/fs/xattr.c b/fs/xattr.c -index 7e3317c..88910fe 100644 +index 94f49a0..243f57e 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value, @@ -35353,10 +35501,10 @@ index 61eb82c..e700888 100644 static inline void fput_light(struct file *file, int fput_needed) { diff --git a/include/linux/fs.h b/include/linux/fs.h -index 2ba0743..d1c583b 100644 +index 7415630..433e314 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -1240,6 +1240,7 @@ extern void fasync_free(struct fasync_struct *); +@@ -1246,6 +1246,7 @@ extern void fasync_free(struct fasync_struct *); /* can be called from interrupts */ extern void kill_fasync(struct fasync_struct **, int, int); @@ -35364,7 +35512,7 @@ index 2ba0743..d1c583b 100644 extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force); extern void f_setown(struct file *filp, unsigned long arg, int force); extern void f_delown(struct file *filp); -@@ -1664,6 +1665,7 @@ struct file_operations { +@@ -1673,6 +1674,7 @@ struct file_operations { ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); @@ -35372,7 +35520,7 @@ index 2ba0743..d1c583b 100644 int (*flock) (struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); -@@ -1717,6 +1719,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, +@@ -1749,6 +1751,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, struct iovec *fast_pointer, struct iovec **ret_pointer); @@ -35385,7 +35533,7 @@ index 2ba0743..d1c583b 100644 extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t __vfs_write(struct file *, const char __user *, size_t, loff_t *); extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); -@@ -2108,6 +2116,7 @@ extern int current_umask(void); +@@ -2127,6 +2135,7 @@ extern int current_umask(void); extern void ihold(struct inode * inode); extern void iput(struct inode *); extern int generic_update_time(struct inode *, struct timespec *, int); @@ -35393,7 +35541,7 @@ index 2ba0743..d1c583b 100644 /* /sys/fs */ extern struct kobject *fs_kobj; -@@ -2387,6 +2396,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) +@@ -2407,6 +2416,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) return false; } #endif @@ -35402,10 +35550,10 @@ index 2ba0743..d1c583b 100644 extern const struct file_operations def_blk_fops; extern const struct file_operations def_chr_fops; diff --git a/include/linux/mm.h b/include/linux/mm.h -index b84615b..3978a35 100644 +index 00a8fa7..a90742b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -1257,6 +1257,28 @@ static inline int fixup_user_fault(struct task_struct *tsk, +@@ -1294,6 +1294,28 @@ static inline int fixup_user_fault(struct task_struct *tsk, } #endif @@ -35435,10 +35583,10 @@ index b84615b..3978a35 100644 unsigned int gup_flags); extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 808751d..66fc765 100644 +index f60f45f..38c5f76 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h -@@ -275,6 +275,7 @@ struct vm_region { +@@ -259,6 +259,7 @@ struct vm_region { unsigned long vm_top; /* region allocated to here */ unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ struct file *vm_file; /* the backing file or NULL */ @@ -35446,7 +35594,7 @@ index 808751d..66fc765 100644 int vm_usage; /* region usage count (access under nommu_region_sem) */ bool vm_icache_flushed : 1; /* true if the icache has been flushed for -@@ -349,6 +350,7 @@ struct vm_area_struct { +@@ -333,6 +334,7 @@ struct vm_area_struct { unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE units */ struct file * vm_file; /* File we map to (can be NULL). */ @@ -35470,7 +35618,7 @@ index 00a2116..1f0a4a2 100644 + unsigned int flags); #endif diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild -index f330ba4..67d88cd 100644 +index f8d9fed..902305e 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -59,6 +59,7 @@ header-y += atmsvc.h @@ -35483,7 +35631,7 @@ index f330ba4..67d88cd 100644 header-y += auxvec.h diff --git a/include/uapi/linux/aufs_type.h b/include/uapi/linux/aufs_type.h new file mode 100644 -index 0000000..a1719eb +index 0000000..0e0a004 --- /dev/null +++ b/include/uapi/linux/aufs_type.h @@ -0,0 +1,419 @@ @@ -35528,7 +35676,7 @@ index 0000000..a1719eb + +#include + -+#define AUFS_VERSION "4.10-20170313" ++#define AUFS_VERSION "4.10-20170522" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') @@ -35907,10 +36055,10 @@ index 0000000..a1719eb + +#endif /* __AUFS_TYPE_H__ */ diff --git a/kernel/fork.c b/kernel/fork.c -index 11c5c8a..48e7ef7 100644 +index 4cc564e..631a65c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -626,7 +626,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, +@@ -641,7 +641,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, struct inode *inode = file_inode(file); struct address_space *mapping = file->f_mapping; @@ -35929,12 +36077,12 @@ index d513051..e056d54 100644 } +EXPORT_SYMBOL_GPL(task_work_run); diff --git a/mm/Makefile b/mm/Makefile -index 295bd7a..14fa1c8 100644 +index 026f6a8..723da17 100644 --- a/mm/Makefile +++ b/mm/Makefile -@@ -37,7 +37,7 @@ obj-y := filemap.o mempool.o oom_kill.o \ +@@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o \ mm_init.o mmu_context.o percpu.o slab_common.o \ - compaction.o vmacache.o \ + compaction.o vmacache.o swap_slots.o \ interval_tree.o list_lru.o workingset.o \ - debug.o $(mmu-y) + prfile.o debug.o $(mmu-y) @@ -35942,20 +36090,20 @@ index 295bd7a..14fa1c8 100644 obj-y += init-mm.o diff --git a/mm/filemap.c b/mm/filemap.c -index 3afa2a5..34485ec 100644 +index 157c047..0cf15d2 100644 --- a/mm/filemap.c +++ b/mm/filemap.c -@@ -2400,7 +2400,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) +@@ -2406,7 +2406,7 @@ int filemap_page_mkwrite(struct vm_fault *vmf) int ret = VM_FAULT_LOCKED; sb_start_pagefault(inode->i_sb); -- file_update_time(vma->vm_file); -+ vma_file_update_time(vma); +- file_update_time(vmf->vma->vm_file); ++ vma_file_update_time(vmf->vma); lock_page(page); if (page->mapping != inode->i_mapping) { unlock_page(page); diff --git a/mm/mmap.c b/mm/mmap.c -index dc4291d..4b3a2aa 100644 +index bfbe885..8bd32f9 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -170,7 +170,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) @@ -35967,7 +36115,7 @@ index dc4291d..4b3a2aa 100644 mpol_put(vma_policy(vma)); kmem_cache_free(vm_area_cachep, vma); return next; -@@ -879,7 +879,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, +@@ -881,7 +881,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, if (remove_next) { if (file) { uprobe_munmap(next, next->vm_start, next->vm_end); @@ -35976,7 +36124,7 @@ index dc4291d..4b3a2aa 100644 } if (next->anon_vma) anon_vma_merge(vma, next); -@@ -1727,8 +1727,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, +@@ -1731,8 +1731,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, return addr; unmap_and_free_vma: @@ -35986,7 +36134,7 @@ index dc4291d..4b3a2aa 100644 /* Undo any partial mapping done by a device driver. */ unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); -@@ -2533,7 +2533,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2537,7 +2537,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, goto out_free_mpol; if (new->vm_file) @@ -35995,7 +36143,7 @@ index dc4291d..4b3a2aa 100644 if (new->vm_ops && new->vm_ops->open) new->vm_ops->open(new); -@@ -2552,7 +2552,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2556,7 +2556,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, if (new->vm_ops && new->vm_ops->close) new->vm_ops->close(new); if (new->vm_file) @@ -36004,7 +36152,7 @@ index dc4291d..4b3a2aa 100644 unlink_anon_vmas(new); out_free_mpol: mpol_put(vma_policy(new)); -@@ -2703,7 +2703,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2710,7 +2710,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, struct vm_area_struct *vma; unsigned long populate = 0; unsigned long ret = -EINVAL; @@ -36013,7 +36161,7 @@ index dc4291d..4b3a2aa 100644 pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt.\n", current->comm, current->pid); -@@ -2778,10 +2778,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2785,10 +2785,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, } } @@ -36022,7 +36170,7 @@ index dc4291d..4b3a2aa 100644 + file = vma->vm_file; + prfile = vma->vm_prfile; ret = do_mmap_pgoff(vma->vm_file, start, size, - prot, flags, pgoff, &populate); + prot, flags, pgoff, &populate, NULL); + if (!IS_ERR_VALUE(ret) && file && prfile) { + struct vm_area_struct *new_vma; + @@ -36042,7 +36190,7 @@ index dc4291d..4b3a2aa 100644 out: up_write(&mm->mmap_sem); if (populate) -@@ -3056,7 +3073,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -3079,7 +3096,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, if (anon_vma_clone(new_vma, vma)) goto out_free_mempol; if (new_vma->vm_file) @@ -36052,10 +36200,10 @@ index dc4291d..4b3a2aa 100644 new_vma->vm_ops->open(new_vma); vma_link(mm, new_vma, prev, rb_link, rb_parent); diff --git a/mm/nommu.c b/mm/nommu.c -index 24f9f5f..ac0d37a 100644 +index 2d131b9..5dc9a19 100644 --- a/mm/nommu.c +++ b/mm/nommu.c -@@ -636,7 +636,7 @@ static void __put_nommu_region(struct vm_region *region) +@@ -637,7 +637,7 @@ static void __put_nommu_region(struct vm_region *region) up_write(&nommu_region_sem); if (region->vm_file) @@ -36064,7 +36212,7 @@ index 24f9f5f..ac0d37a 100644 /* IO memory and memory shared directly out of the pagecache * from ramfs/tmpfs mustn't be released here */ -@@ -794,7 +794,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) +@@ -795,7 +795,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -36073,7 +36221,7 @@ index 24f9f5f..ac0d37a 100644 put_nommu_region(vma->vm_region); kmem_cache_free(vm_area_cachep, vma); } -@@ -1320,7 +1320,7 @@ unsigned long do_mmap(struct file *file, +@@ -1322,7 +1322,7 @@ unsigned long do_mmap(struct file *file, goto error_just_free; } } @@ -36082,7 +36230,7 @@ index 24f9f5f..ac0d37a 100644 kmem_cache_free(vm_region_jar, region); region = pregion; result = start; -@@ -1395,10 +1395,10 @@ unsigned long do_mmap(struct file *file, +@@ -1397,10 +1397,10 @@ unsigned long do_mmap(struct file *file, up_write(&nommu_region_sem); error: if (region->vm_file) @@ -36097,10 +36245,10 @@ index 24f9f5f..ac0d37a 100644 diff --git a/mm/prfile.c b/mm/prfile.c new file mode 100644 -index 0000000..b323b8a +index 0000000..c1c8518 --- /dev/null +++ b/mm/prfile.c -@@ -0,0 +1,86 @@ +@@ -0,0 +1,85 @@ +/* + * Mainly for aufs which mmap(2) diffrent file and wants to print different path + * in /proc/PID/maps. @@ -36108,7 +36256,7 @@ index 0000000..b323b8a + * + * See Documentation/filesystems/aufs/design/06mmap.txt + * -+ * Copyright (c) 2014 Junjro R. Okajima ++ * Copyright (c) 2014-2017 Junjro R. Okajima + * Copyright (c) 2014 Ian Campbell + */ + @@ -36122,8 +36270,7 @@ index 0000000..b323b8a +{ +#ifdef PRFILE_TRACE + if (pr) -+ pr_info("%s:%d: %s, %s\n", func, line, func2, -+ f ? (char *)f->f_path.dentry->d_name.name : "(null)"); ++ pr_info("%s:%d: %s, %pD2\n", func, line, func2, f); +#endif +} + @@ -36188,10 +36335,10 @@ index 0000000..b323b8a +} +#endif /* !CONFIG_MMU */ diff --git a/security/commoncap.c b/security/commoncap.c -index 8df676f..6b5cc07 100644 +index 78b3783..c8b3e88 100644 --- a/security/commoncap.c +++ b/security/commoncap.c -@@ -1061,12 +1061,14 @@ int cap_mmap_addr(unsigned long addr) +@@ -1062,12 +1062,14 @@ int cap_mmap_addr(unsigned long addr) } return ret; } @@ -36227,10 +36374,10 @@ index 03c1652..f88c84b 100644 int devcgroup_inode_mknod(int mode, dev_t dev) { diff --git a/security/security.c b/security/security.c -index f825304..8dd441d 100644 +index d0e07f2..5e323b0 100644 --- a/security/security.c +++ b/security/security.c -@@ -443,6 +443,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) +@@ -481,6 +481,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) return 0; return call_int_hook(path_rmdir, 0, dir, dentry); } @@ -36238,7 +36385,7 @@ index f825304..8dd441d 100644 int security_path_unlink(const struct path *dir, struct dentry *dentry) { -@@ -459,6 +460,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, +@@ -497,6 +498,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, return 0; return call_int_hook(path_symlink, 0, dir, dentry, old_name); } @@ -36246,7 +36393,7 @@ index f825304..8dd441d 100644 int security_path_link(struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry) -@@ -467,6 +469,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, +@@ -505,6 +507,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, return 0; return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry); } @@ -36254,7 +36401,7 @@ index f825304..8dd441d 100644 int security_path_rename(const struct path *old_dir, struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry, -@@ -494,6 +497,7 @@ int security_path_truncate(const struct path *path) +@@ -532,6 +535,7 @@ int security_path_truncate(const struct path *path) return 0; return call_int_hook(path_truncate, 0, path); } @@ -36262,7 +36409,7 @@ index f825304..8dd441d 100644 int security_path_chmod(const struct path *path, umode_t mode) { -@@ -501,6 +505,7 @@ int security_path_chmod(const struct path *path, umode_t mode) +@@ -539,6 +543,7 @@ int security_path_chmod(const struct path *path, umode_t mode) return 0; return call_int_hook(path_chmod, 0, path, mode); } @@ -36270,7 +36417,7 @@ index f825304..8dd441d 100644 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) { -@@ -508,6 +513,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) +@@ -546,6 +551,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) return 0; return call_int_hook(path_chown, 0, path, uid, gid); } @@ -36278,7 +36425,7 @@ index f825304..8dd441d 100644 int security_path_chroot(const struct path *path) { -@@ -593,6 +599,7 @@ int security_inode_readlink(struct dentry *dentry) +@@ -631,6 +637,7 @@ int security_inode_readlink(struct dentry *dentry) return 0; return call_int_hook(inode_readlink, 0, dentry); } @@ -36286,7 +36433,7 @@ index f825304..8dd441d 100644 int security_inode_follow_link(struct dentry *dentry, struct inode *inode, bool rcu) -@@ -608,6 +615,7 @@ int security_inode_permission(struct inode *inode, int mask) +@@ -646,6 +653,7 @@ int security_inode_permission(struct inode *inode, int mask) return 0; return call_int_hook(inode_permission, 0, inode, mask); } @@ -36294,7 +36441,7 @@ index f825304..8dd441d 100644 int security_inode_setattr(struct dentry *dentry, struct iattr *attr) { -@@ -779,6 +787,7 @@ int security_file_permission(struct file *file, int mask) +@@ -817,6 +825,7 @@ int security_file_permission(struct file *file, int mask) return fsnotify_perm(file, mask); } @@ -36302,7 +36449,7 @@ index f825304..8dd441d 100644 int security_file_alloc(struct file *file) { -@@ -838,6 +847,7 @@ int security_mmap_file(struct file *file, unsigned long prot, +@@ -876,6 +885,7 @@ int security_mmap_file(struct file *file, unsigned long prot, return ret; return ima_file_mmap(file, prot); } diff --git a/kernel-i586.config b/kernel-i586.config index 2563d32..3c74cb7 100644 --- a/kernel-i586.config +++ b/kernel-i586.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.10.x-nrj-desktop Kernel Configuration +# Linux/x86 4.11.x-nrj-desktop Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -115,7 +115,7 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=18 CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 -CONFIG_NMI_LOG_BUF_SHIFT=13 +CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 CONFIG_CGROUPS=y CONFIG_PAGE_COUNTER=y CONFIG_MEMCG=y @@ -129,6 +129,7 @@ CONFIG_FAIR_GROUP_SCHED=y CONFIG_CFS_BANDWIDTH=y # CONFIG_RT_GROUP_SCHED is not set CONFIG_CGROUP_PIDS=y +# CONFIG_CGROUP_RDMA is not set CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_HUGETLB=y CONFIG_CPUSETS=y @@ -193,6 +194,7 @@ CONFIG_USERFAULTFD=y CONFIG_PCI_QUIRKS=y CONFIG_MEMBARRIER=y # CONFIG_EMBEDDED is not set +# CONFIG_PC104 is not set # # Kernel Performance Events And Counters @@ -201,6 +203,7 @@ CONFIG_PERF_EVENTS=y # CONFIG_DEBUG_PERF_USE_VMALLOC is not set CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLUB_DEBUG=y +# CONFIG_SLUB_MEMCG_SYSFS_ON is not set # CONFIG_COMPAT_BRK is not set # CONFIG_SLAB is not set CONFIG_SLUB=y @@ -234,6 +237,8 @@ CONFIG_ISA_BUS_API=y CONFIG_CLONE_BACKWARDS=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_OLD_SIGACTION=y +CONFIG_STRICT_KERNEL_RWX=y +CONFIG_STRICT_MODULE_RWX=y # # GCOV-based kernel profiling @@ -253,6 +258,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_MODULES_TREE_LOOKUP=y CONFIG_BLOCK=y CONFIG_LBDAF=y +CONFIG_BLK_SCSI_REQUEST=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_INTEGRITY=y @@ -262,6 +268,8 @@ CONFIG_BLK_DEV_THROTTLING=y CONFIG_BLK_WBT=y # CONFIG_BLK_WBT_SQ is not set CONFIG_BLK_WBT_MQ=y +CONFIG_BLK_DEBUG_FS=y +CONFIG_BLK_SED_OPAL=y # # Partition Types @@ -288,6 +296,7 @@ CONFIG_EFI_PARTITION=y # CONFIG_SYSV68_PARTITION is not set # CONFIG_CMDLINE_PARTITION is not set CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_MQ_VIRTIO=y # # IO Schedulers @@ -303,6 +312,7 @@ CONFIG_BFQ_GROUP_IOSCHED=y CONFIG_DEFAULT_BFQ=y # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="bfq" +CONFIG_MQ_IOSCHED_DEADLINE=y CONFIG_PREEMPT_NOTIFIERS=y CONFIG_PADATA=y CONFIG_ASN1=y @@ -631,7 +641,6 @@ CONFIG_X86_INTEL_PSTATE=y CONFIG_X86_PCC_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ_CPB=y -CONFIG_X86_SFI_CPUFREQ=m CONFIG_X86_POWERNOW_K6=m CONFIG_X86_POWERNOW_K7=m CONFIG_X86_POWERNOW_K7_ACPI=y @@ -684,6 +693,7 @@ CONFIG_PCIEASPM=y # CONFIG_PCIEASPM_DEBUG is not set CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set +# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set # CONFIG_PCIEASPM_PERFORMANCE is not set CONFIG_PCIE_PME=y CONFIG_PCIE_DPC=y @@ -775,9 +785,8 @@ CONFIG_BINFMT_SCRIPT=y CONFIG_BINFMT_AOUT=m CONFIG_BINFMT_MISC=m CONFIG_COREDUMP=y -CONFIG_X86_DEV_DMA_OPS=y -CONFIG_X86_DMA_REMAP=y -CONFIG_PMC_ATOM=y +CONFIG_COMPAT_32=y +CONFIG_HAVE_ATOMIC_IOMAP=y CONFIG_NET=y CONFIG_NET_INGRESS=y CONFIG_NET_EGRESS=y @@ -790,6 +799,7 @@ CONFIG_PACKET_DIAG=m CONFIG_UNIX=y CONFIG_UNIX_DIAG=m CONFIG_XFRM=y +CONFIG_XFRM_OFFLOAD=y CONFIG_XFRM_ALGO=m CONFIG_XFRM_USER=m # CONFIG_XFRM_SUB_POLICY is not set @@ -798,6 +808,8 @@ CONFIG_XFRM_STATISTICS=y CONFIG_XFRM_IPCOMP=m CONFIG_NET_KEY=m # CONFIG_NET_KEY_MIGRATE is not set +CONFIG_SMC=m +CONFIG_SMC_DIAG=m CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y @@ -823,6 +835,7 @@ CONFIG_NET_FOU=m CONFIG_NET_FOU_IP_TUNNELS=y CONFIG_INET_AH=m CONFIG_INET_ESP=m +CONFIG_INET_ESP_OFFLOAD=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m @@ -861,6 +874,7 @@ CONFIG_IPV6_ROUTE_INFO=y # CONFIG_IPV6_OPTIMISTIC_DAD is not set CONFIG_INET6_AH=m CONFIG_INET6_ESP=m +CONFIG_INET6_ESP_OFFLOAD=m CONFIG_INET6_IPCOMP=m CONFIG_IPV6_MIP6=m CONFIG_IPV6_ILA=m @@ -955,6 +969,7 @@ CONFIG_NFT_NUMGEN=m CONFIG_NFT_CT=m CONFIG_NFT_SET_RBTREE=m CONFIG_NFT_SET_HASH=m +CONFIG_NFT_SET_BITMAP=m CONFIG_NFT_COUNTER=m CONFIG_NFT_LOG=m CONFIG_NFT_LIMIT=m @@ -1285,7 +1300,6 @@ CONFIG_BRIDGE=m CONFIG_BRIDGE_IGMP_SNOOPING=y CONFIG_BRIDGE_VLAN_FILTERING=y CONFIG_NET_DSA=m -CONFIG_NET_DSA_HWMON=y CONFIG_NET_DSA_TAG_BRCM=y CONFIG_NET_DSA_TAG_DSA=y CONFIG_NET_DSA_TAG_EDSA=y @@ -1394,6 +1408,7 @@ CONFIG_NET_ACT_POLICE=m CONFIG_NET_ACT_GACT=m CONFIG_GACT_PROB=y CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_SAMPLE=m CONFIG_NET_ACT_IPT=m CONFIG_NET_ACT_NAT=m CONFIG_NET_ACT_PEDIT=m @@ -1726,9 +1741,12 @@ CONFIG_NFC_NXP_NCI_I2C=m CONFIG_NFC_S3FWRN5=m CONFIG_NFC_S3FWRN5_I2C=m CONFIG_NFC_ST95HF=m +CONFIG_PSAMPLE=m +CONFIG_NET_IFE=m CONFIG_LWTUNNEL=y CONFIG_LWTUNNEL_BPF=y CONFIG_DST_CACHE=y +CONFIG_GRO_CELLS=y CONFIG_NET_DEVLINK=m CONFIG_MAY_USE_DEVLINK=m @@ -1886,7 +1904,6 @@ CONFIG_MTD_NAND_CAFE=m CONFIG_MTD_NAND_CS553X=m CONFIG_MTD_NAND_NANDSIM=m CONFIG_MTD_NAND_PLATFORM=m -CONFIG_MTD_NAND_OXNAS=m CONFIG_MTD_NAND_HISI504=m CONFIG_MTD_NAND_MTK=m CONFIG_MTD_ONENAND=m @@ -1903,6 +1920,8 @@ CONFIG_MTD_QINFO_PROBE=m CONFIG_MTD_SPI_NOR=m CONFIG_MTD_MT81xx_NOR=m CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y +CONFIG_SPI_INTEL_SPI=m +CONFIG_SPI_INTEL_SPI_PLATFORM=m CONFIG_MTD_UBI=m CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_LIMIT=20 @@ -1985,6 +2004,7 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8 # CONFIG_CDROM_PKTCDVD_WCACHE is not set CONFIG_ATA_OVER_ETH=m CONFIG_VIRTIO_BLK=m +CONFIG_VIRTIO_BLK_SCSI=y # CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_RBD=m CONFIG_BLK_DEV_RSXX=m @@ -2043,6 +2063,7 @@ CONFIG_EEPROM_LEGACY=m CONFIG_EEPROM_MAX6875=m CONFIG_EEPROM_93CX6=m CONFIG_EEPROM_93XX46=m +CONFIG_EEPROM_IDT_89HPESX=m CONFIG_CB710_CORE=m # CONFIG_CB710_DEBUG is not set CONFIG_CB710_DEBUG_ASSUMPTIONS=y @@ -2152,7 +2173,6 @@ CONFIG_SCSI_3W_SAS=m CONFIG_SCSI_ACARD=m CONFIG_SCSI_AHA152X=m CONFIG_SCSI_AHA1542=m -CONFIG_SCSI_AHA1740=m CONFIG_SCSI_AACRAID=m CONFIG_SCSI_AIC7XXX=m CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 @@ -2235,9 +2255,9 @@ CONFIG_TCM_QLA2XXX=m # CONFIG_TCM_QLA2XXX_DEBUG is not set CONFIG_SCSI_QLA_ISCSI=m CONFIG_QEDI=m +CONFIG_QEDF=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_LPFC_DEBUG_FS is not set -CONFIG_SCSI_SIM710=m CONFIG_SCSI_SYM53C416=m CONFIG_SCSI_DC395x=m CONFIG_SCSI_AM53C974=m @@ -2450,6 +2470,7 @@ CONFIG_NET_TEAM_MODE_LOADBALANCE=m CONFIG_MACVLAN=m CONFIG_MACVTAP=m CONFIG_IPVLAN=m +CONFIG_IPVTAP=m CONFIG_VXLAN=m CONFIG_GENEVE=m CONFIG_GTP=m @@ -2463,6 +2484,7 @@ CONFIG_RIONET=m CONFIG_RIONET_TX_SIZE=128 CONFIG_RIONET_RX_SIZE=128 CONFIG_TUN=y +CONFIG_TAP=m # CONFIG_TUN_VNET_CROSS_LE is not set CONFIG_VETH=m CONFIG_VIRTIO_NET=m @@ -2523,6 +2545,7 @@ CONFIG_NI65=m CONFIG_AMD_XGBE=m CONFIG_AMD_XGBE_DCB=y CONFIG_AMD_XGBE_HAVE_ECC=y +CONFIG_NET_VENDOR_AQUANTIA=y CONFIG_NET_VENDOR_ARC=y CONFIG_NET_VENDOR_ATHEROS=y CONFIG_ATL2=m @@ -2658,8 +2681,8 @@ CONFIG_NET_VENDOR_NATSEMI=y CONFIG_NATSEMI=m CONFIG_NS83820=m CONFIG_NET_VENDOR_NETRONOME=y -CONFIG_NFP_NETVF=m -# CONFIG_NFP_NET_DEBUG is not set +CONFIG_NFP=m +# CONFIG_NFP_DEBUG is not set CONFIG_NET_VENDOR_8390=y CONFIG_PCMCIA_AXNET=m CONFIG_NE2000=m @@ -2688,6 +2711,7 @@ CONFIG_QED_LL2=y CONFIG_QED_SRIOV=y CONFIG_QEDE=m CONFIG_QED_ISCSI=y +CONFIG_QED_FCOE=y CONFIG_NET_VENDOR_QUALCOMM=y CONFIG_QCOM_EMAC=m CONFIG_NET_VENDOR_REALTEK=y @@ -2890,7 +2914,6 @@ CONFIG_ATH9K_HTC=m CONFIG_ATH9K_HWRNG=y CONFIG_CARL9170=m CONFIG_CARL9170_LEDS=y -# CONFIG_CARL9170_DEBUGFS is not set CONFIG_CARL9170_WPC=y CONFIG_CARL9170_HWRNG=y CONFIG_ATH6KL=m @@ -2977,7 +3000,6 @@ CONFIG_IWL3945=m # iwl3945 / iwl4965 Debugging Options # # CONFIG_IWLEGACY_DEBUG is not set -# CONFIG_IWLEGACY_DEBUGFS=y is not set CONFIG_IWLWIFI=m CONFIG_IWLWIFI_LEDS=y CONFIG_IWLDVM=m @@ -2990,7 +3012,6 @@ CONFIG_IWLWIFI_OPMODE_MODULAR=y # Debugging Options # # CONFIG_IWLWIFI_DEBUG is not set -# CONFIG_IWLWIFI_DEBUGFS is not set # CONFIG_IWLWIFI_DEVICE_TRACING is not set CONFIG_WLAN_VENDOR_INTERSIL=y CONFIG_HOSTAP=m @@ -3061,7 +3082,6 @@ CONFIG_RT2X00_LIB=m CONFIG_RT2X00_LIB_FIRMWARE=y CONFIG_RT2X00_LIB_CRYPTO=y CONFIG_RT2X00_LIB_LEDS=y -# CONFIG_RT2X00_LIB_DEBUGFS is not set # CONFIG_RT2X00_DEBUG is not set CONFIG_WLAN_VENDOR_REALTEK=y CONFIG_RTL8180=m @@ -3255,7 +3275,6 @@ CONFIG_MISDN_ISAR=m CONFIG_ISDN_HDLC=m CONFIG_NVM=y # CONFIG_NVM_DEBUG is not set -CONFIG_NVM_GENNVM=m CONFIG_NVM_RRPC=m # @@ -3306,6 +3325,7 @@ CONFIG_KEYBOARD_OPENCORES=m CONFIG_KEYBOARD_SAMSUNG=m CONFIG_KEYBOARD_STOWAWAY=m CONFIG_KEYBOARD_SUNKBD=m +CONFIG_KEYBOARD_TM2_TOUCHKEY=m CONFIG_KEYBOARD_TWL4030=m CONFIG_KEYBOARD_XTKBD=m CONFIG_KEYBOARD_CROS_EC=m @@ -3467,6 +3487,7 @@ CONFIG_TOUCHSCREEN_SUR40=m CONFIG_TOUCHSCREEN_SURFACE3_SPI=m CONFIG_TOUCHSCREEN_SX8654=m CONFIG_TOUCHSCREEN_TPS6507X=m +CONFIG_TOUCHSCREEN_ZET6223=m CONFIG_TOUCHSCREEN_ZFORCE=m CONFIG_TOUCHSCREEN_ROHM_BU21023=m CONFIG_INPUT_MISC=y @@ -3484,7 +3505,6 @@ CONFIG_INPUT_MAX8925_ONKEY=m CONFIG_INPUT_MAX8997_HAPTIC=m CONFIG_INPUT_MC13783_PWRBUTTON=m # CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set CONFIG_INPUT_APANEL=m CONFIG_INPUT_GP2A=m # CONFIG_INPUT_GPIO_BEEPER is not set @@ -3603,6 +3623,7 @@ CONFIG_SERIAL_8250_FINTEK=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_EXAR=y CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=48 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 @@ -3632,6 +3653,7 @@ CONFIG_SERIAL_MAX310X=y CONFIG_SERIAL_UARTLITE=m CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_CONSOLE_POLL=y CONFIG_SERIAL_JSM=m CONFIG_SERIAL_SCCNXP=y CONFIG_SERIAL_SCCNXP_CONSOLE=y @@ -3651,13 +3673,13 @@ CONFIG_SERIAL_ARC_NR_PORTS=1 CONFIG_SERIAL_RP2=m CONFIG_SERIAL_RP2_NR_UARTS=32 CONFIG_SERIAL_FSL_LPUART=m -CONFIG_SERIAL_MEN_Z135=m +CONFIG_SERIAL_DEV_BUS=m # CONFIG_TTY_PRINTK is not set CONFIG_PRINTER=m # CONFIG_LP_CONSOLE is not set CONFIG_PPDEV=m CONFIG_HVC_DRIVER=y -CONFIG_VIRTIO_CONSOLE=y +CONFIG_VIRTIO_CONSOLE=m CONFIG_IPMI_HANDLER=m CONFIG_IPMI_PANIC_EVENT=y CONFIG_IPMI_PANIC_STRING=y @@ -3889,6 +3911,7 @@ CONFIG_PTP_1588_CLOCK=m # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # CONFIG_PTP_1588_CLOCK_PCH=m +CONFIG_PTP_1588_CLOCK_KVM=m CONFIG_PINCTRL=y # @@ -3902,16 +3925,15 @@ CONFIG_PINCTRL_AMD=y # CONFIG_PINCTRL_SX150X is not set CONFIG_PINCTRL_BAYTRAIL=y CONFIG_PINCTRL_CHERRYVIEW=m -# CONFIG_PINCTRL_MERRIFIELD is not set CONFIG_PINCTRL_INTEL=m CONFIG_PINCTRL_BROXTON=m +CONFIG_PINCTRL_GEMINILAKE=m CONFIG_PINCTRL_SUNRISEPOINT=m CONFIG_GPIOLIB=y CONFIG_GPIO_ACPI=y CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_DEBUG_GPIO is not set CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_GENERIC=m CONFIG_GPIO_MAX730X=m # @@ -3920,11 +3942,11 @@ CONFIG_GPIO_MAX730X=m # CONFIG_GPIO_AMDPT is not set # CONFIG_GPIO_AXP209 is not set # CONFIG_GPIO_DWAPB is not set +CONFIG_GPIO_EXAR=m # CONFIG_GPIO_GENERIC_PLATFORM is not set CONFIG_GPIO_ICH=m CONFIG_GPIO_LYNXPOINT=y # CONFIG_GPIO_MOCKUP is not set -# CONFIG_GPIO_STA2X11 is not set # CONFIG_GPIO_VX855 is not set # @@ -3964,11 +3986,8 @@ CONFIG_GPIO_DLN2=m CONFIG_GPIO_JANZ_TTL=m CONFIG_GPIO_KEMPLD=m CONFIG_GPIO_LP3943=m -CONFIG_GPIO_LP873X=m -CONFIG_GPIO_MSIC=y CONFIG_GPIO_PALMAS=y CONFIG_GPIO_RC5T583=y -CONFIG_GPIO_TIMBERDALE=y CONFIG_GPIO_TPS65086=m CONFIG_GPIO_TPS65218=m CONFIG_GPIO_TPS6586X=y @@ -3988,6 +4007,7 @@ CONFIG_GPIO_WM8994=m CONFIG_GPIO_AMD8111=m CONFIG_GPIO_ML_IOH=m CONFIG_GPIO_PCH=m +CONFIG_GPIO_PCI_IDIO_16=m CONFIG_GPIO_RDC321X=m # @@ -4022,6 +4042,7 @@ CONFIG_W1_MASTER_DS1WM=m # CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2405=m CONFIG_W1_SLAVE_DS2408=m CONFIG_W1_SLAVE_DS2408_READBACK=y CONFIG_W1_SLAVE_DS2413=m @@ -4048,17 +4069,15 @@ CONFIG_WM831X_POWER=m CONFIG_WM8350_POWER=m # CONFIG_TEST_POWER is not set CONFIG_BATTERY_88PM860X=m -CONFIG_BATTERY_DS2760=m CONFIG_BATTERY_DS2780=m CONFIG_BATTERY_DS2781=m CONFIG_BATTERY_DS2782=m CONFIG_BATTERY_SBS=m +CONFIG_CHARGER_SBS=m CONFIG_BATTERY_BQ27XXX=m CONFIG_BATTERY_BQ27XXX_I2C=m CONFIG_BATTERY_DA9030=m CONFIG_BATTERY_DA9052=m -CONFIG_CHARGER_DA9150=m -CONFIG_BATTERY_DA9150=m CONFIG_AXP288_CHARGER=m # CONFIG_AXP288_FUEL_GAUGE is not set CONFIG_BATTERY_MAX17040=m @@ -4066,7 +4085,6 @@ CONFIG_BATTERY_MAX17042=m CONFIG_BATTERY_TWL4030_MADC=m CONFIG_CHARGER_88PM860X=m CONFIG_CHARGER_PCF50633=m -CONFIG_BATTERY_INTEL_MID=m CONFIG_BATTERY_RX51=m CONFIG_CHARGER_ISP1704=m CONFIG_CHARGER_MAX8903=m @@ -4074,11 +4092,8 @@ CONFIG_CHARGER_TWL4030=m CONFIG_CHARGER_LP8727=m CONFIG_CHARGER_LP8788=m CONFIG_CHARGER_GPIO=m -CONFIG_CHARGER_MANAGER=y CONFIG_CHARGER_MAX14577=m CONFIG_CHARGER_MAX77693=m -CONFIG_CHARGER_MAX8997=m -CONFIG_CHARGER_MAX8998=m CONFIG_CHARGER_BQ2415X=m CONFIG_CHARGER_BQ24190=m CONFIG_CHARGER_BQ24257=m @@ -4088,7 +4103,6 @@ CONFIG_CHARGER_SMB347=m CONFIG_CHARGER_TPS65090=m CONFIG_CHARGER_TPS65217=m CONFIG_BATTERY_GAUGE_LTC2941=m -CONFIG_BATTERY_RT5033=m CONFIG_CHARGER_RT9455=m CONFIG_AXP20X_POWER=m CONFIG_HWMON=y @@ -4121,7 +4135,6 @@ CONFIG_SENSORS_K8TEMP=m CONFIG_SENSORS_K10TEMP=m CONFIG_SENSORS_FAM15H_POWER=m CONFIG_SENSORS_APPLESMC=m -CONFIG_SENSORS_ARM_SCPI=m CONFIG_SENSORS_ASB100=m CONFIG_SENSORS_ATXP1=m CONFIG_SENSORS_DS620=m @@ -4227,6 +4240,7 @@ CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_SCH56XX_COMMON=m CONFIG_SENSORS_SCH5627=m CONFIG_SENSORS_SCH5636=m +CONFIG_SENSORS_STTS751=m CONFIG_SENSORS_SMM665=m CONFIG_SENSORS_ADC128D818=m CONFIG_SENSORS_ADS1015=m @@ -4303,6 +4317,7 @@ CONFIG_WATCHDOG_SYSFS=y # Watchdog Device Drivers # CONFIG_SOFT_WATCHDOG=m +CONFIG_SOFT_WATCHDOG_PRETIMEOUT=y CONFIG_DA9052_WATCHDOG=m CONFIG_DA9055_WATCHDOG=m CONFIG_DA9063_WATCHDOG=m @@ -4333,8 +4348,6 @@ CONFIG_IBMASR=m CONFIG_WAFER_WDT=m CONFIG_I6300ESB_WDT=m CONFIG_IE6XX_WDT=m -CONFIG_INTEL_SCU_WATCHDOG=y -CONFIG_INTEL_MID_WATCHDOG=m CONFIG_ITCO_WDT=m CONFIG_ITCO_VENDOR_SUPPORT=y CONFIG_IT8712F_WDT=m @@ -4360,6 +4373,7 @@ CONFIG_MACHZ_WDT=m CONFIG_SBC_EPX_C3_WATCHDOG=m CONFIG_INTEL_MEI_WDT=m CONFIG_NI903X_WDT=m +CONFIG_NIC7018_WDT=m CONFIG_MEN_A21_WDT=m # @@ -4459,7 +4473,6 @@ CONFIG_INTEL_SOC_PMIC=y CONFIG_MFD_INTEL_LPSS=m CONFIG_MFD_INTEL_LPSS_ACPI=m CONFIG_MFD_INTEL_LPSS_PCI=m -CONFIG_MFD_INTEL_MSIC=y CONFIG_MFD_JANZ_CMODIO=m CONFIG_MFD_KEMPLD=m CONFIG_MFD_88PM800=m @@ -4496,7 +4509,6 @@ CONFIG_MFD_SYSCON=y CONFIG_MFD_TI_AM335X_TSCADC=m CONFIG_MFD_LP3943=m CONFIG_MFD_LP8788=y -# CONFIG_BACKLIGHT_OT200 is not set CONFIG_MFD_PALMAS=y # CONFIG_TPS6105X is not set # CONFIG_TPS65010 is not set @@ -4605,6 +4617,7 @@ CONFIG_IR_ITE_CIR=m CONFIG_IR_FINTEK=m CONFIG_IR_NUVOTON=m CONFIG_IR_REDRAT3=m +CONFIG_IR_SPI=m CONFIG_IR_STREAMZAP=m CONFIG_IR_WINBOND_CIR=m CONFIG_IR_IGORPLUGUSB=m @@ -4690,7 +4703,6 @@ CONFIG_VIDEO_PVRUSB2_DVB=y CONFIG_VIDEO_HDPVR=m CONFIG_VIDEO_USBVISION=m CONFIG_VIDEO_STK1160_COMMON=m -CONFIG_VIDEO_STK1160_AC97=y CONFIG_VIDEO_STK1160=m CONFIG_VIDEO_GO7007=m CONFIG_VIDEO_GO7007_USB=m @@ -4755,6 +4767,7 @@ CONFIG_DVB_USB_LME2510=m CONFIG_DVB_USB_MXL111SF=m CONFIG_DVB_USB_RTL28XXU=m CONFIG_DVB_USB_DVBSKY=m +CONFIG_DVB_USB_ZD1301=m CONFIG_DVB_TTUSB_BUDGET=m CONFIG_DVB_TTUSB_DEC=m CONFIG_SMS_USB_DRV=m @@ -4805,6 +4818,7 @@ CONFIG_VIDEO_ZORAN_AVS6EYES=m # Media capture/analog TV support # CONFIG_VIDEO_IVTV=m +# CONFIG_VIDEO_IVTV_DEPRECATED_IOCTLS is not set CONFIG_VIDEO_IVTV_ALSA=m CONFIG_VIDEO_FB_IVTV=m CONFIG_VIDEO_HEXIUM_GEMINI=m @@ -4836,7 +4850,6 @@ CONFIG_VIDEO_SAA7134_RC=y CONFIG_VIDEO_SAA7134_DVB=m CONFIG_VIDEO_SAA7134_GO7007=m CONFIG_VIDEO_SAA7164=m -CONFIG_VIDEO_COBALT=m # # Media digital TV PCI Adapters @@ -4899,7 +4912,6 @@ CONFIG_USB_MA901=m CONFIG_RADIO_TEA5764=m CONFIG_RADIO_SAA7706H=m CONFIG_RADIO_TEF6862=m -CONFIG_RADIO_TIMBERDALE=m CONFIG_RADIO_WL1273=m # @@ -4975,8 +4987,6 @@ CONFIG_VIDEO_SAA6588=m # # Video decoders # -CONFIG_VIDEO_ADV7604=m -CONFIG_VIDEO_ADV7842=m CONFIG_VIDEO_BT819=m CONFIG_VIDEO_BT856=m CONFIG_VIDEO_BT866=m @@ -5002,7 +5012,6 @@ CONFIG_VIDEO_SAA7127=m CONFIG_VIDEO_SAA7185=m CONFIG_VIDEO_ADV7170=m CONFIG_VIDEO_ADV7175=m -CONFIG_VIDEO_ADV7511=m # # Camera sensor devices @@ -5167,6 +5176,7 @@ CONFIG_DVB_RTL2832=m CONFIG_DVB_RTL2832_SDR=m CONFIG_DVB_SI2168=m CONFIG_DVB_AS102_FE=m +CONFIG_DVB_ZD1301_DEMOD=m CONFIG_DVB_GP8PSK_FE=m # @@ -5261,11 +5271,15 @@ CONFIG_VGA_SWITCHEROO=y CONFIG_DRM=m CONFIG_DRM_MIPI_DSI=y # CONFIG_DRM_DP_AUX_CHARDEV is not set +# CONFIG_DRM_DEBUG_MM_SELFTEST is not set CONFIG_DRM_KMS_HELPER=m CONFIG_DRM_KMS_FB_HELPER=y CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_LOAD_EDID_FIRMWARE=y CONFIG_DRM_TTM=m +CONFIG_DRM_GEM_CMA_HELPER=y +CONFIG_DRM_KMS_CMA_HELPER=y +CONFIG_DRM_VM=y # # I2C encoder or helper chips @@ -5300,13 +5314,13 @@ CONFIG_DRM_I915_USERPTR=y # # CONFIG_DRM_I915_WERROR is not set # CONFIG_DRM_I915_DEBUG is not set +# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set CONFIG_DRM_VGEM=m CONFIG_DRM_VMWGFX=m CONFIG_DRM_VMWGFX_FBCON=y CONFIG_DRM_GMA500=m CONFIG_DRM_GMA600=y CONFIG_DRM_GMA3600=y -CONFIG_DRM_MEDFIELD=y CONFIG_DRM_UDL=m CONFIG_DRM_AST=m CONFIG_DRM_MGAG200=m @@ -5326,7 +5340,11 @@ CONFIG_DRM_BRIDGE=y # CONFIG_DRM_ANALOGIX_ANX78XX=m CONFIG_DRM_HISI_HIBMC=m +CONFIG_DRM_TINYDRM=m +CONFIG_TINYDRM_MIPI_DBI=m +CONFIG_TINYDRM_MI0283QT=m # CONFIG_DRM_LEGACY is not set +# CONFIG_DRM_LIB_RANDOM is not set # # Frame buffer Devices @@ -5344,6 +5362,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_SYS_FILLRECT=m CONFIG_FB_SYS_COPYAREA=m CONFIG_FB_SYS_IMAGEBLIT=m +# CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA is not set CONFIG_FB_FOREIGN_ENDIAN=y CONFIG_FB_BOTH_ENDIAN=y # CONFIG_FB_BIG_ENDIAN is not set @@ -5463,7 +5482,6 @@ CONFIG_LCD_LMS501KF03=m CONFIG_LCD_HX8357=m CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_LM3533=m CONFIG_BACKLIGHT_CARILLO_RANCH=m CONFIG_BACKLIGHT_PWM=m CONFIG_BACKLIGHT_DA903X=m @@ -5483,8 +5501,8 @@ CONFIG_BACKLIGHT_LM3630A=m CONFIG_BACKLIGHT_LM3639=m CONFIG_BACKLIGHT_LP855X=m CONFIG_BACKLIGHT_LP8788=m +# CONFIG_BACKLIGHT_OT200 is not set CONFIG_BACKLIGHT_PANDORA=m -CONFIG_BACKLIGHT_SKY81452=m CONFIG_BACKLIGHT_TPS65217=m CONFIG_BACKLIGHT_AS3711=m CONFIG_BACKLIGHT_GPIO=m @@ -5761,10 +5779,8 @@ CONFIG_SND_SOC_IMG_PARALLEL_OUT=m CONFIG_SND_SOC_IMG_SPDIF_IN=m CONFIG_SND_SOC_IMG_SPDIF_OUT=m CONFIG_SND_SOC_IMG_PISTACHIO_INTERNAL_DAC=m -CONFIG_SND_MFLD_MACHINE=m -CONFIG_SND_SST_MFLD_PLATFORM=m +CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=m CONFIG_SND_SST_IPC=m -CONFIG_SND_SST_IPC_PCI=m CONFIG_SND_SST_IPC_ACPI=m CONFIG_SND_SOC_INTEL_SST=m CONFIG_SND_SOC_INTEL_SST_FIRMWARE=m @@ -5774,6 +5790,7 @@ CONFIG_SND_SOC_INTEL_HASWELL=m CONFIG_SND_SOC_INTEL_HASWELL_MACH=m CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m +CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH=m CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=m @@ -5822,6 +5839,8 @@ CONFIG_SND_SOC_DA7219=m CONFIG_SND_SOC_DMIC=m CONFIG_SND_SOC_HDMI_CODEC=m CONFIG_SND_SOC_ES8328=m +CONFIG_SND_SOC_ES8328_I2C=m +CONFIG_SND_SOC_ES8328_SPI=m CONFIG_SND_SOC_GTM601=m CONFIG_SND_SOC_HDAC_HDMI=m CONFIG_SND_SOC_INNO_RK3036=m @@ -5851,13 +5870,12 @@ CONFIG_SND_SOC_RT5640=m CONFIG_SND_SOC_RT5645=m CONFIG_SND_SOC_RT5651=m CONFIG_SND_SOC_RT5670=m -# CONFIG_SND_SOC_RT5677_SPI is not set +CONFIG_SND_SOC_RT5677=m +CONFIG_SND_SOC_RT5677_SPI=m CONFIG_SND_SOC_SGTL5000=m -CONFIG_SND_SOC_SI476X=m CONFIG_SND_SOC_SIGMADSP=m CONFIG_SND_SOC_SIGMADSP_I2C=m CONFIG_SND_SOC_SIRF_AUDIO_CODEC=m -CONFIG_SND_SOC_SN95031=m CONFIG_SND_SOC_SPDIF=m CONFIG_SND_SOC_SSM2602=m CONFIG_SND_SOC_SSM2602_SPI=m @@ -5898,11 +5916,14 @@ CONFIG_SND_SOC_WM8962=m CONFIG_SND_SOC_WM8974=m CONFIG_SND_SOC_WM8978=m CONFIG_SND_SOC_WM8985=m +CONFIG_SND_SOC_NAU8540=m CONFIG_SND_SOC_NAU8810=m CONFIG_SND_SOC_NAU8825=m CONFIG_SND_SOC_TPA6130A2=m CONFIG_SND_SIMPLE_CARD_UTILS=m CONFIG_SND_SIMPLE_CARD=m +CONFIG_SND_X86=y +CONFIG_HDMI_LPE_AUDIO=m # CONFIG_SOUND_PRIME is not set CONFIG_AC97_BUS=m @@ -6232,6 +6253,7 @@ CONFIG_USB_SERIAL_XSENS_MT=m CONFIG_USB_SERIAL_WISHBONE=m CONFIG_USB_SERIAL_SSU100=m CONFIG_USB_SERIAL_QT2=m +CONFIG_USB_SERIAL_UPD78F0730=m CONFIG_USB_SERIAL_DEBUG=m # @@ -6259,6 +6281,7 @@ CONFIG_USB_TEST=m CONFIG_USB_ISIGHTFW=m CONFIG_USB_YUREX=m CONFIG_USB_EZUSB_FX2=m +CONFIG_USB_HUB_USB251XB=m CONFIG_USB_HSIC_USB3503=m CONFIG_USB_HSIC_USB4604=m # CONFIG_USB_LINK_LAYER_TEST is not set @@ -6433,13 +6456,13 @@ CONFIG_MEMSTICK_REALTEK_USB=m CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_CLASS_FLASH=m +CONFIG_LEDS_BRIGHTNESS_HW_CHANGED=y # # LED drivers # CONFIG_LEDS_88PM860X=m CONFIG_LEDS_LM3530=m -CONFIG_LEDS_LM3533=m CONFIG_LEDS_LM3642=m CONFIG_LEDS_NET48XX=m CONFIG_LEDS_WRAP=m @@ -6624,7 +6647,6 @@ CONFIG_RTC_DRV_RV3029_HWMON=y # Platform RTC drivers # CONFIG_RTC_DRV_CMOS=y -CONFIG_RTC_DRV_VRTC=m CONFIG_RTC_DRV_DS1286=m CONFIG_RTC_DRV_DS1511=m CONFIG_RTC_DRV_DS1553=m @@ -6652,7 +6674,6 @@ CONFIG_RTC_DRV_V3020=m CONFIG_RTC_DRV_WM831X=m CONFIG_RTC_DRV_WM8350=m CONFIG_RTC_DRV_PCF50633=m -CONFIG_RTC_DRV_AB3100=m # # on-CPU RTC drivers @@ -6676,7 +6697,6 @@ CONFIG_DMA_VIRTUAL_CHANNELS=m CONFIG_DMA_ACPI=y CONFIG_INTEL_IDMA64=m CONFIG_PCH_DMA=m -CONFIG_TIMB_DMA=m CONFIG_QCOM_HIDMA_MGMT=m CONFIG_QCOM_HIDMA=m CONFIG_DW_DMAC_CORE=m @@ -7043,13 +7063,6 @@ CONFIG_AIM_V4L2=m CONFIG_HDM_DIM2=m CONFIG_HDM_I2C=m CONFIG_HDM_USB=m - -# -# Old ISDN4Linux (deprecated) -# -CONFIG_ISDN_DRV_ICN=m -CONFIG_ISDN_DRV_PCBIT=m -CONFIG_ISDN_DRV_ACT2000=m # CONFIG_KS7010 is not set # CONFIG_GREYBUS is not set CONFIG_X86_PLATFORM_DEVICES=y @@ -7102,11 +7115,6 @@ CONFIG_TOSHIBA_WMI=m CONFIG_ACPI_CMPC=m CONFIG_INTEL_HID_EVENT=m CONFIG_INTEL_VBTN=m -CONFIG_INTEL_SCU_IPC=y -CONFIG_INTEL_SCU_IPC_UTIL=m -CONFIG_GPIO_INTEL_PMIC=y -CONFIG_INTEL_MID_POWER_BUTTON=m -CONFIG_INTEL_MFLD_THERMAL=m CONFIG_INTEL_IPS=m CONFIG_INTEL_PMC_CORE=y CONFIG_IBM_RTL=m @@ -7124,6 +7132,8 @@ CONFIG_SURFACE_PRO3_BUTTON=m CONFIG_SURFACE_3_BUTTON=m CONFIG_INTEL_PUNIT_IPC=m CONFIG_MLX_CPLD_PLATFORM=m +CONFIG_SILEAD_DMI=y +CONFIG_PMC_ATOM=y CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_LAPTOP=m CONFIG_CHROMEOS_PSTORE=m @@ -7138,7 +7148,6 @@ CONFIG_COMMON_CLK=y # Common Clock Framework # CONFIG_COMMON_CLK_WM831X=m -CONFIG_COMMON_CLK_SCPI=m CONFIG_COMMON_CLK_SI5351=m CONFIG_COMMON_CLK_CDCE706=m CONFIG_COMMON_CLK_CS2000_CP=m @@ -7149,13 +7158,6 @@ CONFIG_COMMON_CLK_PALMAS=m CONFIG_COMMON_CLK_PWM=m # CONFIG_COMMON_CLK_PXA is not set # CONFIG_COMMON_CLK_PIC32 is not set -# CONFIG_COMMON_CLK_MT2701 is not set -# CONFIG_COMMON_CLK_MT2701_MMSYS is not set -# CONFIG_COMMON_CLK_MT2701_IMGSYS is not set -# CONFIG_COMMON_CLK_MT2701_VDECSYS is not set -# CONFIG_COMMON_CLK_MT2701_HIFSYS is not set -# CONFIG_COMMON_CLK_MT2701_ETHSYS is not set -# CONFIG_COMMON_CLK_MT2701_BDPSYS is not set # # Hardware Spinlock drivers @@ -7168,7 +7170,6 @@ CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_I8253_LOCK=y CONFIG_CLKBLD_I8253=y -CONFIG_DW_APB_TIMER=y # CONFIG_ATMEL_PIT is not set # CONFIG_SH_TIMER_CMT is not set # CONFIG_SH_TIMER_MTU2 is not set @@ -7208,6 +7209,8 @@ CONFIG_REMOTEPROC=m # # CONFIG_SUNXI_SRAM is not set CONFIG_SOC_TI=y +CONFIG_SOC_ZTE=y +CONFIG_ZX2967_PM_DOMAINS=y CONFIG_PM_DEVFREQ=y # @@ -7232,6 +7235,7 @@ CONFIG_EXTCON_ADC_JACK=m # CONFIG_EXTCON_ARIZONA is not set CONFIG_EXTCON_AXP288=m CONFIG_EXTCON_GPIO=m +CONFIG_EXTCON_INTEL_INT3496=m CONFIG_EXTCON_MAX14577=m CONFIG_EXTCON_MAX3355=m CONFIG_EXTCON_MAX77693=m @@ -7302,17 +7306,16 @@ CONFIG_AD7887=m CONFIG_AD7923=m CONFIG_AD799X=m CONFIG_AXP288_ADC=m -CONFIG_CC10001_ADC=m -CONFIG_DA9150_GPADC=m CONFIG_HI8435=m +CONFIG_HX711=m CONFIG_INA2XX_ADC=m CONFIG_LP8788_ADC=m CONFIG_LTC2485=m CONFIG_MAX1027=m +CONFIG_MAX11100=m CONFIG_MAX1363=m CONFIG_MCP320X=m CONFIG_MCP3422=m -CONFIG_MEN_Z188_ADC=m CONFIG_NAU7802=m CONFIG_PALMAS_GPADC=m CONFIG_QCOM_SPMI_IADC=m @@ -7324,7 +7327,9 @@ CONFIG_TI_ADC12138=m CONFIG_TI_ADC128S052=m CONFIG_TI_ADC161S626=m CONFIG_TI_ADS1015=m +CONFIG_TI_ADS7950=m CONFIG_TI_AM335X_ADC=m +CONFIG_TI_TLC4541=m CONFIG_TWL4030_MADC=m CONFIG_TWL6030_GPADC=m CONFIG_VIPERBOARD_ADC=m @@ -7464,6 +7469,9 @@ CONFIG_BMI160_SPI=m CONFIG_INV_MPU6050_IIO=m CONFIG_INV_MPU6050_I2C=m CONFIG_INV_MPU6050_SPI=m +CONFIG_IIO_ST_LSM6DSX=m +CONFIG_IIO_ST_LSM6DSX_I2C=m +CONFIG_IIO_ST_LSM6DSX_SPI=m CONFIG_IIO_ADIS_LIB=m CONFIG_IIO_ADIS_LIB_BUFFER=y @@ -7488,7 +7496,6 @@ CONFIG_HID_SENSOR_ALS=m CONFIG_HID_SENSOR_PROX=m CONFIG_JSA1212=m CONFIG_RPR0521=m -CONFIG_SENSORS_LM3533=m CONFIG_LTR501=m CONFIG_MAX44000=m CONFIG_OPT3001=m @@ -7540,6 +7547,7 @@ CONFIG_IIO_SYSFS_TRIGGER=m # Digital potentiometers # # CONFIG_DS1803 is not set +CONFIG_MAX5481=m # CONFIG_MAX5487 is not set # CONFIG_MCP4131 is not set # CONFIG_MCP4531 is not set @@ -7555,6 +7563,7 @@ CONFIG_LMP91000=m # CONFIG_ABP060MG=m # CONFIG_BMP280 is not set +CONFIG_IIO_CROS_EC_BARO=m # CONFIG_HID_SENSOR_PRESS is not set # CONFIG_HP03 is not set # CONFIG_MPL115_I2C is not set @@ -7573,10 +7582,11 @@ CONFIG_ABP060MG=m # CONFIG_AS3935 is not set # -# Proximity sensors +# Proximity and distance sensors # # CONFIG_LIDAR_LITE_V2 is not set # CONFIG_SX9500 is not set +CONFIG_SRF08=m # # Temperature sensors @@ -7584,6 +7594,7 @@ CONFIG_ABP060MG=m # CONFIG_MAXIM_THERMOCOUPLE is not set CONFIG_MLX90614=m CONFIG_TMP006=m +CONFIG_TMP007=m CONFIG_TSYS01=m CONFIG_TSYS02D=m CONFIG_NTB=m @@ -7654,6 +7665,8 @@ CONFIG_PHY_SAMSUNG_USB2=m # CONFIG_PHY_EXYNOS4210_USB2 is not set # CONFIG_PHY_EXYNOS4X12_USB2 is not set # CONFIG_PHY_EXYNOS5250_USB2 is not set +CONFIG_PHY_QCOM_USB_HS=m +CONFIG_PHY_QCOM_USB_HSIC=m CONFIG_PHY_TUSB1210=m CONFIG_POWERCAP=y CONFIG_INTEL_RAPL=m @@ -7697,11 +7710,14 @@ CONFIG_INTEL_TH_PTI=m # CONFIG_FPGA=m +# +# FSI support +# +CONFIG_FSI=m + # # Firmware Drivers # -CONFIG_ARM_SCPI_PROTOCOL=m -CONFIG_ARM_SCPI_POWER_DOMAIN=m CONFIG_EDD=y CONFIG_EDD_OFF=y CONFIG_FIRMWARE_MEMMAP=y @@ -7937,6 +7953,7 @@ CONFIG_ROMFS_FS=m # CONFIG_ROMFS_BACKED_BY_MTD is not set CONFIG_ROMFS_BACKED_BY_BOTH=y CONFIG_ROMFS_ON_BLOCK=y +CONFIG_ROMFS_ON_MTD=y CONFIG_PSTORE=y CONFIG_PSTORE_ZLIB_COMPRESS=y # CONFIG_PSTORE_LZO_COMPRESS is not set @@ -8135,6 +8152,7 @@ CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 +CONFIG_MAGIC_SYSRQ_SERIAL=y CONFIG_DEBUG_KERNEL=y # @@ -8144,6 +8162,7 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_PAGE_POISONING is not set # CONFIG_DEBUG_PAGE_REF is not set +# CONFIG_DEBUG_RODATA_TEST is not set # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set @@ -8152,7 +8171,6 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_VIRTUAL is not set # CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_MEMORY_NOTIFIER_ERROR_INJECT is not set # CONFIG_DEBUG_PER_CPU_MAPS is not set # CONFIG_DEBUG_HIGHMEM is not set # CONFIG_DEBUG_STACKOVERFLOW is not set @@ -8180,7 +8198,6 @@ CONFIG_SCHED_INFO=y CONFIG_SCHEDSTATS=y # CONFIG_SCHED_STACK_END_CHECK is not set # CONFIG_DEBUG_TIMEKEEPING is not set -CONFIG_TIMER_STATS=y # CONFIG_DEBUG_PREEMPT is not set # @@ -8196,6 +8213,7 @@ CONFIG_TIMER_STATS=y # CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set +# CONFIG_WW_MUTEX_SELFTEST is not set CONFIG_STACKTRACE=y # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y @@ -8250,8 +8268,8 @@ CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ALL_BRANCHES is not set CONFIG_STACK_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_KPROBE_EVENT=y -CONFIG_UPROBE_EVENT=y +CONFIG_KPROBE_EVENTS=y +CONFIG_UPROBE_EVENTS=y CONFIG_BPF_EVENTS=y CONFIG_PROBE_EVENTS=y CONFIG_DYNAMIC_FTRACE=y @@ -8274,6 +8292,7 @@ CONFIG_TRACING_EVENTS_GPIO=y # # CONFIG_LKDTM is not set # CONFIG_TEST_LIST_SORT is not set +# CONFIG_TEST_SORT is not set # CONFIG_KPROBES_SANITY_TEST is not set # CONFIG_BACKTRACE_SELF_TEST is not set CONFIG_RBTREE_TEST=m @@ -8289,6 +8308,7 @@ CONFIG_TEST_PRINTF=m # CONFIG_TEST_UUID is not set # CONFIG_TEST_RHASHTABLE is not set # CONFIG_TEST_HASH is not set +# CONFIG_TEST_PARMAN is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set # CONFIG_DMA_API_DEBUG is not set # CONFIG_TEST_LKM is not set @@ -8318,10 +8338,7 @@ CONFIG_EARLY_PRINTK=y # CONFIG_X86_PTDUMP_CORE is not set # CONFIG_X86_PTDUMP is not set # CONFIG_EFI_PGT_DUMP is not set -# CONFIG_DEBUG_RODATA_TEST is not set # CONFIG_DEBUG_WX is not set -CONFIG_DEBUG_SET_MODULE_RONX=y -# CONFIG_DEBUG_NX_TEST is not set CONFIG_DOUBLEFAULT=y # CONFIG_DEBUG_TLBFLUSH is not set # CONFIG_IOMMU_STRESS is not set @@ -8362,6 +8379,7 @@ CONFIG_INTEL_TXT=y CONFIG_LSM_MMAP_MIN_ADDR=65536 CONFIG_HARDENED_USERCOPY=y # CONFIG_HARDENED_USERCOPY_PAGESPAN is not set +# CONFIG_STATIC_USERMODEHELPER is not set CONFIG_SECURITY_SELINUX=y CONFIG_SECURITY_SELINUX_BOOTPARAM=y CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0 @@ -8383,6 +8401,7 @@ CONFIG_IMA_LSM_RULES=y # CONFIG_IMA_TEMPLATE is not set CONFIG_IMA_NG_TEMPLATE=y # CONFIG_IMA_SIG_TEMPLATE is not set +CONFIG_IMA_DEFAULT_TEMPLATE="ima-ng" CONFIG_IMA_DEFAULT_HASH_SHA1=y # CONFIG_IMA_DEFAULT_HASH_SHA256 is not set # CONFIG_IMA_DEFAULT_HASH_SHA512 is not set @@ -8441,6 +8460,7 @@ CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_ABLK_HELPER=m CONFIG_CRYPTO_SIMD=m CONFIG_CRYPTO_GLUE_HELPER_X86=m +CONFIG_CRYPTO_ENGINE=m # # Authenticated Encryption with Associated Data @@ -8499,6 +8519,7 @@ CONFIG_CRYPTO_WP512=m # Ciphers # CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_AES_TI=m CONFIG_CRYPTO_AES_586=m CONFIG_CRYPTO_AES_NI_INTEL=m CONFIG_CRYPTO_ANUBIS=m @@ -8575,7 +8596,6 @@ CONFIG_PKCS7_MESSAGE_PARSER=y # Certificates for signature checking # # CONFIG_SYSTEM_TRUSTED_KEYRING is not set -CONFIG_KVM_APIC_ARCHITECTURE=y CONFIG_KVM_MMIO=y CONFIG_KVM_ASYNC_PF=y CONFIG_KVM_VFIO=y @@ -8665,6 +8685,8 @@ CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y +# CONFIG_DMA_NOOP_OPS is not set +CONFIG_DMA_VIRT_OPS=y CONFIG_CHECK_SIGNATURE=y CONFIG_CPU_RMAP=y CONFIG_DQL=y @@ -8676,8 +8698,8 @@ CONFIG_CLZ_TAB=y CONFIG_CORDIC=m CONFIG_DDR=y CONFIG_IRQ_POLL=y -CONFIG_MPILIB=m -CONFIG_OID_REGISTRY=m +CONFIG_MPILIB=y +CONFIG_OID_REGISTRY=y CONFIG_UCS2_STRING=y CONFIG_FONT_SUPPORT=y # CONFIG_FONTS is not set @@ -8686,6 +8708,7 @@ CONFIG_FONT_8x16=y # CONFIG_SG_SPLIT is not set CONFIG_SG_POOL=y CONFIG_SBITMAP=y +CONFIG_PARMAN=m # # Hardening features diff --git a/kernel-nrj-desktop-i586.config b/kernel-nrj-desktop-i586.config index 02437c7..41c950d 100644 --- a/kernel-nrj-desktop-i586.config +++ b/kernel-nrj-desktop-i586.config @@ -143,3 +143,4 @@ CONFIG_NVME_TARGET_RDMA=m CONFIG_RDMA_RXE=m CONFIG_MLX5_INFINIBAND=m CONFIG_INFINIBAND_VMWARE_PVRDMA=m +CONFIG_INFINIBAND_BNXT_RE=m diff --git a/kernel-nrj-desktop-x86_64.config b/kernel-nrj-desktop-x86_64.config index 8a82697..3ddfb93 100644 --- a/kernel-nrj-desktop-x86_64.config +++ b/kernel-nrj-desktop-x86_64.config @@ -31,6 +31,7 @@ CONFIG_INFINIBAND_ISER=m CONFIG_INFINIBAND_ISERT=m CONFIG_INFINIBAND_RDMAVT=m # CONFIG_INFINIBAND_QEDR is not set +CONFIG_INFINIBAND_BNXT_RE=m CONFIG_RDS_RDMA=m CONFIG_TIPC_MEDIA_IB=y CONFIG_NET_9P_RDMA=m diff --git a/kernel-x86_64.config b/kernel-x86_64.config index 1c77224..618278e 100644 --- a/kernel-x86_64.config +++ b/kernel-x86_64.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.10.x-nrj-desktop Kernel Configuration +# Linux/x86 4.11.x-nrj-desktop Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y @@ -118,7 +118,7 @@ CONFIG_BUILD_BIN2C=y # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=18 CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 -CONFIG_NMI_LOG_BUF_SHIFT=13 +CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 CONFIG_NUMA_BALANCING=y CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y CONFIG_CGROUPS=y @@ -134,6 +134,7 @@ CONFIG_FAIR_GROUP_SCHED=y CONFIG_CFS_BANDWIDTH=y # CONFIG_RT_GROUP_SCHED is not set CONFIG_CGROUP_PIDS=y +# CONFIG_CGROUP_RDMA is not set CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_HUGETLB=y CONFIG_CPUSETS=y @@ -198,6 +199,7 @@ CONFIG_USERFAULTFD=y CONFIG_PCI_QUIRKS=y CONFIG_MEMBARRIER=y # CONFIG_EMBEDDED is not set +# CONFIG_PC104 is not set # # Kernel Performance Events And Counters @@ -206,6 +208,7 @@ CONFIG_PERF_EVENTS=y # CONFIG_DEBUG_PERF_USE_VMALLOC is not set CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLUB_DEBUG=y +# CONFIG_SLUB_MEMCG_SYSFS_ON is not set # CONFIG_COMPAT_BRK is not set # CONFIG_SLAB is not set CONFIG_SLUB=y @@ -236,10 +239,12 @@ CONFIG_CC_STACKPROTECTOR_NONE=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_ARCH_MMAP_RND_BITS=28 CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8 -CONFIG_ISA_BUS_API=y +# CONFIG_ISA_BUS_API is not set CONFIG_OLD_SIGSUSPEND3=y CONFIG_COMPAT_OLD_SIGACTION=y CONFIG_VMAP_STACK=y +CONFIG_STRICT_KERNEL_RWX=y +CONFIG_STRICT_MODULE_RWX=y # # GCOV-based kernel profiling @@ -258,6 +263,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y # CONFIG_MODULE_COMPRESS is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_BLOCK=y +CONFIG_BLK_SCSI_REQUEST=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_INTEGRITY=y @@ -267,6 +273,8 @@ CONFIG_BLK_DEV_THROTTLING=y CONFIG_BLK_WBT=y # CONFIG_BLK_WBT_SQ is not set CONFIG_BLK_WBT_MQ=y +CONFIG_BLK_DEBUG_FS=y +# CONFIG_BLK_SED_OPAL is not set # # Partition Types @@ -294,6 +302,7 @@ CONFIG_SYSV68_PARTITION=y # CONFIG_CMDLINE_PARTITION is not set CONFIG_BLOCK_COMPAT=y CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_MQ_VIRTIO=y # # IO Schedulers @@ -309,6 +318,7 @@ CONFIG_BFQ_GROUP_IOSCHED=y CONFIG_DEFAULT_BFQ=y # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="bfq" +CONFIG_MQ_IOSCHED_DEADLINE=y CONFIG_PREEMPT_NOTIFIERS=y CONFIG_PADATA=y CONFIG_ASN1=y @@ -591,6 +601,7 @@ CONFIG_ACPI_APEI_MEMORY_FAILURE=y CONFIG_ACPI_APEI_EINJ=m # CONFIG_ACPI_APEI_ERST_DEBUG is not set CONFIG_DPTF_POWER=m +CONFIG_ACPI_WATCHDOG=y CONFIG_ACPI_EXTLOG=m # CONFIG_PMIC_OPREGION is not set CONFIG_ACPI_CONFIGFS=m @@ -659,6 +670,7 @@ CONFIG_PCIEASPM=y # CONFIG_PCIEASPM_DEBUG is not set CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set +# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set # CONFIG_PCIEASPM_PERFORMANCE is not set CONFIG_PCIE_PME=y CONFIG_PCIE_DPC=y @@ -744,12 +756,12 @@ CONFIG_COREDUMP=y CONFIG_IA32_EMULATION=y # CONFIG_IA32_AOUT is not set CONFIG_X86_X32=y +CONFIG_COMPAT_32=y CONFIG_COMPAT=y CONFIG_COMPAT_FOR_U64_ALIGNMENT=y CONFIG_SYSVIPC_COMPAT=y CONFIG_KEYS_COMPAT=y CONFIG_X86_DEV_DMA_OPS=y -CONFIG_PMC_ATOM=y CONFIG_NET=y CONFIG_COMPAT_NETLINK_MESSAGES=y CONFIG_NET_INGRESS=y @@ -763,6 +775,7 @@ CONFIG_PACKET_DIAG=m CONFIG_UNIX=y CONFIG_UNIX_DIAG=m CONFIG_XFRM=y +CONFIG_XFRM_OFFLOAD=y CONFIG_XFRM_ALGO=m CONFIG_XFRM_USER=m # CONFIG_XFRM_SUB_POLICY is not set @@ -771,6 +784,8 @@ CONFIG_XFRM_USER=m CONFIG_XFRM_IPCOMP=m CONFIG_NET_KEY=m # CONFIG_NET_KEY_MIGRATE is not set +CONFIG_SMC=m +CONFIG_SMC_DIAG=m CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y @@ -796,6 +811,7 @@ CONFIG_NET_FOU=m CONFIG_NET_FOU_IP_TUNNELS=y CONFIG_INET_AH=m CONFIG_INET_ESP=m +CONFIG_INET_ESP_OFFLOAD=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m @@ -834,6 +850,7 @@ CONFIG_IPV6_ROUTE_INFO=y # CONFIG_IPV6_OPTIMISTIC_DAD is not set CONFIG_INET6_AH=m CONFIG_INET6_ESP=m +CONFIG_INET6_ESP_OFFLOAD=m CONFIG_INET6_IPCOMP=m CONFIG_IPV6_MIP6=m CONFIG_IPV6_ILA=m @@ -928,6 +945,7 @@ CONFIG_NFT_NUMGEN=m CONFIG_NFT_CT=m CONFIG_NFT_SET_RBTREE=m CONFIG_NFT_SET_HASH=m +CONFIG_NFT_SET_BITMAP=m CONFIG_NFT_COUNTER=m CONFIG_NFT_LOG=m CONFIG_NFT_LIMIT=m @@ -1363,6 +1381,7 @@ CONFIG_NET_ACT_POLICE=m CONFIG_NET_ACT_GACT=m CONFIG_GACT_PROB=y CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_SAMPLE=m CONFIG_NET_ACT_IPT=m CONFIG_NET_ACT_NAT=m CONFIG_NET_ACT_PEDIT=m @@ -1690,9 +1709,12 @@ CONFIG_NFC_NXP_NCI_I2C=m CONFIG_NFC_S3FWRN5=m CONFIG_NFC_S3FWRN5_I2C=m CONFIG_NFC_ST95HF=m +CONFIG_PSAMPLE=m +CONFIG_NET_IFE=m CONFIG_LWTUNNEL=y CONFIG_LWTUNNEL_BPF=y CONFIG_DST_CACHE=y +CONFIG_GRO_CELLS=y CONFIG_NET_DEVLINK=m CONFIG_MAY_USE_DEVLINK=m @@ -1848,7 +1870,6 @@ CONFIG_MTD_NAND_DOCG4=m CONFIG_MTD_NAND_CAFE=m CONFIG_MTD_NAND_NANDSIM=m CONFIG_MTD_NAND_PLATFORM=m -CONFIG_MTD_NAND_OXNAS=m CONFIG_MTD_NAND_HISI504=m CONFIG_MTD_NAND_MTK=m CONFIG_MTD_ONENAND=m @@ -1865,6 +1886,8 @@ CONFIG_MTD_QINFO_PROBE=m CONFIG_MTD_SPI_NOR=m CONFIG_MTD_MT81xx_NOR=m CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y +CONFIG_SPI_INTEL_SPI=m +CONFIG_SPI_INTEL_SPI_PLATFORM=m CONFIG_MTD_UBI=m CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_LIMIT=20 @@ -1946,6 +1969,7 @@ CONFIG_ATA_OVER_ETH=m CONFIG_XEN_BLKDEV_FRONTEND=y CONFIG_XEN_BLKDEV_BACKEND=m CONFIG_VIRTIO_BLK=m +CONFIG_VIRTIO_BLK_SCSI=y # CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_RBD=m CONFIG_BLK_DEV_RSXX=m @@ -2002,6 +2026,7 @@ CONFIG_EEPROM_LEGACY=m CONFIG_EEPROM_MAX6875=m CONFIG_EEPROM_93CX6=m CONFIG_EEPROM_93XX46=m +CONFIG_EEPROM_IDT_89HPESX=m CONFIG_CB710_CORE=m # CONFIG_CB710_DEBUG is not set CONFIG_CB710_DEBUG_ASSUMPTIONS=y @@ -2200,6 +2225,7 @@ CONFIG_TCM_QLA2XXX=m # CONFIG_TCM_QLA2XXX_DEBUG is not set CONFIG_SCSI_QLA_ISCSI=m CONFIG_QEDI=m +CONFIG_QEDF=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_LPFC_DEBUG_FS is not set CONFIG_SCSI_DC395x=m @@ -2403,6 +2429,7 @@ CONFIG_NET_TEAM_MODE_LOADBALANCE=m CONFIG_MACVLAN=m CONFIG_MACVTAP=m CONFIG_IPVLAN=m +CONFIG_IPVTAP=m CONFIG_VXLAN=m CONFIG_GENEVE=m CONFIG_GTP=m @@ -2416,6 +2443,7 @@ CONFIG_RIONET=m CONFIG_RIONET_TX_SIZE=128 CONFIG_RIONET_RX_SIZE=128 CONFIG_TUN=y +CONFIG_TAP=m # CONFIG_TUN_VNET_CROSS_LE is not set CONFIG_VETH=m CONFIG_VIRTIO_NET=m @@ -2471,6 +2499,8 @@ CONFIG_PCMCIA_NMCLAN=m CONFIG_AMD_XGBE=m CONFIG_AMD_XGBE_DCB=y CONFIG_AMD_XGBE_HAVE_ECC=y +CONFIG_NET_VENDOR_AQUANTIA=y +CONFIG_AQTION=m CONFIG_NET_VENDOR_ARC=y CONFIG_NET_VENDOR_ATHEROS=y CONFIG_ATL2=m @@ -2611,8 +2641,8 @@ CONFIG_NET_VENDOR_NATSEMI=y CONFIG_NATSEMI=m CONFIG_NS83820=m CONFIG_NET_VENDOR_NETRONOME=y -CONFIG_NFP_NETVF=m -# CONFIG_NFP_NET_DEBUG is not set +CONFIG_NFP=m +# CONFIG_NFP_DEBUG is not set CONFIG_NET_VENDOR_8390=y CONFIG_PCMCIA_AXNET=m CONFIG_NE2K_PCI=m @@ -2636,8 +2666,8 @@ CONFIG_QED=m CONFIG_QED_LL2=y CONFIG_QED_SRIOV=y CONFIG_QEDE=m -# CONFIG_QEDE_VXLAN is not set -# CONFIG_QEDE_GENEVE is not set +CONFIG_QED_ISCSI=y +CONFIG_QED_FCOE=y CONFIG_NET_VENDOR_QUALCOMM=y CONFIG_QCOM_EMAC=m CONFIG_NET_VENDOR_REALTEK=y @@ -2686,7 +2716,6 @@ CONFIG_HAPPYMEAL=m CONFIG_SUNGEM=m CONFIG_CASSINI=m CONFIG_NIU=m -CONFIG_NET_VENDOR_SYNOPSYS=y CONFIG_NET_VENDOR_TEHUTI=y CONFIG_TEHUTI=m CONFIG_NET_VENDOR_TI=y @@ -2843,7 +2872,6 @@ CONFIG_ATH9K_HTC=m CONFIG_ATH9K_HWRNG=y CONFIG_CARL9170=m CONFIG_CARL9170_LEDS=y -# CONFIG_CARL9170_DEBUGFS is not set CONFIG_CARL9170_WPC=y CONFIG_CARL9170_HWRNG=y CONFIG_ATH6KL=m @@ -2956,7 +2984,6 @@ CONFIG_HERMES_CACHE_FW_ON_INIT=y CONFIG_PLX_HERMES=m CONFIG_TMD_HERMES=m CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m CONFIG_PCMCIA_HERMES=m CONFIG_PCMCIA_SPECTRUM=m CONFIG_ORINOCO_USB=m @@ -3013,7 +3040,6 @@ CONFIG_RT2X00_LIB=m CONFIG_RT2X00_LIB_FIRMWARE=y CONFIG_RT2X00_LIB_CRYPTO=y CONFIG_RT2X00_LIB_LEDS=y -# CONFIG_RT2X00_LIB_DEBUGFS is not set # CONFIG_RT2X00_DEBUG is not set CONFIG_WLAN_VENDOR_REALTEK=y CONFIG_RTL8180=m @@ -3171,7 +3197,7 @@ CONFIG_ISDN_CAPI_CAPIDRV=m # CONFIG_ISDN_DRV_GIGASET=m # CONFIG_GIGASET_CAPI is not set -# CONFIG_GIGASET_I4L is not set +CONFIG_GIGASET_I4L=y # CONFIG_GIGASET_DUMMYLL is not set CONFIG_GIGASET_BASE=m CONFIG_GIGASET_M105=m @@ -3199,7 +3225,6 @@ CONFIG_MISDN_ISAR=m CONFIG_ISDN_HDLC=m CONFIG_NVM=y # CONFIG_NVM_DEBUG is not set -CONFIG_NVM_GENNVM=m CONFIG_NVM_RRPC=m # @@ -3250,6 +3275,7 @@ CONFIG_KEYBOARD_OPENCORES=m CONFIG_KEYBOARD_SAMSUNG=m CONFIG_KEYBOARD_STOWAWAY=m CONFIG_KEYBOARD_SUNKBD=m +CONFIG_KEYBOARD_TM2_TOUCHKEY=m CONFIG_KEYBOARD_TWL4030=m CONFIG_KEYBOARD_XTKBD=m CONFIG_KEYBOARD_CROS_EC=m @@ -3406,6 +3432,7 @@ CONFIG_TOUCHSCREEN_SUR40=m CONFIG_TOUCHSCREEN_SURFACE3_SPI=m CONFIG_TOUCHSCREEN_SX8654=m CONFIG_TOUCHSCREEN_TPS6507X=m +CONFIG_TOUCHSCREEN_ZET6223=m CONFIG_TOUCHSCREEN_ZFORCE=m CONFIG_TOUCHSCREEN_ROHM_BU21023=m CONFIG_INPUT_MISC=y @@ -3423,7 +3450,6 @@ CONFIG_INPUT_MAX8925_ONKEY=m CONFIG_INPUT_MAX8997_HAPTIC=m CONFIG_INPUT_MC13783_PWRBUTTON=m CONFIG_INPUT_MMA8450=m -CONFIG_INPUT_MPU3050=m CONFIG_INPUT_APANEL=m CONFIG_INPUT_GP2A=m CONFIG_INPUT_GPIO_BEEPER=m @@ -3543,6 +3569,7 @@ CONFIG_SERIAL_8250_FINTEK=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_EXAR=y CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=48 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 @@ -3567,6 +3594,7 @@ CONFIG_SERIAL_MAX310X=y CONFIG_SERIAL_UARTLITE=m CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_CONSOLE_POLL=y CONFIG_SERIAL_JSM=m CONFIG_SERIAL_SCCNXP=m CONFIG_SERIAL_SC16IS7XX_CORE=m @@ -3583,7 +3611,7 @@ CONFIG_SERIAL_ARC_NR_PORTS=1 CONFIG_SERIAL_RP2=m CONFIG_SERIAL_RP2_NR_UARTS=32 CONFIG_SERIAL_FSL_LPUART=m -CONFIG_SERIAL_MEN_Z135=m +CONFIG_SERIAL_DEV_BUS=m # CONFIG_TTY_PRINTK is not set CONFIG_PRINTER=m # CONFIG_LP_CONSOLE is not set @@ -3814,6 +3842,7 @@ CONFIG_PTP_1588_CLOCK=m # # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # +CONFIG_PTP_1588_CLOCK_KVM=m CONFIG_PINCTRL=y # @@ -3829,6 +3858,7 @@ CONFIG_PINCTRL_BAYTRAIL=y CONFIG_PINCTRL_CHERRYVIEW=y CONFIG_PINCTRL_INTEL=m CONFIG_PINCTRL_BROXTON=m +CONFIG_PINCTRL_GEMINILAKE=m CONFIG_PINCTRL_SUNRISEPOINT=m CONFIG_GPIOLIB=y CONFIG_GPIO_ACPI=y @@ -3844,25 +3874,20 @@ CONFIG_GPIO_MAX730X=m CONFIG_GPIO_AMDPT=m CONFIG_GPIO_AXP209=m CONFIG_GPIO_DWAPB=m +CONFIG_GPIO_EXAR=m CONFIG_GPIO_GENERIC_PLATFORM=m CONFIG_GPIO_ICH=m CONFIG_GPIO_LYNXPOINT=y -CONFIG_GPIO_MENZ127=m CONFIG_GPIO_MOCKUP=m CONFIG_GPIO_VX855=m # # Port-mapped I/O GPIO drivers # -CONFIG_GPIO_104_DIO_48E=m -CONFIG_GPIO_104_IDIO_16=m -CONFIG_GPIO_104_IDI_48=m CONFIG_GPIO_F7188X=m -CONFIG_GPIO_GPIO_MM=m CONFIG_GPIO_IT87=m CONFIG_GPIO_SCH=m CONFIG_GPIO_SCH311X=m -CONFIG_GPIO_WS16C48=m # # I2C GPIO expanders @@ -3908,6 +3933,7 @@ CONFIG_GPIO_WM8994=m # CONFIG_GPIO_AMD8111=m CONFIG_GPIO_ML_IOH=m +CONFIG_GPIO_PCI_IDIO_16=m CONFIG_GPIO_RDC321X=m # @@ -3942,6 +3968,7 @@ CONFIG_W1_MASTER_GPIO=m # CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2405=m CONFIG_W1_SLAVE_DS2408=m CONFIG_W1_SLAVE_DS2408_READBACK=y CONFIG_W1_SLAVE_DS2413=m @@ -3973,6 +4000,7 @@ CONFIG_BATTERY_DS2780=m CONFIG_BATTERY_DS2781=m CONFIG_BATTERY_DS2782=m CONFIG_BATTERY_SBS=m +CONFIG_CHARGER_SBS=m CONFIG_BATTERY_BQ27XXX=m CONFIG_BATTERY_BQ27XXX_I2C=m CONFIG_BATTERY_DA9030=m @@ -3993,11 +4021,8 @@ CONFIG_CHARGER_TWL4030=m CONFIG_CHARGER_LP8727=m CONFIG_CHARGER_LP8788=m CONFIG_CHARGER_GPIO=m -CONFIG_CHARGER_MANAGER=y CONFIG_CHARGER_MAX14577=m CONFIG_CHARGER_MAX77693=m -CONFIG_CHARGER_MAX8997=m -CONFIG_CHARGER_MAX8998=m CONFIG_CHARGER_BQ2415X=m CONFIG_CHARGER_BQ24190=m CONFIG_CHARGER_BQ24257=m @@ -4040,7 +4065,6 @@ CONFIG_SENSORS_K8TEMP=m CONFIG_SENSORS_K10TEMP=m CONFIG_SENSORS_FAM15H_POWER=m CONFIG_SENSORS_APPLESMC=m -CONFIG_SENSORS_ARM_SCPI=m CONFIG_SENSORS_ASB100=m CONFIG_SENSORS_ATXP1=m CONFIG_SENSORS_DS620=m @@ -4122,7 +4146,6 @@ CONFIG_SENSORS_PMBUS=m CONFIG_SENSORS_ADM1275=m CONFIG_SENSORS_LM25066=m CONFIG_SENSORS_LTC2978=m -# CONFIG_SENSORS_LTC2978_REGULATOR is not set CONFIG_SENSORS_LTC3815=m CONFIG_SENSORS_MAX16064=m CONFIG_SENSORS_MAX20751=m @@ -4147,6 +4170,7 @@ CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_SCH56XX_COMMON=m CONFIG_SENSORS_SCH5627=m CONFIG_SENSORS_SCH5636=m +CONFIG_SENSORS_STTS751=m CONFIG_SENSORS_SMM665=m CONFIG_SENSORS_ADC128D818=m CONFIG_SENSORS_ADS1015=m @@ -4223,6 +4247,7 @@ CONFIG_WATCHDOG_SYSFS=y # Watchdog Device Drivers # CONFIG_SOFT_WATCHDOG=m +CONFIG_SOFT_WATCHDOG_PRETIMEOUT=y CONFIG_DA9052_WATCHDOG=m CONFIG_DA9055_WATCHDOG=m CONFIG_DA9063_WATCHDOG=m @@ -4242,7 +4267,6 @@ CONFIG_ACQUIRE_WDT=m CONFIG_ADVANTECH_WDT=m CONFIG_ALIM1535_WDT=m CONFIG_ALIM7101_WDT=m -CONFIG_EBC_C384_WDT=m CONFIG_F71808E_WDT=m CONFIG_SP5100_TCO=m CONFIG_SBC_FITPC2_WATCHDOG=m @@ -4274,6 +4298,7 @@ CONFIG_MACHZ_WDT=m CONFIG_SBC_EPX_C3_WATCHDOG=m CONFIG_INTEL_MEI_WDT=m CONFIG_NI903X_WDT=m +CONFIG_NIC7018_WDT=m CONFIG_MEN_A21_WDT=m CONFIG_XEN_WDT=m @@ -4512,6 +4537,7 @@ CONFIG_IR_ITE_CIR=m CONFIG_IR_FINTEK=m CONFIG_IR_NUVOTON=m CONFIG_IR_REDRAT3=m +CONFIG_IR_SPI=m CONFIG_IR_STREAMZAP=m CONFIG_IR_WINBOND_CIR=m CONFIG_IR_IGORPLUGUSB=m @@ -4597,7 +4623,6 @@ CONFIG_VIDEO_PVRUSB2_DVB=y CONFIG_VIDEO_HDPVR=m CONFIG_VIDEO_USBVISION=m CONFIG_VIDEO_STK1160_COMMON=m -CONFIG_VIDEO_STK1160_AC97=y CONFIG_VIDEO_STK1160=m CONFIG_VIDEO_GO7007=m CONFIG_VIDEO_GO7007_USB=m @@ -4662,6 +4687,7 @@ CONFIG_DVB_USB_LME2510=m CONFIG_DVB_USB_MXL111SF=m CONFIG_DVB_USB_RTL28XXU=m CONFIG_DVB_USB_DVBSKY=m +CONFIG_DVB_USB_ZD1301=m CONFIG_DVB_TTUSB_BUDGET=m CONFIG_DVB_TTUSB_DEC=m CONFIG_SMS_USB_DRV=m @@ -4705,6 +4731,7 @@ CONFIG_VIDEO_TW686X=m # Media capture/analog TV support # CONFIG_VIDEO_IVTV=m +# CONFIG_VIDEO_IVTV_DEPRECATED_IOCTLS is not set CONFIG_VIDEO_IVTV_ALSA=m CONFIG_VIDEO_FB_IVTV=m CONFIG_VIDEO_HEXIUM_GEMINI=m @@ -4736,7 +4763,6 @@ CONFIG_VIDEO_SAA7134_RC=y CONFIG_VIDEO_SAA7134_DVB=m CONFIG_VIDEO_SAA7134_GO7007=m CONFIG_VIDEO_SAA7164=m -CONFIG_VIDEO_COBALT=m # # Media digital TV PCI Adapters @@ -4860,19 +4886,11 @@ CONFIG_VIDEO_SAA6588=m # # Video decoders # -CONFIG_VIDEO_ADV7604=m -CONFIG_VIDEO_ADV7842=m -CONFIG_VIDEO_BT819=m -CONFIG_VIDEO_BT856=m -CONFIG_VIDEO_BT866=m -CONFIG_VIDEO_KS0127=m -CONFIG_VIDEO_SAA7110=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_TVP5150=m CONFIG_VIDEO_TW2804=m CONFIG_VIDEO_TW9903=m CONFIG_VIDEO_TW9906=m -CONFIG_VIDEO_VPX3220=m # # Video and audio decoders @@ -4884,10 +4902,6 @@ CONFIG_VIDEO_CX25840=m # Video encoders # CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_SAA7185=m -CONFIG_VIDEO_ADV7170=m -CONFIG_VIDEO_ADV7175=m -CONFIG_VIDEO_ADV7511=m # # Camera sensor devices @@ -5052,6 +5066,7 @@ CONFIG_DVB_RTL2832=m CONFIG_DVB_RTL2832_SDR=m CONFIG_DVB_SI2168=m CONFIG_DVB_AS102_FE=m +CONFIG_DVB_ZD1301_DEMOD=m CONFIG_DVB_GP8PSK_FE=m # @@ -5140,11 +5155,15 @@ CONFIG_VGA_SWITCHEROO=y CONFIG_DRM=m CONFIG_DRM_MIPI_DSI=y # CONFIG_DRM_DP_AUX_CHARDEV is not set +# CONFIG_DRM_DEBUG_MM_SELFTEST is not set CONFIG_DRM_KMS_HELPER=m CONFIG_DRM_KMS_FB_HELPER=y CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_LOAD_EDID_FIRMWARE=y CONFIG_DRM_TTM=m +CONFIG_DRM_GEM_CMA_HELPER=y +CONFIG_DRM_KMS_CMA_HELPER=y +CONFIG_DRM_VM=y # # I2C encoder or helper chips @@ -5180,6 +5199,7 @@ CONFIG_DRM_I915_USERPTR=y # # CONFIG_DRM_I915_WERROR is not set # CONFIG_DRM_I915_DEBUG is not set +# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set CONFIG_DRM_VGEM=m CONFIG_DRM_VMWGFX=m CONFIG_DRM_VMWGFX_FBCON=y @@ -5206,7 +5226,11 @@ CONFIG_DRM_BRIDGE=y CONFIG_DRM_ANALOGIX_ANX78XX=m CONFIG_HSA_AMD=m CONFIG_DRM_HISI_HIBMC=m +CONFIG_DRM_TINYDRM=m +CONFIG_TINYDRM_MIPI_DBI=m +CONFIG_TINYDRM_MI0283QT=m # CONFIG_DRM_LEGACY is not set +# CONFIG_DRM_LIB_RANDOM is not set # # Frame buffer Devices @@ -5224,13 +5248,13 @@ CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_SYS_FILLRECT=y CONFIG_FB_SYS_COPYAREA=y CONFIG_FB_SYS_IMAGEBLIT=y +# CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA is not set CONFIG_FB_FOREIGN_ENDIAN=y CONFIG_FB_BOTH_ENDIAN=y # CONFIG_FB_BIG_ENDIAN is not set # CONFIG_FB_LITTLE_ENDIAN is not set CONFIG_FB_SYS_FOPS=y CONFIG_FB_DEFERRED_IO=y -CONFIG_FB_HECUBA=m CONFIG_FB_SVGALIB=m # CONFIG_FB_MACMODES is not set CONFIG_FB_BACKLIGHT=y @@ -5599,7 +5623,7 @@ CONFIG_SND_SOC_IMG_PARALLEL_OUT=m CONFIG_SND_SOC_IMG_SPDIF_IN=m CONFIG_SND_SOC_IMG_SPDIF_OUT=m CONFIG_SND_SOC_IMG_PISTACHIO_INTERNAL_DAC=m -CONFIG_SND_SST_MFLD_PLATFORM=m +CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=m CONFIG_SND_SST_IPC=m CONFIG_SND_SST_IPC_ACPI=m CONFIG_SND_SOC_INTEL_SST=m @@ -5659,6 +5683,8 @@ CONFIG_SND_SOC_DA7219=m CONFIG_SND_SOC_DMIC=m CONFIG_SND_SOC_HDMI_CODEC=m CONFIG_SND_SOC_ES8328=m +CONFIG_SND_SOC_ES8328_I2C=m +CONFIG_SND_SOC_ES8328_SPI=m CONFIG_SND_SOC_GTM601=m CONFIG_SND_SOC_HDAC_HDMI=m CONFIG_SND_SOC_INNO_RK3036=m @@ -5688,9 +5714,9 @@ CONFIG_SND_SOC_RT5640=m CONFIG_SND_SOC_RT5645=m CONFIG_SND_SOC_RT5651=m CONFIG_SND_SOC_RT5670=m -# CONFIG_SND_SOC_RT5677_SPI is not set +CONFIG_SND_SOC_RT5677=m +CONFIG_SND_SOC_RT5677_SPI=m CONFIG_SND_SOC_SGTL5000=m -CONFIG_SND_SOC_SI476X=m CONFIG_SND_SOC_SIGMADSP=m CONFIG_SND_SOC_SIGMADSP_I2C=m CONFIG_SND_SOC_SIRF_AUDIO_CODEC=m @@ -5734,11 +5760,14 @@ CONFIG_SND_SOC_WM8962=m CONFIG_SND_SOC_WM8974=m CONFIG_SND_SOC_WM8978=m CONFIG_SND_SOC_WM8985=m +CONFIG_SND_SOC_NAU8540=m CONFIG_SND_SOC_NAU8810=m CONFIG_SND_SOC_NAU8825=m CONFIG_SND_SOC_TPA6130A2=m CONFIG_SND_SIMPLE_CARD_UTILS=m CONFIG_SND_SIMPLE_CARD=m +CONFIG_SND_X86=y +CONFIG_HDMI_LPE_AUDIO=m # CONFIG_SOUND_PRIME is not set CONFIG_AC97_BUS=m @@ -5993,12 +6022,12 @@ CONFIG_USB_DWC3_DUAL_ROLE=y CONFIG_USB_DWC3_PCI=m CONFIG_USB_DWC2=m CONFIG_USB_DWC2_HOST=y -# CONFIG_USB_DWC2_PERIPHERAL is not set -# CONFIG_USB_DWC2_DUAL_ROLE is not set # # Gadget/Dual-role mode requires USB Gadget support to be enabled # +# CONFIG_USB_DWC2_PERIPHERAL is not set +# CONFIG_USB_DWC2_DUAL_ROLE is not set CONFIG_USB_DWC2_PCI=m # CONFIG_USB_DWC2_DEBUG is not set # CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set @@ -6075,6 +6104,7 @@ CONFIG_USB_SERIAL_XSENS_MT=m CONFIG_USB_SERIAL_WISHBONE=m CONFIG_USB_SERIAL_SSU100=m CONFIG_USB_SERIAL_QT2=m +CONFIG_USB_SERIAL_UPD78F0730=m CONFIG_USB_SERIAL_DEBUG=m # @@ -6102,6 +6132,7 @@ CONFIG_USB_TEST=m CONFIG_USB_ISIGHTFW=m CONFIG_USB_YUREX=m CONFIG_USB_EZUSB_FX2=m +CONFIG_USB_HUB_USB251XB=m CONFIG_USB_HSIC_USB3503=m CONFIG_USB_HSIC_USB4604=m # CONFIG_USB_LINK_LAYER_TEST is not set @@ -6277,6 +6308,7 @@ CONFIG_MEMSTICK_REALTEK_USB=m CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_CLASS_FLASH=m +CONFIG_LEDS_BRIGHTNESS_HW_CHANGED=y # # LED drivers @@ -6369,6 +6401,7 @@ CONFIG_EDAC_I5100=m CONFIG_EDAC_I7300=m CONFIG_EDAC_SBRIDGE=m CONFIG_EDAC_SKX=m +CONFIG_EDAC_PND2=m CONFIG_RTC_LIB=y CONFIG_RTC_MC146818_LIB=y CONFIG_RTC_CLASS=y @@ -6517,9 +6550,9 @@ CONFIG_INTEL_IOATDMA=m CONFIG_INTEL_MIC_X100_DMA=m CONFIG_QCOM_HIDMA_MGMT=m CONFIG_QCOM_HIDMA=m -CONFIG_DW_DMAC_CORE=m +CONFIG_DW_DMAC_CORE=y CONFIG_DW_DMAC=m -CONFIG_DW_DMAC_PCI=m +CONFIG_DW_DMAC_PCI=y CONFIG_HSU_DMA=m # @@ -6868,9 +6901,6 @@ CONFIG_STAGING_MEDIA=y CONFIG_I2C_BCM2048=m CONFIG_DVB_CXD2099=m CONFIG_LIRC_STAGING=y -CONFIG_LIRC_BT829=m -CONFIG_LIRC_IMON=m -CONFIG_LIRC_PARALLEL=m CONFIG_LIRC_SASEM=m CONFIG_LIRC_SIR=m CONFIG_LIRC_ZILOG=m @@ -6912,10 +6942,6 @@ CONFIG_AIM_V4L2=m CONFIG_HDM_DIM2=m CONFIG_HDM_I2C=m CONFIG_HDM_USB=m - -# -# Old ISDN4Linux (deprecated) -# # CONFIG_KS7010 is not set # CONFIG_GREYBUS is not set CONFIG_X86_PLATFORM_DEVICES=y @@ -6986,6 +7012,9 @@ CONFIG_INTEL_PUNIT_IPC=m CONFIG_INTEL_TELEMETRY=m CONFIG_MLX_PLATFORM=m CONFIG_MLX_CPLD_PLATFORM=m +CONFIG_INTEL_TURBO_MAX_3=y +CONFIG_SILEAD_DMI=y +CONFIG_PMC_ATOM=y CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_LAPTOP=m CONFIG_CHROMEOS_PSTORE=m @@ -7001,7 +7030,6 @@ CONFIG_COMMON_CLK=y # Common Clock Framework # CONFIG_COMMON_CLK_WM831X=m -CONFIG_COMMON_CLK_SCPI=m CONFIG_COMMON_CLK_SI5351=m CONFIG_COMMON_CLK_CDCE706=m CONFIG_COMMON_CLK_CS2000_CP=m @@ -7012,13 +7040,6 @@ CONFIG_COMMON_CLK_PALMAS=m CONFIG_COMMON_CLK_PWM=m # CONFIG_COMMON_CLK_PXA is not set # CONFIG_COMMON_CLK_PIC32 is not set -# CONFIG_COMMON_CLK_MT2701 is not set -# CONFIG_COMMON_CLK_MT2701_MMSYS is not set -# CONFIG_COMMON_CLK_MT2701_IMGSYS is not set -# CONFIG_COMMON_CLK_MT2701_VDECSYS is not set -# CONFIG_COMMON_CLK_MT2701_HIFSYS is not set -# CONFIG_COMMON_CLK_MT2701_ETHSYS is not set -# CONFIG_COMMON_CLK_MT2701_BDPSYS is not set # # Hardware Spinlock drivers @@ -7072,6 +7093,8 @@ CONFIG_REMOTEPROC=m # # CONFIG_SUNXI_SRAM is not set CONFIG_SOC_TI=y +CONFIG_SOC_ZTE=y +CONFIG_ZX2967_PM_DOMAINS=y CONFIG_PM_DEVFREQ=y # @@ -7096,6 +7119,7 @@ CONFIG_EXTCON_ADC_JACK=m # CONFIG_EXTCON_ARIZONA is not set CONFIG_EXTCON_AXP288=m CONFIG_EXTCON_GPIO=m +CONFIG_EXTCON_INTEL_INT3496=m CONFIG_EXTCON_MAX14577=m CONFIG_EXTCON_MAX3355=m CONFIG_EXTCON_MAX77693=m @@ -7166,29 +7190,30 @@ CONFIG_AD7887=m CONFIG_AD7923=m CONFIG_AD799X=m CONFIG_AXP288_ADC=m -CONFIG_CC10001_ADC=m CONFIG_DA9150_GPADC=m CONFIG_HI8435=m +CONFIG_HX711=m CONFIG_INA2XX_ADC=m CONFIG_LP8788_ADC=m CONFIG_LTC2485=m CONFIG_MAX1027=m +CONFIG_MAX11100=m CONFIG_MAX1363=m CONFIG_MCP320X=m CONFIG_MCP3422=m -CONFIG_MEN_Z188_ADC=m CONFIG_NAU7802=m CONFIG_PALMAS_GPADC=m CONFIG_QCOM_SPMI_IADC=m # CONFIG_QCOM_SPMI_VADC is not set -CONFIG_STX104=m CONFIG_TI_ADC081C=m CONFIG_TI_ADC0832=m CONFIG_TI_ADC12138=m CONFIG_TI_ADC128S052=m CONFIG_TI_ADC161S626=m CONFIG_TI_ADS1015=m +CONFIG_TI_ADS7950=m CONFIG_TI_AM335X_ADC=m +CONFIG_TI_TLC4541=m CONFIG_TWL4030_MADC=m CONFIG_TWL6030_GPADC=m CONFIG_VIPERBOARD_ADC=m @@ -7226,7 +7251,6 @@ CONFIG_IIO_ST_SENSORS_CORE=m # # Counters # -CONFIG_104_QUAD_8=m # # Digital to analog converters @@ -7248,7 +7272,6 @@ CONFIG_AD5761=m CONFIG_AD5764=m CONFIG_AD5791=m CONFIG_AD7303=m -CONFIG_CIO_DAC=m CONFIG_AD8801=m CONFIG_M62332=m CONFIG_MAX517=m @@ -7286,6 +7309,8 @@ CONFIG_BMG160=m CONFIG_BMG160_I2C=m CONFIG_BMG160_SPI=m CONFIG_HID_SENSOR_GYRO_3D=m +CONFIG_MPU3050=m +CONFIG_MPU3050_I2C=m CONFIG_IIO_ST_GYRO_3AXIS=m CONFIG_IIO_ST_GYRO_I2C_3AXIS=m CONFIG_IIO_ST_GYRO_SPI_3AXIS=m @@ -7327,6 +7352,9 @@ CONFIG_BMI160_SPI=m CONFIG_INV_MPU6050_IIO=m CONFIG_INV_MPU6050_I2C=m CONFIG_INV_MPU6050_SPI=m +CONFIG_IIO_ST_LSM6DSX=m +CONFIG_IIO_ST_LSM6DSX_I2C=m +CONFIG_IIO_ST_LSM6DSX_SPI=m CONFIG_IIO_ADIS_LIB=m CONFIG_IIO_ADIS_LIB_BUFFER=y @@ -7403,6 +7431,7 @@ CONFIG_IIO_SYSFS_TRIGGER=m # Digital potentiometers # # CONFIG_DS1803 is not set +CONFIG_MAX5481=m # CONFIG_MAX5487 is not set # CONFIG_MCP4131 is not set # CONFIG_MCP4531 is not set @@ -7418,6 +7447,7 @@ CONFIG_LMP91000=m # CONFIG_ABP060MG=m # CONFIG_BMP280 is not set +CONFIG_IIO_CROS_EC_BARO=m # CONFIG_HID_SENSOR_PRESS is not set # CONFIG_HP03 is not set # CONFIG_MPL115_I2C is not set @@ -7436,10 +7466,11 @@ CONFIG_ABP060MG=m # CONFIG_AS3935 is not set # -# Proximity sensors +# Proximity and distance sensors # # CONFIG_LIDAR_LITE_V2 is not set # CONFIG_SX9500 is not set +CONFIG_SRF08=m # # Temperature sensors @@ -7447,6 +7478,7 @@ CONFIG_ABP060MG=m # CONFIG_MAXIM_THERMOCOUPLE is not set CONFIG_MLX90614=m CONFIG_TMP006=m +CONFIG_TMP007=m CONFIG_TSYS01=m CONFIG_TSYS02D=m CONFIG_NTB=m @@ -7517,6 +7549,8 @@ CONFIG_PHY_SAMSUNG_USB2=m # CONFIG_PHY_EXYNOS4210_USB2 is not set # CONFIG_PHY_EXYNOS4X12_USB2 is not set # CONFIG_PHY_EXYNOS5250_USB2 is not set +CONFIG_PHY_QCOM_USB_HS=m +CONFIG_PHY_QCOM_USB_HSIC=m CONFIG_PHY_TUSB1210=m CONFIG_POWERCAP=y CONFIG_INTEL_RAPL=m @@ -7539,11 +7573,7 @@ CONFIG_ND_BLK=y CONFIG_ND_CLAIM=y CONFIG_ND_BTT=y CONFIG_BTT=y -CONFIG_ND_PFN=m -CONFIG_NVDIMM_PFN=y -CONFIG_NVDIMM_DAX=y CONFIG_DEV_DAX=m -CONFIG_DEV_DAX_PMEM=m CONFIG_NR_DEV_DAX=32768 CONFIG_NVMEM=m CONFIG_STM=m @@ -7564,11 +7594,14 @@ CONFIG_INTEL_TH_PTI=m # CONFIG_FPGA=m +# +# FSI support +# +CONFIG_FSI=m + # # Firmware Drivers # -CONFIG_ARM_SCPI_PROTOCOL=m -CONFIG_ARM_SCPI_POWER_DOMAIN=m CONFIG_EDD=y CONFIG_EDD_OFF=y CONFIG_FIRMWARE_MEMMAP=y @@ -7663,7 +7696,6 @@ CONFIG_F2FS_FS_ENCRYPTION=y # CONFIG_F2FS_IO_TRACE is not set # CONFIG_F2FS_FAULT_INJECTION is not set CONFIG_FS_DAX=y -CONFIG_FS_DAX_PMD=y CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y CONFIG_EXPORTFS_BLOCK_OPS=y @@ -7859,7 +7891,6 @@ CONFIG_NFS_V4_SECURITY_LABEL=y CONFIG_NFS_FSCACHE=y # CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y -# CONFIG_NFS_DEBUG is not set CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y CONFIG_NFSD_V3=y @@ -7988,6 +8019,8 @@ CONFIG_DYNAMIC_DEBUG=y # Compile-time checks and compiler options # # CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_INFO_SPLIT is not set +# CONFIG_DEBUG_INFO_REDUCED is not set CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=2048 @@ -8004,6 +8037,7 @@ CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 +CONFIG_MAGIC_SYSRQ_SERIAL=y CONFIG_DEBUG_KERNEL=y # @@ -8013,6 +8047,7 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_PAGE_POISONING is not set # CONFIG_DEBUG_PAGE_REF is not set +# CONFIG_DEBUG_RODATA_TEST is not set # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set @@ -8050,7 +8085,6 @@ CONFIG_SCHED_INFO=y CONFIG_SCHEDSTATS=y # CONFIG_SCHED_STACK_END_CHECK is not set # CONFIG_DEBUG_TIMEKEEPING is not set -CONFIG_TIMER_STATS=y # CONFIG_DEBUG_PREEMPT is not set # @@ -8066,6 +8100,7 @@ CONFIG_TIMER_STATS=y # CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set +# CONFIG_WW_MUTEX_SELFTEST is not set CONFIG_STACKTRACE=y # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y @@ -8120,8 +8155,8 @@ CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ALL_BRANCHES is not set CONFIG_STACK_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_KPROBE_EVENT=y -CONFIG_UPROBE_EVENT=y +CONFIG_KPROBE_EVENTS=y +CONFIG_UPROBE_EVENTS=y CONFIG_BPF_EVENTS=y CONFIG_PROBE_EVENTS=y CONFIG_DYNAMIC_FTRACE=y @@ -8144,6 +8179,7 @@ CONFIG_TRACING_EVENTS_GPIO=y # # CONFIG_LKDTM is not set # CONFIG_TEST_LIST_SORT is not set +# CONFIG_TEST_SORT is not set # CONFIG_KPROBES_SANITY_TEST is not set # CONFIG_BACKTRACE_SELF_TEST is not set CONFIG_RBTREE_TEST=m @@ -8159,6 +8195,7 @@ CONFIG_INTERVAL_TREE_TEST=m # CONFIG_TEST_UUID is not set # CONFIG_TEST_RHASHTABLE is not set # CONFIG_TEST_HASH is not set +# CONFIG_TEST_PARMAN is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set # CONFIG_DMA_API_DEBUG is not set # CONFIG_TEST_LKM is not set @@ -8188,10 +8225,7 @@ CONFIG_EARLY_PRINTK=y # CONFIG_X86_PTDUMP_CORE is not set # CONFIG_X86_PTDUMP is not set # CONFIG_EFI_PGT_DUMP is not set -# CONFIG_DEBUG_RODATA_TEST is not set # CONFIG_DEBUG_WX is not set -CONFIG_DEBUG_SET_MODULE_RONX=y -# CONFIG_DEBUG_NX_TEST is not set CONFIG_DOUBLEFAULT=y # CONFIG_DEBUG_TLBFLUSH is not set # CONFIG_IOMMU_DEBUG is not set @@ -8233,6 +8267,7 @@ CONFIG_INTEL_TXT=y CONFIG_LSM_MMAP_MIN_ADDR=65536 CONFIG_HARDENED_USERCOPY=y # CONFIG_HARDENED_USERCOPY_PAGESPAN is not set +# CONFIG_STATIC_USERMODEHELPER is not set CONFIG_SECURITY_SELINUX=y CONFIG_SECURITY_SELINUX_BOOTPARAM=y CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0 @@ -8313,6 +8348,7 @@ CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_ABLK_HELPER=m CONFIG_CRYPTO_SIMD=m CONFIG_CRYPTO_GLUE_HELPER_X86=m +CONFIG_CRYPTO_ENGINE=m # # Authenticated Encryption with Associated Data @@ -8380,6 +8416,7 @@ CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m # Ciphers # CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_AES_TI=m CONFIG_CRYPTO_AES_X86_64=m CONFIG_CRYPTO_AES_NI_INTEL=m CONFIG_CRYPTO_ANUBIS=m @@ -8468,7 +8505,6 @@ CONFIG_PKCS7_MESSAGE_PARSER=y # Certificates for signature checking # # CONFIG_SYSTEM_TRUSTED_KEYRING is not set -CONFIG_KVM_APIC_ARCHITECTURE=y CONFIG_KVM_MMIO=y CONFIG_KVM_ASYNC_PF=y CONFIG_KVM_VFIO=y @@ -8557,6 +8593,8 @@ CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y +# CONFIG_DMA_NOOP_OPS is not set +CONFIG_DMA_VIRT_OPS=y CONFIG_CHECK_SIGNATURE=y CONFIG_CPU_RMAP=y CONFIG_DQL=y @@ -8568,8 +8606,8 @@ CONFIG_CLZ_TAB=y CONFIG_CORDIC=m CONFIG_DDR=y CONFIG_IRQ_POLL=y -CONFIG_MPILIB=m -CONFIG_OID_REGISTRY=m +CONFIG_MPILIB=y +CONFIG_OID_REGISTRY=y CONFIG_UCS2_STRING=y CONFIG_FONT_SUPPORT=y # CONFIG_FONTS is not set @@ -8578,6 +8616,7 @@ CONFIG_FONT_8x16=y # CONFIG_SG_SPLIT is not set CONFIG_SG_POOL=y CONFIG_SBITMAP=y +CONFIG_PARMAN=m # # Hardening features diff --git a/kernel.spec b/kernel.spec index 01b710b..d6cb908 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1,7 +1,7 @@ %define kernelversion 4 -%define patchlevel 10 +%define patchlevel 11 # sublevel is now used for -stable patches -%define sublevel 16 +%define sublevel 3 # Release number. Increase this before a rebuild. %define rpmrel 1 @@ -205,18 +205,15 @@ Patch108: ata-prefer-ata-drivers-over-ide-drivers-when-both-are-built.patch Patch109: fs-aufs4.patch # BFQ IO scheduler, http://algogroup.unimore.it/people/paolo/disk_sched/ -Patch111: 0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.10..patch -Patch112: 0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.10.0.patch +Patch111: 0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.11..patch +Patch112: 0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.11.0.patch Patch113: 0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch -Patch114: 0004-Turn-BFQ-v7r11-for-4.10.0-into-BFQ-v8r8-for-4.10.0.patch +Patch114: 0004-blk-bfq-turn-BFQ-v7r11-for-4.11.0-into-BFQ-v8r11-for.patch # https://bugs.freedesktop.org/show_bug.cgi?id=97822 # http://bugs.rosalinux.ru/show_bug.cgi?id=7533 Patch200: i915_hack_bug_97822.patch -# Patches from mainline. -Patch300: rt2800-enable-rt3290-unconditionally-on-pci-probe.patch - # Sanitizing kernel memory # We do not use "Patch:" here because apply_patches would always apply it # then, it seems, even if we place "Patch: <..>" under a conditional. diff --git a/linux-4.10.tar.sign b/linux-4.10.tar.sign deleted file mode 100644 index 297df2d..0000000 --- a/linux-4.10.tar.sign +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQEcBAABAgAGBQJYqiMdAAoJEHm+PkMAQRiGbXYH/Rqshach3DDsWvKZWbKHFYzs -1pGI0S0rJ3N1I3nB1zM6t658STkk4gxjOqG+N6uyfcWfvwxaWx7SxMbxxgcKbTgb -el+Lnx4unXDMCIJqPRshq8D7SWWwgSAjbtrufgec8IZd5RXiadORTOle488W/F99 -iIgGguMQVbTxV9Q8fepCFRLkZ/UZ9+oTbDoSed8ETroSJsjsSsAaPoVSEwBSb6Y4 -k2CqzqeHUBL+Qkpx/1wPoYObwSDwklawu1PvXPJDDVGBe/eDaUvlJnqJYgCMRwjw -2hd5vlGPMdUUpXFQv6REgBGeYQK/EM/fqYhEvJDxQQTrwIs4xnaimYY+QwY+5Os= -=TyAn ------END PGP SIGNATURE----- diff --git a/linux-4.11.tar.sign b/linux-4.11.tar.sign new file mode 100644 index 0000000..dbd5e00 --- /dev/null +++ b/linux-4.11.tar.sign @@ -0,0 +1,10 @@ +-----BEGIN PGP SIGNATURE----- + +iQEcBAABAgAGBQJZBqIqAAoJEHm+PkMAQRiG8+gH/iazF2SZxnZH9URKLpHGkT5D +fz+O4rnWjB9M8JmOUH3MRhukS720/qLmlwROM4Cghxigmv9RMcqds7JlHGxUnphh +Qv083nmDy3IWRGeN4FUDqFo0u1CB/BMZwrgEMf1FKT6vbmlzVroK7Xj6iGKflJH9 +BZZHt3YkSwuutXff6LjsA8eTiNrRLzNStCxBHuC3fv9hTDEFfZLrQAITg+XbdAgJ +U4tEKQ+EwaHi261LMLmDd3TjzB2SLrfckBICDrmQSk0Bvc/p0ZtWcjjaIZQm1jfk +RpMBbav5uVPoskbGNVDUwRhTraqZ9Lg0Gvb9RQYDeYZJCWGu62EOPS4KP76OmDc= +=j6oI +-----END PGP SIGNATURE----- diff --git a/patch-4.10.16.sign b/patch-4.10.16.sign deleted file mode 100644 index b89e99e..0000000 --- a/patch-4.10.16.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlkYSOcACgkQONu9yGCS -aT4yDQ/+O6SjNItmY+yeEsmf39/yTH7B/oJ0BnRF6/gEcF4X4wnaplO0tqgDYLAQ -okSArPTuY2IJhHuF9mmT0um9z6T7QpqH9NEPVISJLS9hS/vHQ5NIxMW2Qy2acf/z -zD5221mrpYZSZa/Bbsou0W499wHu9VgGgo6R/RNMGvcdLvpvMyCrgEfG451ehDqA -XGJCHNmooJBb0t+m71Z3nOPq5gKhFnjij0eStXmuyWGn+az+gVBSTIcdZn4b3+27 -Qv77qqZgFUjeRx8Y0XjizmxaJrcNxdjnGl4T1pATs34QTfUtUqFD8P8cjbPO9vwc -LbOYernTilhkavpulWN5Hwvqv21KBDhUr2YQmLqhLt68+7zfnMv7wCK0jWnyCWTs -wdh2qZsDafawsNY60msDbs4BHfml5I1Pb9/1yWOU0GP51FS06OHNfWgCInG6Y0dk -RrWdanvxdSvF2kpaoYQa/y4hR8ECrKU+chq0N5U89qCW21Y+NvN6bMbl7wArk9B8 -SnlauWBnfZ4DbW0uOioLlOQNOjb23/vS84llfHGPZlVA0D6ZbUwR+52+htW/Y0a/ -Vcv1b6TPrzMozm4KI/J4/ZBD51tR/fbsrE+TiiZeST63t0Lp0+2rmlYLv/PIuaSg -/VAqNWM9GN+fAasbhrbC2UjR3E6RzqcHyrIfwJrFwFSvWmADhfg= -=hhjF ------END PGP SIGNATURE----- diff --git a/patch-4.11.3.sign b/patch-4.11.3.sign new file mode 100644 index 0000000..0415921 --- /dev/null +++ b/patch-4.11.3.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlkm4FcACgkQONu9yGCS +aT4YGg/+NPpFtQloj+I2DYqiytcReFJLPE9+WjZ6jXgAu9doTuPvayUoAO56wQWC +L5DnzRhoZPcgrXuGlyPXuDdegld+gM6TX4qDAPdYrfQ/JyRRNcdsthPDhiFXjUM5 +DvEJyF8JcVpt7iuZNu5PD/HogVySinii4PfkGoabvFx8/WV3acqTAGegtHAANkYI +fLjc2oxZ6XoVrCwllu29EZSN9nailxjb1dIrz7zZzlHj+op0qp/WdvLaf9E+De6y +NTkdjXkyWhmMJ8+5H+W2baRZTzbOAAIqKCSxPPQANKBqJB7wkeWqhC41lj32JNTS +WWB8uLXUBnZRvlWNXNfrzT5sRF2Zb3jiGPn+SDjRJBi3Gp7JYliQfLPz++8PH6NN +hqCboTwvQsMmLHV5SOfscdmGIw6gYyWEClZ7Yap/lnM96IC7pZansGSQMWQpy1zD +n2j7nc4EHuOYBc7havjxkTu8QIBdrann1Wp+B7JrPS7QtVTYTA3+zsS7PLACnEJ5 +QeGdX8aAnqgt6UQLlEq7FE46kBVgeMRhF12L7yvDqfFdXycMXz4lbFBFvBPa970i +m8hzw7GwwyCPotlkh/dJ4MjwkVr1Idi4vVjkmFY3j05eecov8ggq0546Ly2C775T +zP9bDh8fxEPkRdOb5BiefxTiMp+prZPficX9Ka7RJIQBy9nVYRw= +=5ZcR +-----END PGP SIGNATURE----- diff --git a/rt2800-enable-rt3290-unconditionally-on-pci-probe.patch b/rt2800-enable-rt3290-unconditionally-on-pci-probe.patch deleted file mode 100644 index 683e8d5..0000000 --- a/rt2800-enable-rt3290-unconditionally-on-pci-probe.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 6715208d0a95ae417203f8e4a7937c1b4c4947f2 Mon Sep 17 00:00:00 2001 -From: Stanislaw Gruszka -Date: Mon, 30 Jan 2017 12:12:47 +0100 -Subject: [PATCH] rt2800: enable rt3290 unconditionally on pci probe -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When we restart system using sysrq RT3290 device do not initalize -properly, hance always enable it via WLAN_FUN_CTRL register on -probe. - -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=85461 -Reported-and-tested-by: Giedrius Statkevičius -Signed-off-by: Stanislaw Gruszka -Signed-off-by: Kalle Valo ---- - drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -index 755c093..572cdea 100644 ---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -373,9 +373,6 @@ static int rt2800_enable_wlan_rt3290(struct rt2x00_dev *rt2x00dev) - int i, count; - - rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®); -- if (rt2x00_get_field32(reg, WLAN_EN)) -- return 0; -- - rt2x00_set_field32(®, WLAN_GPIO_OUT_OE_BIT_ALL, 0xff); - rt2x00_set_field32(®, FRC_WL_ANT_SET, 1); - rt2x00_set_field32(®, WLAN_CLK_EN, 0); --- -2.7.3 - diff --git a/sanitize-memory.patch b/sanitize-memory.patch index 18a2ac7..7ffbabe 100644 --- a/sanitize-memory.patch +++ b/sanitize-memory.patch @@ -1,8 +1,8 @@ -diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index a4f4d69..4af52d6 100644 ---- a/Documentation/kernel-parameters.txt -+++ b/Documentation/kernel-parameters.txt -@@ -2888,6 +2888,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. +diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt +index facc20a..db7ec30 100644 +--- a/Documentation/admin-guide/kernel-parameters.txt ++++ b/Documentation/admin-guide/kernel-parameters.txt +@@ -2808,6 +2808,10 @@ the specified number of seconds. This is to be used if your oopses keep scrolling off the screen. @@ -14,10 +14,10 @@ index a4f4d69..4af52d6 100644 pcd. [PARIDE] diff --git a/fs/buffer.c b/fs/buffer.c -index 9c8eb9b..236a1ca 100644 +index 9196f2a..6215406 100644 --- a/fs/buffer.c +++ b/fs/buffer.c -@@ -3476,7 +3476,7 @@ void __init buffer_init(void) +@@ -3512,7 +3512,7 @@ void __init buffer_init(void) bh_cachep = kmem_cache_create("buffer_head", sizeof(struct buffer_head), 0, (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC| @@ -27,10 +27,10 @@ index 9c8eb9b..236a1ca 100644 /* diff --git a/fs/dcache.c b/fs/dcache.c -index 5c7cc95..4d1663e 100644 +index b1ff5be..e869514 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -3608,7 +3608,8 @@ void __init vfs_caches_init_early(void) +@@ -3619,7 +3619,8 @@ void __init vfs_caches_init_early(void) void __init vfs_caches_init(void) { names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0, @@ -41,7 +41,7 @@ index 5c7cc95..4d1663e 100644 dcache_init(); inode_init(); diff --git a/include/linux/slab.h b/include/linux/slab.h -index 4293808..70e883a 100644 +index 3c37a8c..341210a 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -23,6 +23,13 @@ @@ -59,10 +59,10 @@ index 4293808..70e883a 100644 #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ diff --git a/kernel/fork.c b/kernel/fork.c -index beb3172..5df26d4 100644 +index 631a65c..d4cd8d4 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -1932,7 +1932,7 @@ void __init proc_caches_init(void) +@@ -2173,7 +2173,7 @@ void __init proc_caches_init(void) sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, NULL); @@ -72,10 +72,10 @@ index beb3172..5df26d4 100644 nsproxy_cache_init(); } diff --git a/mm/rmap.c b/mm/rmap.c -index 1ef3640..aead057 100644 +index f683801..d863239 100644 --- a/mm/rmap.c +++ b/mm/rmap.c -@@ -429,10 +429,10 @@ static void anon_vma_ctor(void *data) +@@ -430,10 +430,10 @@ static void anon_vma_ctor(void *data) void __init anon_vma_init(void) { anon_vma_cachep = kmem_cache_create("anon_vma", sizeof(struct anon_vma), @@ -89,10 +89,10 @@ index 1ef3640..aead057 100644 /* diff --git a/mm/slab.c b/mm/slab.c -index b672710..570a6a5 100644 +index 807d86c..6cac198 100644 --- a/mm/slab.c +++ b/mm/slab.c -@@ -3524,6 +3524,17 @@ void ___cache_free(struct kmem_cache *cachep, void *objp, +@@ -3520,6 +3520,17 @@ void ___cache_free(struct kmem_cache *cachep, void *objp, struct array_cache *ac = cpu_cache_get(cachep); check_irq_off(); @@ -111,12 +111,12 @@ index b672710..570a6a5 100644 objp = cache_free_debugcheck(cachep, objp, caller); diff --git a/mm/slab.h b/mm/slab.h -index 9653f2e..47a0f7f 100644 +index 65e7c3f..fc7e00e 100644 --- a/mm/slab.h +++ b/mm/slab.h -@@ -71,6 +71,15 @@ extern struct list_head slab_caches; - /* The slab cache that manages slab cache information */ - extern struct kmem_cache *kmem_cache; +@@ -77,6 +77,15 @@ extern const struct kmalloc_info_struct { + unsigned long size; + } kmalloc_info[]; +#ifdef CONFIG_PAX_MEMORY_SANITIZE +#ifdef CONFIG_X86_64 @@ -131,10 +131,10 @@ index 9653f2e..47a0f7f 100644 unsigned long align, unsigned long size); diff --git a/mm/slab_common.c b/mm/slab_common.c -index 71f0b28..fd97b10 100644 +index 09d0e84..d87c631 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c -@@ -44,7 +44,11 @@ struct kmem_cache *kmem_cache; +@@ -49,7 +49,11 @@ static DECLARE_WORK(slab_caches_to_rcu_destroy_work, * Merge control. If this is set then no merging of slab caches will occur. * (Could be removed. This was introduced to pacify the merge skeptics.) */ @@ -146,7 +146,7 @@ index 71f0b28..fd97b10 100644 static int __init setup_slab_nomerge(char *str) { -@@ -67,6 +71,20 @@ unsigned int kmem_cache_size(struct kmem_cache *s) +@@ -72,6 +76,20 @@ unsigned int kmem_cache_size(struct kmem_cache *s) } EXPORT_SYMBOL(kmem_cache_size); @@ -167,7 +167,7 @@ index 71f0b28..fd97b10 100644 #ifdef CONFIG_DEBUG_VM static int kmem_cache_sanity_check(const char *name, size_t size) { -@@ -232,7 +250,11 @@ static inline void destroy_memcg_params(struct kmem_cache *s) +@@ -264,7 +282,11 @@ static inline void memcg_unlink_cache(struct kmem_cache *s) */ int slab_unmergeable(struct kmem_cache *s) { @@ -180,20 +180,20 @@ index 71f0b28..fd97b10 100644 return 1; if (!is_root_cache(s)) -@@ -255,7 +277,11 @@ struct kmem_cache *find_mergeable(size_t size, size_t align, +@@ -287,7 +309,11 @@ struct kmem_cache *find_mergeable(size_t size, size_t align, { struct kmem_cache *s; -- if (slab_nomerge || (flags & SLAB_NEVER_MERGE)) -+ if (slab_nomerge || (flags & SLAB_NEVER_MERGE) +- if (slab_nomerge) ++ if (slab_nomerge +#ifdef CONFIG_PAX_MEMORY_SANITIZE -+ || pax_sanitize_slab ++ || pax_sanitize_slab +#endif + ) return NULL; if (ctor) -@@ -411,6 +437,11 @@ kmem_cache_create(const char *name, size_t size, size_t align, +@@ -453,6 +479,11 @@ kmem_cache_create(const char *name, size_t size, size_t align, * passed flags. */ flags &= CACHE_CREATE_MASK; @@ -206,7 +206,7 @@ index 71f0b28..fd97b10 100644 s = __kmem_cache_alias(name, size, align, flags, ctor); if (s) diff --git a/mm/slob.c b/mm/slob.c -index 5ec1580..385cdbc 100644 +index eac04d43..f455845 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -365,6 +365,11 @@ static void slob_free(void *block, int size) @@ -222,10 +222,10 @@ index 5ec1580..385cdbc 100644 /* This slob page is about to become partially free. Easy! */ sp->units = units; diff --git a/mm/slub.c b/mm/slub.c -index 9adae58..56e456c 100644 +index 7f4bc70..a913874 100644 --- a/mm/slub.c +++ b/mm/slub.c -@@ -2934,6 +2934,23 @@ static __always_inline void slab_free(struct kmem_cache *s, struct page *page, +@@ -2959,6 +2959,23 @@ static __always_inline void slab_free(struct kmem_cache *s, struct page *page, unsigned long addr) { slab_free_freelist_hook(s, head, tail); @@ -249,7 +249,7 @@ index 9adae58..56e456c 100644 /* * slab_free_freelist_hook() could have put the items into quarantine. * If so, no need to free them. -@@ -3431,6 +3448,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) +@@ -3456,6 +3473,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) s->inuse = size; if (((flags & (SLAB_DESTROY_BY_RCU | SLAB_POISON)) || @@ -260,10 +260,10 @@ index 9adae58..56e456c 100644 /* * Relocate free pointer after the object if it is not diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 3864b4b6..d1dd10d 100644 +index f1d0459..dc2922f3 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -3432,12 +3432,14 @@ void __init skb_init(void) +@@ -3474,12 +3474,14 @@ void __init skb_init(void) skbuff_head_cache = kmem_cache_create("skbuff_head_cache", sizeof(struct sk_buff), 0, @@ -281,7 +281,7 @@ index 3864b4b6..d1dd10d 100644 } diff --git a/security/Kconfig b/security/Kconfig -index 118f454..e2a0281 100644 +index d900f47..fba9613 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -6,6 +6,37 @@ menu "Security options"