Re: [PATCH 1/4] selftests: ntsync: fix the wrong condition in wake_all

2025-03-16 Thread Su Hui
On 2025/3/16 04:29, Elizabeth Figura wrote: On Saturday, 15 March 2025 04:39:46 CDT Dan Carpenter wrote: On Fri, Mar 14, 2025 at 05:13:50PM -0500, Elizabeth Figura wrote: On Friday, 14 March 2025 05:14:30 CDT Su Hui wrote: On 2025/3/14 17:21, Dan Carpenter wrote: On Fri, Mar 14, 2025 at 03

Re: [PATCH 1/4] selftests: ntsync: fix the wrong condition in wake_all

2025-03-14 Thread Su Hui
On 2025/3/14 18:14, Su Hui wrote: On 2025/3/14 17:21, Dan Carpenter wrote: On Fri, Mar 14, 2025 at 03:14:51PM +0800, Su Hui wrote: When 'manual=false' and 'signaled=true', then expected value when using NTSYNC_IOC_CREATE_EVENT should be greater than zero. Fix this typo e

[PATCH 3/4] selftests: ntsync: update config

2025-03-14 Thread Su Hui
ntsync should be tested when CONFIG_NTSYNC is setting rather than CONFIG_WINESYNC, correct this. Signed-off-by: Su Hui --- tools/testing/selftests/drivers/ntsync/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/drivers/ntsync/config b/tools

[PATCH 2/4] selftests: ntsync: avoid possible overflow in 32-bit machine

2025-03-14 Thread Su Hui
ip:0 error:0 There is an overflow about 'timeout'. 'timespec->tv_sec' is 4 bytes in 32-bit machine. And 'timeout.tv_sec * 10' causing the overflow problem, adding a cast to avoid this problem. Signed-off-by: Su Hui --- tools/testing/selftests/drivers/

[PATCH 1/4] selftests: ntsync: fix the wrong condition in wake_all

2025-03-14 Thread Su Hui
When 'manual=false' and 'signaled=true', then expected value when using NTSYNC_IOC_CREATE_EVENT should be greater than zero. Fix this typo error. Signed-off-by: Su Hui --- tools/testing/selftests/drivers/ntsync/ntsync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] sched: remove the redundant comments

2021-04-12 Thread Hui Su
Since the commit 55627e3cd22c ("sched/core: Remove rq->cpu_load[]"), we don't need this any more. Signed-off-by: Hui Su --- kernel/sched/sched.h | 5 - 1 file changed, 5 deletions(-) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 10a1522b1e30..2232022

Re: [PATCH v4 7/7] fs/xfs: Add dedupe support for fsdax

