Re: [PATCH] vhost: correct misleading printing information

2024-03-15 Thread Xianting Tian
it is a very minor fix, I think it can be applied 在 2024/3/11 下午4:21, Xianting Tian 写道: Guest moved avail idx not used idx when we need to print log if '(vq->avail_idx - last_avail_idx) > vq->num', so fix it. Signed-off-by: Xianting Tian --- drivers/vhost/vhost.c | 2 +- 1 file c

[PATCH] vhost: correct misleading printing information

2024-03-11 Thread Xianting Tian
Guest moved avail idx not used idx when we need to print log if '(vq->avail_idx - last_avail_idx) > vq->num', so fix it. Signed-off-by: Xianting Tian --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhos

[PATCH] virtio: remove export for virtio_config_{enable, disable}

2021-02-21 Thread Xianting Tian
virtio_config_enable(), virtio_config_disable() are only used inside drivers/virtio/virtio.c, so it doesn't need export the symbols. Signed-off-by: Xianting Tian --- drivers/virtio/virtio.c | 6 ++ include/linux/virtio.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git

[PATCH] virtio: remove export for virtio_config_{enable, disable}

2021-02-20 Thread Xianting Tian
virtio_config_enable(), virtio_config_disable() are only used inside drivers/virtio/virtio.c, so it doesn't need export the symbols. Signed-off-by: Xianting Tian --- drivers/virtio/virtio.c | 6 ++ include/linux/virtio.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git

[PATCH] virtio_mmio: fix one typo

2021-02-06 Thread Xianting Tian
fix the typo 'there is are' to 'there are'. Signed-off-by: Xianting Tian --- drivers/virtio/virtio_mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 238383f..a286d22 100644 --- a/drivers/virtio

[PATCH] [v3] blk-mq-tag: make blk_mq_tag_busy() return void

2020-12-09 Thread Xianting Tian
As no one cares about the return value of blk_mq_tag_busy() and __blk_mq_tag_busy(), so make them return void. Other change is to simplify blk_mq_tag_idle(). Signed-off-by: Xianting Tian Reviewed-by: Ming Lei --- block/blk-mq-tag.c | 4 +--- block/blk-mq-tag.h | 16 ++-- 2 files

[PATCH] [v2] blk-mq-tag: make blk_mq_tag_busy() return void

2020-12-09 Thread Xianting Tian
As no one cares about the return value of blk_mq_tag_busy() and __blk_mq_tag_busy(), so make them return void. Other change is to simplify blk_mq_tag_idle(). Signed-off-by: Xianting Tian Reviewed-by: Ming Lei --- block/blk-mq-tag.c | 4 ++-- block/blk-mq-tag.h | 16 ++-- 2 files

[PATCH] blk-mq-tag: make blk_mq_tag_busy() return void

2020-12-08 Thread Xianting Tian
As no one cares about the return value of blk_mq_tag_busy() and __blk_mq_tag_busy(), so make them return void. Signed-off-by: Xianting Tian --- block/blk-mq-tag.c | 4 ++-- block/blk-mq-tag.h | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block/blk-mq-tag.c b/block

[PATCH] sched/rt: Print curr when RT throttling activated

2020-12-03 Thread Xianting Tian
r analysis, we need add more prints. This patch is to print current RT task when RT throttling activated, It help us to know what is the RT thread in the first time. Signed-off-by: Xianting Tian --- kernel/sched/rt.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ke

[PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ

2020-10-21 Thread Xianting Tian
Since we already in hard IRQ context when running megasas_isr(), so use spin_lock() is enough, which is faster than spin_lock_irqsave(). Signed-off-by: Xianting Tian --- drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH] mm: bio_alloc never fails when set GFP_NOIO, GFP_KERNEL

2020-10-20 Thread Xianting Tian
, and so forth. Signed-off-by: Xianting Tian --- mm/page_io.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index e485a6e8a..9215bb356 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -30,18 +30,20 @@ static struct

[PATCH] ext4: remove the null check of bio_vec page

2020-10-20 Thread Xianting Tian
bv_page can't be NULL in a valid bio_vec, so we can remove the NULL check, as we did in other places when calling bio_for_each_segment_all() to go through all bio_vec of a bio. Signed-off-by: Xianting Tian --- fs/ext4/page-io.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ext4/page

