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
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
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
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
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
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
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
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
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
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
,
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
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
__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(-)
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
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
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
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
-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
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
-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
-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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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(+
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/
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
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
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
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
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
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
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
.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
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
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
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
().
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
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
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
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
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
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
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
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
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
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
/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
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 +
] 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
(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
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
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
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
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
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
++
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
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
69 matches
Mail list logo