2021-04-08 Thread Su Yue
ock2_io_mmap( else xfs_lock_two_inodes(ip1, XFS_MMAPLOCK_EXCL, ip2, XFS_MMAPLOCK_EXCL); + + if (IS_DAX(inode1) && IS_DAX(inode2)) + ret = xfs_break_two_dax_layouts(inode1, inode2); + ret is ignored here. -- Su

Re: build failure of malta_qemu_32r6_defconfig

2021-04-07 Thread YunQiang Su
day.h:57:2: error: the register 'lo' > cannot be clobbered in 'asm' for the current target >57 | asm volatile( > | ^~~ > > Any idea how to fix this? Please ignore if it has been reported before. > > > -- > Regards > Sudip -- YunQiang Su

Re: [PATCH 2/2] blktrace: limit allowed total trace buffer size

2021-03-29 Thread Su Yue
The priority of '<<' is lower than '/', right? :) -- Su + if (buf_size < PAGE_SIZE) + buf_size = PAGE_SIZE; + buf_nr = req_pages << PAGE_SHIFT / buf_size; + if (buf_nr == 0) +

Re: [PATCH v3] binfmt_misc: pass binfmt_misc flags to the interpreter

2021-02-22 Thread YunQiang Su
gt; >> --persistent no --preserve-argv0 no > >># systemctl restart systemd-binfmt.service > >># cat /proc/sys/fs/binfmt_misc/qemu-ppc > >>enabled > >>interpreter //qemu-ppc > >>

Re: [RFC PATCH v5 0/4] add simple copy support

2021-02-21 Thread Su Yue
On Fri 19 Feb 2021 at 20:45, SelvaKumar S wrote: This patchset tries to add support for TP4065a ("Simple Copy Command"), v2020.05.04 ("Ratified") The Specification can be found in following link. https://nvmexpress.org/wp-content/uploads/NVM-Express-1.4-Ratified-TPs-1.zip 404 not found

[PATCH] lib/stackdepot.c: fix the compile warning

2021-02-02 Thread Hui Su
sed_result [-Wunused-result] 154 | kstrtobool(str, &stack_depot_disable); | ^ Signed-off-by: Hui Su --- lib/stackdepot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index cc21116512a7

[PATCH v4] can: mcp251xfd: replace sizeof(u32) with val_bytes in regmap

2021-01-22 Thread Su Yanjun
The sizeof(u32) is hardcoded. It's better to use the config value in regmap. It increases the size of target object, but it's flexible when new mcp chip need other val_bytes. Signed-off-by: Su Yanjun --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 9 ++--- 1 file changed, 6

Re: [PATCH v1] can: mcp251xfd: Add some sysfs debug interfaces for registers r/w

2021-01-22 Thread Su
在 2021/1/22 下午3:22, Marc Kleine-Budde 写道: On 1/22/21 7:22 AM, Su Yanjun wrote: When i debug mcp2518fd, some method to track registers is needed. This easy debug interface will be ok. NACK As the driver uses regmap, everything should be there already. To read use: | cat /sys/kernel/debug

Re: [PATCH v1] can: mcp251xfd: use regmap_bulk_write for compatibility

2021-01-22 Thread Su
在 2021/1/22 下午3:26, Marc Kleine-Budde 写道: On 1/22/21 4:02 AM, Su Yanjun wrote: Recently i use mcp2518fd on 4.x kernel which multiple write is not backported, regmap_raw_write will cause old kernel crash because the tx buffer in driver is smaller then 2K. Use regmap_bulk_write instead for

[PATCH v1] can: mcp251xfd: Add some sysfs debug interfaces for registers r/w

2021-01-21 Thread Su Yanjun
When i debug mcp2518fd, some method to track registers is needed. This easy debug interface will be ok. For example, read a register at 0xe00: echo 0xe00 > can_get_reg cat can_get_reg write a register at 0xe00: echo 0xe00,0x60 > can_set_reg Signed-off-by: Su Yanjun --- .../net/c

[PATCH v3] can: mcp251xfd: replace sizeof(u32) with val_bytes in regmap

2021-01-21 Thread Su Yanjun
The sizeof(u32) is hardcoded. It's better to use the config value in regmap. It increases the size of target object, but it's flexible when new mcp chip need other val_bytes. Signed-off-by: Su Yanjun --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 9 ++--- 1 file changed, 6

[PATCH v1] can: mcp251xfd: use regmap_bulk_write for compatibility

2021-01-21 Thread Su Yanjun
Recently i use mcp2518fd on 4.x kernel which multiple write is not backported, regmap_raw_write will cause old kernel crash because the tx buffer in driver is smaller then 2K. Use regmap_bulk_write instead for compatibility. Signed-off-by: Su Yanjun --- drivers/net/can/spi/mcp251xfd/mcp251xfd

Re: [PATCH v2] can: mcp251xfd: replace sizeof(u32) with val_bytes in regmap

2021-01-21 Thread Su
The sizeof(u32) is hardcoded. IMO it's better to use the config value in regmap. Thanks 在 2021/1/21 下午5:21, Marc Kleine-Budde 写道: On Thu, Jan 21, 2021 at 05:10:05PM +0800, Su Yanjun wrote: Please describe why you change this. No functional effect. Not quite: scripts/bloat-o-meter

[PATCH v2] can: mcp251xfd: replace sizeof(u32) with val_bytes in regmap

2021-01-21 Thread Su Yanjun
No functional effect. Signed-off-by: Su Yanjun --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c index

[PATCH v1] can: mcp251xfd: replace sizeof(u32) with val_bytes in regmap

2021-01-21 Thread Su Yanjun
No functional effect. Signed-off-by: Su Yanjun --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c index

[tip: sched/core] sched: Use task_current() instead of 'rq->curr == p'

2021-01-14 Thread tip-bot2 for Hui Su
The following commit has been merged into the sched/core branch of tip: Commit-ID: 65bcf072e20ed7597caa902f170f293662b0af3c Gitweb: https://git.kernel.org/tip/65bcf072e20ed7597caa902f170f293662b0af3c Author:Hui Su AuthorDate:Sat, 31 Oct 2020 01:32:23 +08:00 Committer

Re: [PATCH] mm/page_alloc: remove the static for local variable node_order

2020-12-30 Thread Hui Su
Hi, Matthew: On Wed, Dec 30, 2020 at 12:42:33PM +, Matthew Wilcox wrote: > On Wed, Dec 30, 2020 at 07:40:14PM +0800, Hui Su wrote: > > local variable node_order do not need the static here. > > It bloody well does. It can be up to 2^10 entries on x86 (and larger > on

[PATCH] mm/page_alloc: remove the static for local variable node_order

2020-12-30 Thread Hui Su
local variable node_order do not need the static here. Signed-off-by: Hui Su --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index bdbec4c98173..45e049ccf117 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5864,7

Re: [blokc/blk] d828aefa7a: xfstests.xfs.372.fail

2020-12-28 Thread Hui Su
map_sg()") > url: > https://github.com/0day-ci/linux/commits/Hui-Su/blokc-blk-merge-remove-the-next_bvec-label-in-__blk_bios_map_sg/20201223-202618 > base: https://git.kernel.org/cgit/linux/kernel/git/axboe/linux-block.git > for-next > > in testcase: xfstests > version:

[PATCH v2] blokc/blk-merge: remove the next_bvec label in __blk_bios_map_sg()

2020-12-23 Thread Hui Su
remove the next_bvec label in __blk_bios_map_sg(), simplify the logic of traversal bvec. Signed-off-by: Hui Su --- block/blk-merge.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 808768f6b174..aa113cbc0f35 100644 --- a

Re: [PATCH] blokc/blk-merge: remove the next_bvec label in __blk_bios_map_sg()linux-bl...@vger.kernel.org (open list:BLOCK LAYER)

2020-12-23 Thread Hui Su
On Wed, Dec 23, 2020 at 08:33:07AM +, Christoph Hellwig wrote: > On Wed, Dec 23, 2020 at 12:31:58PM +0800, sh wrote: > > remove the next_bvec label in __blk_bios_map_sg(), simplify the logic > > of traversal bvec. > > What makes you believe that this simplifies anything? 1. this change remove

Re: [PATCH] blokc/blk-merge: remove the next_bvec label in __blk_bios_map_sg()linux-bl...@vger.kernel.org (open list:BLOCK LAYER)

2020-12-23 Thread Hui Su
Hi, all: Please ignore this change, i will resend a patch V2 later.

[PATCH] mm/buffer.c: remove the macro check in check_irqs_on()

2020-12-22 Thread Hui Su
The macro irqs_disabled is always defined in include/linux/irqflags.h, so we don't need the macro check. Signed-off-by: Hui Su --- fs/buffer.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 32647d2011df..34b505542d96 100644 --- a/fs/buffer.c +++

[PATCH] mm/memcontrol: remove the unnecessary rcu_read_[un]lock

2020-12-16 Thread Hui Su
the rcu_read_lock and rcu_read_unlock is unnecessary in: lock_page_lruvec() lock_page_lruvec_irq() lock_page_lruvec_irqsave() Signed-off-by: Hui Su --- mm/memcontrol.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index

[tip: core/rcu] docs/rcu: Update the call_rcu() API

2020-12-13 Thread tip-bot2 for Hui Su
The following commit has been merged into the core/rcu branch of tip: Commit-ID: c386e29d43728778ddd642fa73cc582bee684171 Gitweb: https://git.kernel.org/tip/c386e29d43728778ddd642fa73cc582bee684171 Author:Hui Su AuthorDate:Thu, 15 Oct 2020 22:13:34 +08:00 Committer

[linux-next] kernel panic when poweroff (Tree for Dec 11)

2020-12-11 Thread Hui Su
t syncing: Attempted to kill init! exitcode=0x0009 ]--- qemu-system-x86_64: terminating on signal 15 from pid 2836242 (pkill) The next tree for Dec 10 does not contain this problem, and the tree for Dec 11 can reproduce this problem stably(always panic when poweroff). Reported-by: Hui Su

[PATCH] fs/proc: make pde_get() return nothing

2020-12-10 Thread Hui Su
we don't need pde_get()'s return value, so make pde_get() return nothing Signed-off-by: Hui Su --- fs/proc/internal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 917cc85e3466..0abbd93a4a08 100644 --- a/fs/proc/

Re: [PATCH] mm/page_alloc: simplify kmem cgroup charge/uncharge code

2020-12-08 Thread Hui Su
On Mon, Dec 07, 2020 at 09:28:46AM -0800, Shakeel Butt wrote: > On Mon, Dec 7, 2020 at 6:22 AM Hui Su wrote: > > The reason to keep __memcg_kmem_[un]charge_page functions is that they > were called in the very hot path. Can you please check the performance > impact of your ch

[PATCH] mm/page_alloc: simplify kmem cgroup charge/uncharge code

2020-12-07 Thread Hui Su
Since the commit 60cd4bcd6238 ("memcg: localize memcg_kmem_enabled() check"), we have supplied the api which users don't have to explicitly check memcg_kmem_enabled(). Signed-off-by: Hui Su --- mm/page_alloc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-)

[PATCH][next] arm64: fix the mm build error in mm/kfence/core.c

2020-12-05 Thread Hui Su
function ‘set_memory_valid’ [-Werror=implicit-function-declaration] 12 | set_memory_valid(addr, 1, !protect); | ^~~~ cc1: some warnings being treated as errors which introduced by commit d54febeba2ff ("kfence: use pt_regs to generate stack trace on faults"). Signed-off-

[PATCH] MIPS: Enable GCOV

2020-12-02 Thread Xingxing Su
arch/mips/boot/compressed/string.o: in function `_GLOBAL__sub_D_00100_1_memcpy': string.c:(.text.exit+0x0): undefined reference to `__gcov_exit' ... Signed-off-by: Youling Tang Signed-off-by: Xingxing Su --- arch/mips/Kconfig | 1 + arch/mips/boot/compressed/Makefile |

[PATCH] selftest/vm: Fix build error

2020-12-01 Thread Xingxing Su
ABLE_WRITE) ^ protection_keys.c:218:45: error: ‘PKEY_DISABLE_WRITE’ undeclared pkey_assert(flags & (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE)); ^ Signed-off-by: Xingxing Su --- tools/testing/selftests/vm/Makefile | 4 1 file changed, 4 insertions(

[PATCH v2] selftests/clone3: Fix build error

2020-11-26 Thread Xingxing Su
; i++) { ^ test_core.c:87:2: note: use option -std=c99 or -std=gnu99 to compile Add -std=gnu99 to the clone3 selftest Makefile to fix this. Signed-off-by: Xingxing Su Acked-by: Christian Brauner --- tools/testing/selftests/clone3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/to

[PATCH] selftests/clone3: Add gun99 to compile in Makefile.

2020-11-25 Thread Xingxing Su
ode Signed-off-by: Xingxing Su --- tools/testing/selftests/clone3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/clone3/Makefile b/tools/testing/selftests/clone3/Makefile index ef7564c..88354a8 100644 --- a/tools/testing/selftests/clone3/Makef

[PATCH] rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch.

2020-11-24 Thread Xingxing Su
' collect2: error: ld returned 1 exit status make: *** [/selftests/rseq/param_test_benchmark] Error 1 Signed-off-by: Xingxing Su --- tools/testing/selftests/rseq/param_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/rseq/param_test.c b/t

[PATCH] mm/compaction: make defer_compaction and compaction_deferred static

2020-11-23 Thread Hui Su
defer_compaction() and compaction_deferred() and compaction_restarting() in mm/compaction.c won't be used in other files, so make them static, and remove the declaration in the header file. Take the chance to fix a typo. Signed-off-by: Hui Su --- include/linux/compaction.h

Re: + mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode.patch added to -mm tree

2020-11-20 Thread Hui Su
>c) Ideally: find the original patch on the mailing list and do a > > reply-to-all to that, adding suitable additional cc's > > > > *** Remember to use Documentation/process/submit-checklist.rst when testing > > your code *** > > > > The -mm

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-20 Thread Hui Su
On Tue, Nov 17, 2020 at 05:59:00PM +, Matthew Wilcox wrote: > On Wed, Nov 18, 2020 at 01:56:58AM +0800, Hui Su wrote: > > On Tue, Nov 17, 2020 at 05:47:27PM +, Matthew Wilcox wrote: > > > On Wed, Nov 18, 2020 at 01:46:33AM +0800, Hui Su wrote: > > > > On T