[PATCH] blk-mq: remove the calling of local_memory_node()

2020-10-19 Thread Xianting Tian
__GFP_THISNODE, so we can remove the calling of local_memory_node(). Fixes: bffed457160ab ("blk-mq: Avoid memoryless numa node encoded in hctx numa_node") Signed-off-by: Xianting Tian --- block/blk-mq-cpumap.c | 2 +- block/blk-mq.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH] gfs2: use helper macro abs()

2020-10-19 Thread Xianting Tian
Use helper macro abs() to simplify the "x >= y || x <= -y" cmp. Signed-off-by: Xianting Tian --- fs/gfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 9f4d9e7be..05eb709de 100644 --- a/fs/gfs2/super.c +++ b

[PATCH] mm: vmscan: avoid a unnecessary reschedule in shrink_slab()

2020-10-15 Thread Xianting Tian
In shrink_slab(), it directly goes to 'out' label only when it can't get the lock of shrinker_rwsew. In this case, it doesn't do the real work of shrinking slab, so we don't need trigger a reschedule by cond_resched(). Signed-off-by: Xianting Tian --- mm/vmscan.c | 3 ++- 1 file changed, 2

[PATCH] blk-mq: add helper function to test hctx inactive

2020-10-14 Thread Xianting Tian
Introduce helper function blk_mq_hctx_inactive() to test BLK_MQ_S_INACTIVE as we already done for BLK_MQ_S_STOPPED. Signed-off-by: Xianting Tian --- block/blk-mq-tag.c | 2 +- block/blk-mq.h | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/block/blk-mq-tag.c b/block

[PATCH] mm: Make allocator take care of memoryless numa node

2020-10-12 Thread Xianting Tian
and __alloc_pages_node,__alloc_pages_nodemask may be called directly, so only add local_memory_node() in __alloc_pages_nodemask. Signed-off-by: Xianting Tian --- include/linux/slab.h | 3 +++ mm/page_alloc.c | 1 + mm/slab.c| 6 +- mm/slob.c| 1 + mm/slub.c| 10

[PATCH] net: Avoid allocing memory on memoryless numa node

2020-10-10 Thread Xianting Tian
-off-by: Xianting Tian --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 266073e30..dcb4533ef 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2590,7 +2590,7 @@ static struct xps_map *expand_xps_map(struct xps_map *map

[PATCH] ext2: Remove unnecessary blank

2020-10-10 Thread Xianting Tian
Remove unnecessary blank when calling kmalloc_array(). Signed-off-by: Xianting Tian --- fs/ext2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 7fab2b3b5..551e69755 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -1070,7

[PATCH] IB/hfi1: Avoid allocing memory on memoryless numa node

2020-10-10 Thread Xianting Tian
-off-by: Xianting Tian --- drivers/infiniband/hw/hfi1/file_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c index 8ca51e43c..79fa22cc7 100644 --- a/drivers/infiniband/hw/hfi1/file_ops.c +++ b

[PATCH] bpf: Avoid allocing memory on memoryless numa node

2020-10-10 Thread Xianting Tian
-off-by: Xianting Tian --- kernel/bpf/cpumap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c index 6386b7bb9..2c885c00a 100644 --- a/kernel/bpf/cpumap.c +++ b/kernel/bpf/cpumap.c @@ -423,7 +423,7 @@ __cpu_map_entry_alloc(struct

[tip: sched/core] sched/fair: Remove the force parameter of update_tg_load_avg()

2020-09-29 Thread tip-bot2 for Xianting Tian
The following commit has been merged into the sched/core branch of tip: Commit-ID: fe7491580d7c56152ea8d9d3124201191617435d Gitweb: https://git.kernel.org/tip/fe7491580d7c56152ea8d9d3124201191617435d Author:Xianting Tian AuthorDate:Thu, 24 Sep 2020 09:47:55 +08:00

[PATCH] [v3] blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps()

2020-09-25 Thread Xianting Tian
15 init cost time 148942 ns [ 432.598993] [4688:kworker/u33:8 switch:700,2] all hw queues init cost time 3035099 ns [ 432.602611] nvme0n1: p1 So use this patch to trigger schedule between each hw queue init, to avoid other threads getting stuck. It is not in atomic context

[PATCH] sched/fair: Remove the force parameter of update_tg_load_avg()

2020-09-23 Thread Xianting Tian
In the file fair.c, sometims update_tg_load_avg(cfs_rq, 0) is used, sometimes update_tg_load_avg(cfs_rq, false) is used. update_tg_load_avg() has the parameter force, but in current code, it never set 1 or true to it, so remove the force parameter. Signed-off-by: Xianting Tian --- kernel/sched

[PATCH] sched/fair: Use bool parameter for update_tg_load_avg()

2020-09-23 Thread Xianting Tian
In the file fair.c, sometims update_tg_load_avg(cfs_rq, 0) is used, sometimes update_tg_load_avg(cfs_rq, false) is used. So change it to use bool parameter. Signed-off-by: Xianting Tian --- kernel/sched/fair.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH] [v2] nvme: replace meaningless judgement by checking whether req is null

2020-09-22 Thread Xianting Tian
25.788090] handle_edge_irq+0x82/0x190 [ 1125.788094] handle_irq+0xbf/0x100 [ 1125.788098] do_IRQ+0x49/0xd0 [ 1125.788100] common_interrupt+0xf/0xf Signed-off-by: Xianting Tian --- drivers/nvme/host/pci.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) d