[tip: x86/cleanups] x86/dumpstack: Make show_trace_log_lvl() static

2020-11-17 Thread tip-bot2 for Hui Su
The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 09a217c10504bcaef911cf2af74e424338efe629 Gitweb: https://git.kernel.org/tip/09a217c10504bcaef911cf2af74e424338efe629 Author:Hui Su AuthorDate:Fri, 13 Nov 2020 21:39:43 +08:00 Committer

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
On Tue, Nov 17, 2020 at 05:59:00PM +, Matthew Wilcox wrote: > On Wed, Nov 18, 2020 at 01:56:58AM +0800, Hui Su wrote: > > On Tue, Nov 17, 2020 at 05:47:27PM +, Matthew Wilcox wrote: > > > On Wed, Nov 18, 2020 at 01:46:33AM +0800, Hui Su wrote: > > > > On T

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
On Tue, Nov 17, 2020 at 05:41:17PM +, Matthew Wilcox wrote: > On Wed, Nov 18, 2020 at 01:12:42AM +0800, Hui Su wrote: > > lru_list lru bit 0 can tell whether the list is > > avtive lru-list or not. > > lru_list lru bit 1 can tell whether the list is > > file lru-li

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
On Tue, Nov 17, 2020 at 05:47:27PM +, Matthew Wilcox wrote: > On Wed, Nov 18, 2020 at 01:46:33AM +0800, Hui Su wrote: > > On Tue, Nov 17, 2020 at 05:41:17PM +, Matthew Wilcox wrote: > > > On Wed, Nov 18, 2020 at 01:12:42AM +0800, Hui Su wrote: > > > > lru_l

[PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
lru_list lru bit 0 can tell whether the list is avtive lru-list or not. lru_list lru bit 1 can tell whether the list is file lru-list or not. And fix some define type in shrink_active_list() and get_scan_count(). v1->v2: correct the commit message, and fix the define type. Signed-off-by: Hui

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
On Wed, Nov 18, 2020 at 12:49:19AM +0800, Hui Su wrote: > page->lru bit 0 can tell whether the page is > avtive page or not. > page->lru bit 1 can tell whether the page is > file page or not. > > Signed-off-by: Hui Su > --- > include/linux/mmzone.h | 4 ++-- > 1

[PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
page->lru bit 0 can tell whether the page is avtive page or not. page->lru bit 1 can tell whether the page is file page or not. Signed-off-by: Hui Su --- include/linux/mmzone.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include

[PATCH] namespace: make timens_on_fork() return nothing

2020-11-17 Thread Hui Su
timens_on_fork() always return 0, and maybe not need to judge the return value in copy_namespaces(). So make timens_on_fork() return nothing and do not judge its return val in copy_namespaces(). Signed-off-by: Hui Su --- include/linux/time_namespace.h | 6 +++--- kernel/nsproxy.c

Re: [PATCH] namespace: make timens_on_fork() return nothing

2020-11-17 Thread Hui Su
Please ignore this change.

[PATCH v2] namespace: make timens_on_fork() return nothing

2020-11-17 Thread Hui Su
timens_on_fork() always return 0, and maybe not need to judge the return value in copy_namespaces(). So make timens_on_fork() return nothing and do not judge its return val in copy_namespaces(). Signed-off-by: Hui Su --- include/linux/time_namespace.h | 6 +++--- kernel/nsproxy.c

Re: [PATCH] nsproxy: remove judge of timens_on_fork()'s return val

2020-11-17 Thread Hui Su
On Tue, Nov 17, 2020 at 12:30:26AM -0800, Andrey Vagin wrote: > On Sun, Nov 15, 2020 at 10:36 AM Hui Su wrote: > > > > timens_on_fork() always return 0, and maybe not > > need to judge the return value in copy_namespaces(). > > Thank you for cleaning this up. I think

Re: + mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode.patch added to -mm tree

2020-11-17 Thread Hui Su
l to that, adding suitable additional cc's > > > > > > *** Remember to use Documentation/process/submit-checklist.rst when > > > testing your code *** > > > > > > The -mm tree is included into linux-next and is updated > > > there every

[PATCH] mm/compaction: move compaction_suitable's comment to right place

2020-11-16 Thread Hui Su
Since commit 837d026d560c ("mm/compaction: more trace to understand when/why compaction start/finish"), the comment place is not suitable. So move compaction_suitable's comment to right place. Signed-off-by: Hui Su --- mm/compaction.c | 14 +++--- 1 file changed, 7 i

[PATCH] nsproxy: remove judge of timens_on_fork()'s return val

2020-11-15 Thread Hui Su
timens_on_fork() always return 0, and maybe not need to judge the return value in copy_namespaces(). Signed-off-by: Hui Su --- kernel/nsproxy.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c index 12dd41b39a7f..e2e6c5dc433f 100644

[PATCH] nsproxy: use put_nsproxy() in switch_task_namespaces()

2020-11-15 Thread Hui Su
Use put_nsproxy() instead of ' if (atomic_dec_and_test(&ns->count)) { free_nsproxy(ns); }' in switch_task_namespaces(). and remove the whitespace by the way. Signed-off-by: Hui Su --- kernel/nsproxy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

[PATCH] mm/shmem: use kmem_cache_zalloc in shmem_alloc_inode()

2020-11-15 Thread Hui Su
_inode(). Signed-off-by: Hui Su --- mm/shmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 537c137698f8..b84adda45461 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2308,7 +2308,6 @@ static struct inode *shmem_get_inode(struct super_block *sb,

[PATCH v3] mm/shmem.c: make shmem_mapping() inline

2020-11-15 Thread Hui Su
unc declaration in shmem_fs.h v2->v3: make shmem_aops global, and export it to modules. Signed-off-by: Hui Su --- include/linux/shmem_fs.h | 6 +- mm/shmem.c | 16 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/linux/shmem_fs.h b/include/l

Re: [PATCH v2] mm/shmem.c: make shmem_mapping() inline

2020-11-15 Thread Hui Su
On Sat, Nov 14, 2020 at 10:50:39AM -0800, Andrew Morton wrote: > On Sat, 14 Nov 2020 13:51:34 +0800 Hui Su wrote: > > > inline the shmem_mapping(), and use shmem_mapping() > > instead of 'inode->i_mapping->a_ops == &shmem_aops' > > in shmem_evict_in

[PATCH v2] mm/shmem.c: make shmem_mapping() inline

2020-11-13 Thread Hui Su
inline the shmem_mapping(), and use shmem_mapping() instead of 'inode->i_mapping->a_ops == &shmem_aops' in shmem_evict_inode(). v1->v2: remove the inline for func declaration in shmem_fs.h Reviewed-by: Pankaj Gupta Reported-by: kernel test robot Signed-off-by: Hui

Re: [PATCH] mm/shmem.c: make shmem_mapping() inline

2020-11-13 Thread Hui Su
On Sat, Nov 14, 2020 at 12:54:47AM +0800, kernel test robot wrote: > Hi Hui, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on mmotm/master] > > url: > https://github.com/0day-ci/linux/commits/Hui-Su/mm-shmem-c-make-shmem

[PATCH] mm/shmem.c: make shmem_mapping() inline

2020-11-13 Thread Hui Su
inline the shmem_mapping(), and use shmem_mapping() instead of 'inode->i_mapping->a_ops == &shmem_aops' in shmem_evict_inode(). Signed-off-by: Hui Su --- include/linux/shmem_fs.h | 2 +- mm/shmem.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)

[PATCH] mm/page_counter: use page_counter_read in page_counter_set_max

2020-11-13 Thread Hui Su
use page_counter_read() in page_counter_set_max(). Signed-off-by: Hui Su --- mm/page_counter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/page_counter.c b/mm/page_counter.c index b24a60b28bb0..c6860f51b6c6 100644 --- a/mm/page_counter.c +++ b/mm/page_counter.c

[PATCH] x86/dumpstack: make show_trace_log_lvl() static

2020-11-13 Thread Hui Su
show_trace_log_lvl() won't be used by other files, so make it static and remove the declaration from the header file. Signed-off-by: Hui Su --- arch/x86/include/asm/stacktrace.h | 3 --- arch/x86/kernel/dumpstack.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a

[PATCH] fs/kernfs: remove the double check of dentry->inode

2020-11-13 Thread Hui Su
In both kernfs_node_from_dentry() and in kernfs_dentry_node(), we will check the dentry->inode is NULL or not, which is superfluous. So remove the check in kernfs_node_from_dentry(). Signed-off-by: Hui Su --- fs/kernfs/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --gi

[tip: sched/core] sched/fair: Remove superfluous lock section in do_sched_cfs_slack_timer()

2020-11-11 Thread tip-bot2 for Hui Su
The following commit has been merged into the sched/core branch of tip: Commit-ID: cdb310474dece99985e4cdd2b96b1324e39c1c9d Gitweb: https://git.kernel.org/tip/cdb310474dece99985e4cdd2b96b1324e39c1c9d Author:Hui Su AuthorDate:Fri, 30 Oct 2020 22:46:21 +08:00 Committer

[PATCH v2] mm/memcontrol:rewrite mem_cgroup_page_lruvec()

2020-11-08 Thread Hui Su
;mem_cgroup'. Acked-by: Michal Hocko Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Signed-off-by: Hui Su --- include/linux/memcontrol.h | 16 +-- mm/memcontrol.c| 40 -- 2 files changed, 14 insertions(+), 42 deletions(-) diff

[PATCH] cgroup/cgroup.c: replace 'of->kn->priv' with of_cft()

2020-11-06 Thread Hui Su
we have supplied the inline function: of_cft() in cgroup.h. So replace the direct use 'of->kn->priv' with inline func of_cft(), which is more readable. Signed-off-by: Hui Su --- kernel/cgroup/cgroup.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH] mm/memcontrol: replace '== root_mem_cgroup' with mem_cgroup_is_root