[PATCH] nvme: replace meaningless judgement by checking whether req is null

2020-09-20 Thread Xianting Tian
tagset depth is 30: [7.489345] nvme nvme2: command id 24 completed on queue 0, nvmeq q_depth 32, nvme tagset q_depth 0, admin q_depth 30 [7.489347] tag, nr_tags:24 30 This patch is to remove the meaningless judgement, we check whether the returned

[PATCH] [v2] nvme: use correct upper limit for tag in nvme_handle_cqe()

2020-09-18 Thread Xianting Tian
epth 0, admin q_depth 30 [7.489347] tag, nr_tags:24 30 This patch is to make command_id match to its correct upper limit 'nvmeq->dev->tagset.queue_depth' or 'nvmeq->dev->admin_tagset.queue_depth', not nvmeq->q_depth. So with this patch, we can avoid a potential null pointer d

[PATCH] nvme: use correct upper limit for tag in nvme_handle_cqe()

2020-09-18 Thread Xianting Tian
tagset q_depth 1023 [ 16.649974] tag, nr_tags:968 1023 This patch is to make command_id match to its correct upper limit 'nvmeq->dev->tagset.queue_depth', not nvmeq->q_depth. So even if we got 1023 of command_id, we can avoid a null pointer deference. Signed-off-by: Xianting Ti

[PATCH] [v2] blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps()

2020-09-17 Thread Xianting Tian
quot;. We are not in atomic context when executing __blk_mq_alloc_rq_maps(), so it is safe to call cond_resched(). Signed-off-by: Xianting Tian --- block/blk-mq.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index b3d2785ee..5a71fe5

[PATCH] blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps()

2020-09-16 Thread Xianting Tian
rker/u33:8 switch:700,2] all hw queues init cost time 3035099 ns [ 432.602611] nvme0n1: p1 So use this patch to trigger schedule between each hw queue init, to avoid stuck of other tasks. Signed-off-by: Xianting Tian --- block/blk-mq.c | 8 +++- 1 file changed, 7 insertions(+), 1 del

[PATCH] ipmi: add retry in try_get_dev_id()

2020-09-16 Thread Xianting Tian
Use retry machanism to give device more opportunitys to correctly response kernel when we received specific completion codes. This is similar to what we done in __get_device_id(). Signed-off-by: Xianting Tian --- drivers/char/ipmi/ipmi_msghandler.c | 2 -- drivers/char/ipmi/ipmi_si_intf.c

[PATCH] ipmi: print current state when error

2020-09-15 Thread Xianting Tian
Print current state before returning IPMI_NOT_IN_MY_STATE_ERR, we can know where this issue is coming from and possibly fix the state machine. Signed-off-by: Xianting Tian --- drivers/char/ipmi/ipmi_bt_sm.c | 4 +++- drivers/char/ipmi/ipmi_kcs_sm.c | 4 +++- drivers/char/ipmi/ipmi_smic_sm.c