2020-11-04 Thread Hui Su
We have supplied the inline func: mem_cgroup_is_root(). So we may use mem_cgroup_is_root() instead of using 'memcg == root_mem_cgroup' or 'memcg != root_mem_cgroup' directly, which is more readable. Signed-off-by: Hui Su --- mm/memcontrol.c | 16 1 file c

[PATCH] mm/memcontrol:rewrite mem_cgroup_page_lruvec()

2020-11-04 Thread Hui Su
mem_cgroup_page_lruvec() in memcontrol.c and mem_cgroup_lruvec() in memcontrol.h is very similar except for the param(page and memcg) which also can be convert to each other. So rewrite mem_cgroup_page_lruvec() with mem_cgroup_lruvec(). Signed-off-by: Hui Su --- include/linux/memcontrol.h | 18

[PATCH] Docs/cgroup: update the cgroup-v1 docs

2020-11-02 Thread Hui Su
;cgroup: kill cgroup_[un]lock()"), cgroup_lock/cgroup_unlock have been killed. So update the cgroup-v1 Docs. Signed-off-by: Hui Su --- Documentation/admin-guide/cgroup-v1/cgroups.rst | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Documentation/admin-guide/cg

Re: [PATCH] sched/fair: remove the spin_lock operations

2020-11-02 Thread Hui Su
On Mon, Nov 02, 2020 at 08:53:41AM -0500, Phil Auld wrote: > On Fri, Oct 30, 2020 at 10:16:29PM + David Laight wrote: > > From: Benjamin Segall > > > Sent: 30 October 2020 18:48 > > > > > > Hui Su writes: > > > > > > > Since 

[PATCH] mm: define flags using bit numbers

2020-10-30 Thread Hui Su
These flag is meant the bit numbers, they are used like '(type & SLOTS_CACHE)' and so on. Define these flags using bit numbers instead of hardcoding powers of 2, which maybe better. No change in the actual values. Signed-off-by: Hui Su --- mm/swap_slots.c | 4 ++-- mm/sw

[PATCH v4] mm/oom_kill: change comment and rename is_dump_unreclaim_slabs()

2020-10-30 Thread Hui Su
Change the comment of is_dump_unreclaim_slabs(), it just check whether nr_unreclaimable slabs amount is greater than user memory, and explain why we dump unreclaim slabs. Rename it to should_dump_unreclaim_slab() maybe better. Signed-off-by: Hui Su --- mm/oom_kill.c | 14 -- 1 file

[PATCH] sched: use task_current() instead of 'rq->curr == p'

2020-10-30 Thread Hui Su
We have supplied the macro: 'task_current()', and we should all use task_current() instaed of 'rq->curr == p', which is more readable. No functional change. Signed-off-by: Hui Su --- kernel/sched/deadline.c | 2 +- kernel/sched/debug.c| 2 +- kernel/sched/fair.c

[PATCH] sched/fair: remove the spin_lock operations

2020-10-30 Thread Hui Su
Since 'ab93a4bc955b ("sched/fair: Remove distribute_running fromCFS bandwidth")',there is nothing to protect between raw_spin_lock_irqsave/store() in do_sched_cfs_slack_timer(). So remove it. Signed-off-by: Hui Su --- kernel/sched/fair.c | 3 --- 1 file changed, 3 deleti