[PATCH] [v3] ipmi: retry to get device id when error

2020-09-15 Thread Xianting Tian
this issue again and the retry succeed on the first retry, we finally got the correct msg and then all is ok: Recv: 1c 01 00 01 81 05 84 02 af db 07 00 01 00 b9 00 10 00 So use retry machanism in this patch to give bmc more opportunity to correctly response kernel when we received specific completi

[PATCH] [v2] ipmi: retry to get device id when error

2020-09-14 Thread Xianting Tian
this issue again and the retry succeed on the first retry, we finally got the correct msg and then all is ok: Recv: 1c 01 00 01 81 05 84 02 af db 07 00 01 00 b9 00 10 00 So use retry machanism in this patch to give bmc more opportunity to correctly response kernel when we received specific complet

[PATCH] ipmi: retry to get device id when error

2020-09-13 Thread Xianting Tian
hen all is ok: Recv: 1c 01 00 01 81 05 84 02 af db 07 00 01 00 b9 00 10 00 So use retry machanism in this patch to give bmc more opportunity to correctly response kernel. Signed-off-by: Xianting Tian --- drivers/char/ipmi/ipmi_msghandler.c | 17 ++--- 1 file changed, 14 insertions(+

[PATCH] [v2] blkcg: add plugging support for punt bio

2020-09-10 Thread Xianting Tian
rformance improved with the patch, especially when system load is higher. Another optimazition is to use the plug only when bio_list contains at least 2 bios. Signed-off-by: Xianting Tian --- block/blk-cgroup.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block/blk-cgroup.c b/block/

[PATCH] block: remove redundant empty check of mq_list

2020-09-09 Thread Xianting Tian
blk_mq_flush_plug_list() itself will do the empty check of mq_list, so remove such check in blk_flush_plug_list(). Actually normally mq_list is not empty when blk_flush_plug_list is called. Signed-off-by: Xianting Tian --- block/blk-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH] fs: use correct parameter in notes of generic_file_llseek_size()

2020-09-05 Thread Xianting Tian
Fix warning when compiling with W=1: fs/read_write.c:88: warning: Function parameter or member 'maxsize' not described in 'generic_file_llseek_size' fs/read_write.c:88: warning: Excess function parameter 'size' description in 'generic_file_llseek_size' Signed-off-by: Xianting Tian --- fs

[PATCH] nvme: use kobj_to_dev() to get device

2020-09-04 Thread Xianting Tian
We already has the interface kobj_to_dev(), which can be used to get 'struct device *' from kobj, so use it. Signed-off-by: Xianting Tian --- drivers/nvme/host/core.c | 4 ++-- drivers/nvme/host/lightnvm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme

[PATCH] clocksource: return negative error code

2020-08-31 Thread Xianting Tian
A negative error code should be returned Signed-off-by: Xianting Tian --- drivers/clocksource/h8300_timer8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c index 1d740a8c4..47114c2a7 100644

[PATCH] [v2] nvme-pci: check req to prevent crash in nvme_handle_cqe()

2020-08-31 Thread Xianting Tian
f Signed-off-by: Xianting Tian --- drivers/nvme/host/pci.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index ba725ae47..5f1c51a43 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -960,6 +960,13 @@ static in

[PATCH] nvme-pci: check req to prevent crash in nvme_handle_cqe()

2020-08-31 Thread Xianting Tian
t+0xf/0xf Signed-off-by: Xianting Tian --- drivers/nvme/host/pci.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index ba725ae47..32712a41c 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -939

[PATCH] scsi: qla2xxx: Fix the return value

2020-08-29 Thread Xianting Tian
A negative error code should be returned. Signed-off-by: Xianting Tian --- drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index fbb80a043..612e001cc 100644 --- a/drivers

[PATCH] aio: make aio wait path to account iowait time

2020-08-28 Thread Xianting Tian
.0 0:03.62 fio 16301 root 20 0 272432 3568 1868 S 1.0 0.0 0:03.63 fio 16306 root 20 0 272452 3624 1872 S 1.0 0.0 0:03.60 fio Signed-off-by: Xianting Tian --- fs/aio.c | 2 +- include/linux/wait.h | 26 ++ 2 f

[PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag

2020-08-27 Thread Xianting Tian
Replace various magic -1 constants for tags with BLK_MQ_NO_TAG. Signed-off-by: Xianting Tian --- block/blk-core.c | 4 ++-- block/blk-mq-sched.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index d9d632639..c7eaf7504 100644

[PATCH] [v2] blk-mq: use BLK_MQ_NO_TAG for no tag

2020-08-25 Thread Xianting Tian
Replace various magic -1 constants for tags with BLK_MQ_NO_TAG. And move the definition of BLK_MQ_NO_TAG from 'block/blk-mq-tag.h' to 'include/linux/blk-mq.h' Signed-off-by: Xianting Tian --- block/blk-core.c | 4 ++-- block/blk-mq-sched.c | 2 +- block/blk-mq-tag.h | 6

[PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag

2020-08-23 Thread Xianting Tian
Replace various magic -1 constants for tags with BLK_MQ_NO_TAG. Signed-off-by: Xianting Tian --- block/blk-core.c | 4 ++-- block/blk-mq-sched.c | 2 +- include/linux/blk-mq.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c

[PATCH] btrfs: prevent hung check firing during long sync IO

2020-08-19 Thread Xianting Tian
(). Signed-off-by: Xianting Tian --- fs/btrfs/disk-io.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 9ae25f632..1eb560de0 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -17,6 +17,7 @@ #include #include

[PATCH] mm/memory-failure: do pgoff calculation before for_each_process()

2020-08-18 Thread Xianting Tian
There is no need to calcaulate pgoff in each loop of for_each_process(), so move it to the place before for_each_process(), which can save some CPU cycles. Signed-off-by: Xianting Tian --- mm/memory-failure.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/memory

[PATCH] md: only calculate blocksize once and use i_blocksize()

2020-08-17 Thread Xianting Tian
We alreday has the interface i_blocksize(), which can be used to get blocksize, so use it. Only calculate blocksize once and use it within read_page(). Signed-off-by: Xianting Tian --- drivers/md/md-bitmap.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/md

[PATCH] exfat: use i_blocksize() to get blocksize

2020-08-15 Thread Xianting Tian
We alreday has the interface i_blocksize() to get blocksize, so use it. Signed-off-by: Xianting Tian --- fs/exfat/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/exfat/file.c b/fs/exfat/file.c index a6a063830..163b599db 100644 --- a/fs/exfat/file.c +++ b/fs/exfat

[PATCH] sched: Remove useless settings when 'tg == d->tg'

2020-08-14 Thread Xianting Tian
if 'tg == d->tg' is true, the previous settings for period,runtime are unnecessary. So move the settings to the 'else' branch. Signed-off-by: Xianting Tian --- kernel/sched/rt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c in

[PATCH] tracing: use __this_cpu_read() in trace_buffered_event_enable()

2020-08-13 Thread Xianting Tian
The code is executed with preemption disabled, so it's safe to use __this_cpu_read(). Signed-off-by: Xianting Tian --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index bb6226972..7d0d71ce9 100644

[PATCH] block: don't read block device if it's invalid

2020-08-11 Thread Xianting Tian
te | grep ' D' 848 systemd-udevd D 504 kworker/10:1D 1197767 isdct D 1198830 isdct D 1580322 xxd D 1616804 kworker/10:0D 1626264 isdct D 1734726 kworker/10:2D 2197993 isdct D 2662117 xxd D 3083718 xxd

[PATCH] ext4: use kmemdup_nul() instead of kstrndup()

2020-08-08 Thread Xianting Tian
kmemdup_nul() is more efficient than kmemdup_nul() if the size is known exactly. The description of kstrndup() already suggested: Note: Use kmemdup_nul() instead if the size is known exactly. Signed-off-by: Xianting Tian --- fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] blkcg: add plugging support for punt bio

2020-08-06 Thread Xianting Tian
Try to merge continuous bio to current task's plug fisrt. Signed-off-by: Xianting Tian --- block/blk-cgroup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 0ecc897..fe5d361 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -122,6

[PATCH] aio: use wait_for_completion_io() when waiting for completion of io

2020-08-05 Thread Xianting Tian
of wait_for_completion() when waiting for completion of io before exit_aio and io_destroy. Signed-off-by: Xianting Tian --- fs/aio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 91e7cc4..498b8a0 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -892,7 +892,7

[PATCH] mm: use blk_io_schedule() for avoiding task hung in sync io

2020-08-03 Thread Xianting Tian
/kernel/hung_task_panic) in case of above exception occur. We have prevented task hung in submit_bio_wait(), blk_execute_rq() and __blkdev_direct_IO(). Signed-off-by: Xianting Tian --- mm/page_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_io.c b/mm/page_io.c index