[PATCH v3] mm/oom_kill: remove comment and rename is_dump_unreclaim_slabs()

2020-10-28 Thread Hui Su
er to should_dump_unreclaim_slabs which should make it clear what it is meant to do and drop the comment as the purpose should be pretty evident now. Signed-off-by: Hui Su Acked-by: Michal Hocko --- mm/oom_kill.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git

Re: [PATCH] mm/list_lru: optimize condition of exiting the loop

2020-10-27 Thread Hui Su
On Tue, Oct 27, 2020 at 07:45:53PM +0100, Vlastimil Babka wrote: > On 10/27/20 6:04 PM, Hui Su wrote: > > In list_lru_walk(), nr_to_walk type is 'unsigned long', > > so nr_to_walk won't be '< 0'. > > > > In list_lru_walk_node(), nr_to_walk ty

[PATCH] mm/list_lru: optimize condition of exiting the loop

2020-10-27 Thread Hui Su
In list_lru_walk(), nr_to_walk type is 'unsigned long', so nr_to_walk won't be '< 0'. In list_lru_walk_node(), nr_to_walk type is 'unsigned long', so *nr_to_walk won't be '< 0' too. We can use '!nr_to_walk' instead of 'nr_to_

[PATCH] sched/group_sched: add task_group_is_root() api

2020-10-27 Thread Hui Su
Use task_group_is_root() instead of '!tg->se[0]' and 'tg == &root_task_group' to judge whether a task_group is root_task_group. Signed-off-by: Hui Su --- kernel/sched/autogroup.c | 2 +- kernel/sched/core.c | 11 --- kernel/sched/fair.c |

Re: [PATCH v2] mm/oom_kill.c: remove the unmatched comments

2020-10-27 Thread Hui Su
On Tue, Oct 27, 2020 at 03:58:14PM +0100, Michal Hocko wrote: > On Tue 27-10-20 22:45:29, Hui Su wrote: > > is_dump_unreclaim_slabs() just check whether nr_unreclaimable > > slabs amount is greater than user memory, not match witch comment. > > As I've tried to e

[PATCH v2] mm/oom_kill.c: remove the unmatched comments

2020-10-27 Thread Hui Su
is_dump_unreclaim_slabs() just check whether nr_unreclaimable slabs amount is greater than user memory, not match witch comment. So delete the comment, and rename it to should_dump_unreclaim_slabs(). Signed-off-by: Hui Su --- mm/oom_kill.c | 8 ++-- 1 file changed, 2 insertions(+), 6

Re: [PATCH] mm,oom_kill: fix the comment of is_dump_unreclaim_slabs()

2020-10-27 Thread Hui Su
On Tue, Oct 27, 2020 at 08:11:18AM +0100, Michal Hocko wrote: > On Sat 26-09-20 12:15:26, Hui Su wrote: > > fix the comment of is_dump_unreclaim_slabs(), it just check > > whether nr_unreclaimable slabs amount is greater than user > > memory. > > The original comme

[PATCH] sched/rt.c: use list_is_singular() instead of '->prev != ->next'

2020-10-26 Thread Hui Su
Use the list_is_singular(&rt_se->run_list) api instead of 'rt_se->run_list.prev != rt_se->run_list.next'. Fix a comment by the way, and make the comment more clearly. Signed-off-by: Hui Su --- kernel/sched/rt.c | 8 1 file changed, 4 insertions(+), 4 deletions(

[PATCH] net/atm: use list_is_singular() in br2684_setfilt()

2020-10-26 Thread Hui Su
list_is_singular() can tell whether a list has just one entry. So we use list_is_singular() here. Signed-off-by: Hui Su --- net/atm/br2684.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 3e17a5ecaa94..398f7e086cf4 100644 --- a

[PATCH] sched/deadline: use rq_of_se intead of dl_rq_of_se and rq_of_dl_rq

2020-10-22 Thread Hui Su
(dl_rq_of_se()): dl_se ==> p ==> rq ==> dl || rq <== it looks a little redundant. So add rq_of_se(dl_se) to instead of rq_of_dl_rq(dl_rq_of_se(dl_se)). rq_of_se():dl_se ==> p ==> rq Signed-off

[PATCH] sched/deadline: remove the param struct rq in pick_next_dl_entity()

2020-10-22 Thread Hui Su
we can get the next dl_entity just from struct dl_rq, and do not need the param struct rq. So remove it. Like the change: https://lkml.org/lkml/2020/9/29/2030 Signed-off-by: Hui Su --- kernel/sched/deadline.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/sched

Re: [PATCH] tools/time: access /sys/kernel/debug/udelay_test before test.

2020-10-21 Thread Hui Su
On Tue, Oct 20, 2020 at 10:27:05AM -0700, David Riley wrote: > I don't think it's worth making debug_file_exist a separate function. It's > more clear to just do the check for the file, especially since you then log > that path in the failure case. > > On Fri, O

[PATCH v2] tools/time: access /sys/kernel/debug/udelay_test before test

2020-10-21 Thread Hui Su
Signed-off-by: Hui Su --- tools/time/udelay_test.sh | 42 ++- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/tools/time/udelay_test.sh b/tools/time/udelay_test.sh index 6779d7e55d85..c8458d5b7fcd 100755 --- a/tools/time/udelay_test.sh +++

[PATCH] sched_debug: remove the param dl_rq in print_dl_rq()

2020-10-21 Thread Hui Su
different from rt_sched_class and fair_sched_class, dl_sched_class have no sched group. We can direct get dl_rq according to cpu, so remove the param dl_rq in print_dl_rq(). Signed-off-by: Hui Su --- kernel/sched/deadline.c | 2 +- kernel/sched/debug.c| 3 ++- kernel/sched/sched.h| 2

[PATCH] block/elevator: reduce the critical section

2020-10-19 Thread Hui Su
1.reduce the critical section in elevator_get(). 2.reduce the critical section in elevator_get_by_features(). 3.remove the found variable. the elv_list_lock is used to protect the elv_list, and the operations of elevator_type does not need to be protected. Signed-off-by: Hui Su --- block

[PATCH] blk: use REQ_OP_WRITE instead of hard code

2020-10-19 Thread Hui Su
use REQ_OP_WRITE instead of hard code in op_is_write(). Signed-off-by: Hui Su --- include/linux/blk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 7d7c13238fdb..7b9b02378c24 100644 --- a/include/linux

[PATCH] docs/cpu-load: format the example code.

2020-10-18 Thread Hui Su
format the example code. Signed-off-by: Hui Su --- Documentation/admin-guide/cpu-load.rst | 63 ++ 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/Documentation/admin-guide/cpu-load.rst b/Documentation/admin-guide/cpu-load.rst index ebdecf864080

[PATCH] tools/time: access /sys/kernel/debug/udelay_test before test.

2020-10-16 Thread Hui Su
sh@ubuntu:~/workspace/linux-stable/tools/time$ sudo ./udelay_test.sh modprobe: FATAL: Module udelay_test not found in directory /lib/modules/5.4.44 ERROR, can not access /sys/kernel/debug/udelay_test. modprobe: FATAL: Module udelay_test not found. Signed-off-by: Hui Su --- tools/time/udelay_te

[PATCH] docs/rcu: update the api of call_rcu()

2020-10-15 Thread Hui Su
update the api of call_rcu() Signed-off-by: Hui Su --- Documentation/RCU/whatisRCU.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/RCU/whatisRCU.rst b/Documentation/RCU/whatisRCU.rst index c7f147b8034f..aa7d5ed20da5 100644 --- a/Documentation/RCU

[PATCH] acct.c: use #elif instead of #end and #elif

2020-10-15 Thread Hui Su
use #elif instead of #end and #elif. Signed-off-by: Hui Su --- kernel/acct.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/acct.c b/kernel/acct.c index b0c5b3a9f5af..24681372af07 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -381,9 +381,7 @@ static

[PATCH] async.c: reduce the critical region in lowest_in_progress()

2020-10-15 Thread Hui Su
The judgement of first do not need to be in the critical region. So move it out. Signed-off-by: Hui Su --- kernel/async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/async.c b/kernel/async.c index 33258e6e20f8..9d33ffcc84c7 100644 --- a/kernel/async.c +++ b/kernel

  1   2   3   >