[PATCH] ext4: move buffer_mapped() to proper position

2020-07-31 Thread Xianting Tian
evalidate+0x4f/0x60 [100722.966709] __vfs_read+0xec/0x160 [100722.966711] vfs_read+0x8c/0x130 [100722.966712] SyS_pread64+0x87/0xb0 [100722.966716] do_syscall_64+0x67/0x1b0 [100722.966719] entry_SYSCALL64_slow_path+0x25/0x25 Signed-off-by: Xianting Tian --- fs/buffer.c | 9 +

[PATCH] ext4: check superblock mapped prior to get write access

2020-07-28 Thread Xianting Tian
] SyS_write+0x55/0xc0 [ 1715.675144] do_syscall_64+0x67/0x1b0 [ 1715.675147] entry_SYSCALL64_slow_path+0x25/0x25 Signed-off-by: Xianting Tian --- fs/ext4/ext4_jbd2.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index 0c76cdd..9a60ca7 1

[PATCH] jbd2: check bh2jh() before accessing it

2020-07-18 Thread Xianting Tian
(bh)" is true), but buffer_head doesn't record it(bh->b_private is NULL). So testing if "buffer_jbd(bh)" is true can't guarantee "bh->b_private" is not NULL under the abnormal test case. Signed-off-by: Xianting Tian --- fs/jbd2/journal.c | 2 +- 1 file changed, 1 in

[PATCH] jbd2: fix incorrect code style

2020-07-18 Thread Xianting Tian
Remove unnecessary blank. Signed-off-by: Xianting Tian --- fs/jbd2/journal.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index e494443..5eccf8c 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1285,7 +1285,7

[PATCH] scsi: virtio_scsi: remove unnecessary condition check

2020-07-09 Thread Xianting Tian
kmem_cache_destroy and mempool_destroy can correctly handle null pointer parameter, so there is no need to check if the parameter is null before calling kmem_cache_destroy and mempool_destroy. Signed-off-by: Xianting Tian --- drivers/scsi/virtio_scsi.c | 12 1 file changed, 4

[PATCH] scsi: virtio_scsi: remove unnecessary condition check

2020-07-09 Thread Xianting Tian
kmem_cache_destroy can correctly handle null pointer parameter, so there is no need to check if the parameter is null before calling kmem_cache_destroy. Signed-off-by: Xianting Tian --- drivers/scsi/virtio_scsi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH] direct-io: pass correct argument to dio_complete

2020-06-08 Thread Xianting Tian
DIO_COMPLETE_ASYNC); Make the code logically with this patch and cover above scenario. Signed-off-by: Xianting Tian --- fs/direct-io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index 1543b5a..552459f 100644 --- a/fs/direct-io.c +++ b/fs/direct

[PATCH] timers: Use set_current_state macro

2020-05-14 Thread Xianting Tian
Use set_current_state macro instead of current->state = TASK_RUNNING Signed-off-by: Xianting Tian --- kernel/time/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 4820823..b9ecf87 100644 --- a/kernel/time/timer.c ++

[PATCH] timers: use set_current_state macro

2020-05-07 Thread Xianting Tian
Use set_current_state macro instead of current->state = TASK_RUNNING. Signed-off-by: Xianting Tian --- kernel/time/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index a5221abb4..7c6d42755 100644 --- a/kernel/time/time

[PATCH] sched/fair: Fix typo in comment

2020-05-06 Thread Xianting Tian
check_prempt_curr() -> check_preempt_curr() Signed-off-by: Xianting Tian --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 02f323b85..458ab5521 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fai