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

2020-11-08 Thread Hui Su
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 --git a/i

[PATCH] scsi: ses: Fix crash caused by kfree an invalid pointer

2020-11-06 Thread Ding Hui
nts count is 0 We also need check index when use edev->component[] array in ses_enclosure_data_process Tested-by: Zeng Zhicong Cc: stable # 2.6.25+ Signed-off-by: Ding Hui --- drivers/scsi/ses.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/

[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 a/kernel/

[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 changed, 8 insertions

[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
k/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/cgroup-v1/cgroups.rst b/Documentation/admin-guide/c

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 'ab9

[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/swapfile.c

[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 | 6 +++--- ker

[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 deletions(-)

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

2020-10-28 Thread Hui Su
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 a/mm

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 type is 'unsigned long', &g

[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_walk <= 0', which is more precise. Signed-off-by: Hui Su ---

[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 == _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 | 4 ++-- kernel/sched/rt.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

[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 c

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

2020-10-26 Thread Hui Su
Use the list_is_singular(_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(-) diff --git

[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

[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, Oct 16, 2020 at

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

2020-10-21 Thread Hui Su
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 +++ b/tools/t

[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
:~/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_test.sh | 51

[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

[PATCH] taskstats: use family->version instead of TASKSTATS_GENL_VERSION

2020-10-14 Thread Hui Su
use family->version instead of the hrad code(TASKSTATS_GENL_VERSION). Signed-off-by: Hui Su --- kernel/taskstats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/taskstats.c b/kernel/taskstats.c index e2ac0e37c4ae..8364663ca07d 100644 --- a/kernel/taskstats.c ++

[PATCH] mm/hugetable.c: align some prints

2020-10-09 Thread Hui Su
it. Signed-off-by: Hui Su --- drivers/base/node.c | 4 ++-- mm/hugetlb.c| 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index 50af16e68d98..b5453c372c5b 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -430,8 +430,8

Re: Lenovo P50 headphone issue

2020-10-09 Thread Hui Wang
Hi Fabio, Looks like the P50 has a different codec, it is alc298, and I don't have the P50 to debug. It is better to report a bug to bugzilla against the upstream kernel and cc the realtek engineers to take a look. Regards, Hui. On 2020/10/9 下午3:14, Fabio Coatti wrote: Hi All, I'm

Re: [PATCH] sched,fair: use list_for_each_entry() in print_cfs_stats()

2020-10-08 Thread Hui Su
On Tue, Sep 29, 2020 at 11:56:42AM +0200, Dietmar Eggemann wrote: > On 25/09/2020 21:10, Hui Su wrote: > > Macro for_each_leaf_cfs_rq_safe() use list_for_each_entry_safe(), > > which can against removal of list entry, but we only > > print the cfs_rq data and won't

Re: [PATCH] mm: fix some comments in page_alloc.c and mempolicy.c

2020-10-08 Thread Hui Su
On Thu, Oct 01, 2020 at 09:17:29AM -0700, Joe Perches wrote: > On Thu, 2020-10-01 at 14:27 +0200, David Hildenbrand wrote: > > On 25.09.20 18:06, Hui Su wrote: > > > 1. the cpuset.c has been moved from kernel/cpuset.c to > > > kernel/cgroup/cpuset.c long time ag

Re: [PATCH] mm/vmalloc.c: check the addr first

2020-10-08 Thread Hui Su
On Mon, Sep 28, 2020 at 11:04:34AM -0700, Ira Weiny wrote: > On Mon, Sep 28, 2020 at 12:33:37AM +0800, Hui Su wrote: > > As the comments said, if @addr is NULL, no operation > > is performed, check the addr first in vfree() and > > vfree_atomic() maybe a better choice.

[PATCH] mm/hugetlb.c: just use put_page_testzero() instead of page_count()

2020-10-07 Thread Hui Su
we test the page reference count is zero or not here, it can be a bug here if page refercence count is not zero. So we can just use put_page_testzero() instead of page_count(). Signed-off-by: Hui Su --- mm/hugetlb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm

[PATCH] sched/rt.c remove unnecessary parameter in pick_next_rt_entity

2020-09-29 Thread Hui Su
struct rq is not necessary for pick_next_rt_entity(), we can get next sched_rt_entity just from struct rt_rq. Signed-off-by: Hui Su --- kernel/sched/rt.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index f215eea6a966

[PATCH] sched/rt.c: handle exceptions gracefully

2020-09-28 Thread Hui Su
handle exceptions gracefully, and avoid using if (0) . Signed-off-by: Hui Su --- kernel/sched/rt.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index f215eea6a966..1dd6cbd67e6e 100644 --- a/kernel/sched/rt.c +++ b/kernel

[PATCH] arch/x86: fix some typos in xen_pagetable_p2m_free()

2020-09-27 Thread Hui Su
arch/x86: fix some typos in xen_pagetable_p2m_free(): s/Fortunatly/Fortunately Signed-off-by: Hui Su --- arch/x86/xen/mmu_pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index 3273c985d3dd..fbee8f50088b 100644 --- a/arch/x86

[PATCH] mm/vmalloc.c: fix the comment of find_vm_area

2020-09-27 Thread Hui Su
fix the comment of find_vm_area() and get_vm_area() Signed-off-by: Hui Su --- mm/vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index be4724b916b3..a2d7900024be 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2133,7 +2133,7

[PATCH] mm/vmalloc.c: check the addr first

2020-09-27 Thread Hui Su
As the comments said, if @addr is NULL, no operation is performed, check the addr first in vfree() and vfree_atomic() maybe a better choice. Signed-off-by: Hui Su --- mm/vmalloc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index

[PATCH] sched/idle.c: fix comment in cpuidle_idle_call()

2020-09-27 Thread Hui Su
There is some typos in cpuidle_idle_call(), so fix it. s/stratight/straight Signed-off-by: Hui Su --- kernel/sched/idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index f324dc36fc43..4710fef20678 100644 --- a/kernel/sched

[PATCH] arch/x86: fix the comment of perf_sched_init()

2020-09-27 Thread Hui Su
fix the comment of perf_sched_init(): interator --> iterator Signed-off-by: Hui Su --- arch/x86/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 1cbf57dc2ac8..74d430b31d78 100644 --- a/arch/x86/events/cor

[PATCH] mm/vmscan: fix comments for isolate_lru_page()

2020-09-27 Thread Hui Su
fix comments for isolate_lru_page(): s/fundamentnal/fundamental Signed-off-by: Hui Su --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 466fc3144fff..def9d2b3057b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1751,7 +1751,7

[PATCH] radix-tree: fix the comment of radix_tree_next_slot()

2020-09-27 Thread Hui Su
fix the comment of radix_tree_next_slot(): interator --> iterator. Signed-off-by: Hui Su --- include/linux/radix-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index c2a9f7c90727..03591b18215f 100

[PATCH] mm/vmalloc.c: update the comment in __vmalloc_area_node()

2020-09-27 Thread Hui Su
since c67dc624757 commit, the __vunmap() have been changed to __vfree(), so update the confusing comment(). Signed-off-by: Hui Su --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index be4724b916b3..689e7ef08a5d 100644 --- a/mm

[PATCH] mm,z3fold: use xx_zalloc instead xx_alloc and memset

2020-09-26 Thread Hui Su
alloc_slots() allocate memory for slots by kmem_cache_alloc(), then memset it, we can just use kmem_cache_zalloc() api. Signed-off-by: Hui Su --- mm/z3fold.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index 460b0feced26..18feaa0bc537 100644

[PATCH] mm,slab_common: use list_for_each_entry in dump_unreclaimable_slab()

2020-09-25 Thread Hui Su
dump_unreclaimable_slab() acquires the slab_mutex first, and it won't remove any slab_caches list entry when itering the slab_caches lists. Thus, we do not need list_for_each_entry_safe here, which is against removal of list entry. Signed-off-by: Hui Su --- mm/slab_common.c | 4 ++-- 1 file

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

2020-09-25 Thread Hui Su
fix the comment of is_dump_unreclaim_slabs(), it just check whether nr_unreclaimable slabs amount is greater than user memory. Signed-off-by: Hui Su --- mm/oom_kill.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index e90f25d6385d

[PATCH] sched,fair: use list_for_each_entry() in print_cfs_stats()

2020-09-25 Thread Hui Su
() in print_cfs_stats(). Signed-off-by: Hui Su --- kernel/sched/fair.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 1a68a0536add..d40dfb4349b0 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -391,11

[PATCH] mm,kmemleak-test.c: move kmemleak-test.c to samples dir

2020-09-25 Thread Hui Su
kmemleak-test.c is just a kmemleak test module, which also can not be used as a built-in kernel module. Thus, i think it may should not be in mm dir, and move the kmemleak-test.c to samples/kmemleak/kmemleak-test.c. Fix the spelling of built-in by the way. Signed-off-by: Hui Su

[PATCH] sched,fair: fix the spelling of enqueued

2020-09-25 Thread Hui Su
just fix the spelling of enqueued. Signed-off-by: Hui Su --- 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 1a68a0536add..fadee2b05df3 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -753,7

[PATCH] mm: fix some comments in page_alloc.c and mempolicy.c

2020-09-25 Thread Hui Su
1. the cpuset.c has been moved from kernel/cpuset.c to kernel/cgroup/cpuset.c long time ago, but the comment is stale, so we update it. 2. get_page_from_freelist() may alloc many pages according to order, we may use pages for better. Signed-off-by: Hui Su --- kernel/cgroup/cpuset.c | 2 +- mm

[PATCH] FIX the comment of struct jbd2_journal_handle

2020-09-22 Thread Hui Su
the struct name was modified long ago, but the comment still use struct handle_s. Signed-off-by: Hui Su --- include/linux/jbd2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 08f904943ab2..a1ef05412acf 100644

Re: [PATCH] ALSA: hda/realtek: Enable front panel headset LED on Lenovo ThinkStation P520

2020-09-14 Thread Hui Wang
OK,  then looks fine to me. Acked-by:Hui Wang On 2020/9/14 下午4:07, Kai-Heng Feng wrote: Hi Hui, On Sep 14, 2020, at 16:04, Hui Wang wrote: Thanks Kaiheng, and we just had one P520 in the Beijing office and I also worked on this issue happenly. Does the led change according to jack

Re: [PATCH] ALSA: hda/realtek: Enable front panel headset LED on Lenovo ThinkStation P520

2020-09-14 Thread Hui Wang
On 2020/9/14 下午4:07, Kai-Heng Feng wrote: Hi Hui, On Sep 14, 2020, at 16:04, Hui Wang wrote: Thanks Kaiheng, and we just had one P520 in the Beijing office and I also worked on this issue happenly. Does the led change according to jack plugging in or plugging out with your patch

Re: [PATCH] ALSA: hda/realtek: Enable front panel headset LED on Lenovo ThinkStation P520

2020-09-14 Thread Hui Wang
Thanks Kaiheng, and we just had one P520 in the Beijing office and I also worked on this issue happenly. Does the led change according to jack plugging in or plugging out with your patch? I also prepared a patchset but my patchset has more code than yours, please take a look. :-) Thanks. Hui

RE: [kbuild-all] Re: include/asm-generic/qspinlock.h:94:9: sparse: sparse: context imbalance in '__msm_console_write' - unexpected unlock

2020-09-02 Thread Xia, Hui
unexpected unlock > >I think this is a false positive report. Let's see the locking relevant code >in >__msm_console_write(): Hi Yan, Thanks for the clarification. Please ignore this report. It was sent out unexpected. We will fix the robot bug soon. Best Regards, Hui > > __msm_co

RE: [kbuild-all] include/asm-generic/qspinlock.h:94:9: sparse: sparse: context imbalance in '__msm_console_write' - unexpected unlock

2020-09-02 Thread Xia, Hui
Please kindly ignore this mail. It is duplicated. Sorry for noise. Best Regards, Hui >-Original Message- >From: kernel test robot >Sent: 2020年9月2日 15:39 >To: Leo Yan >Cc: kbuild-...@lists.01.org; linux-kernel@vger.kernel.org; Greg Kroah-Hartman >; Jeffrey Hugo >

RE: [kbuild-all] Re: drivers/greybus/es2.c:439 message_send() error: double unlocked 'es2->cport_out_urb_lock' (orig line 417)

2020-08-24 Thread Xia, Hui
warnings: >> drivers/greybus/es2.c:441 message_send() error: double unlocked >> 'es2->cport_out_urb_lock' (orig line 439) > >None of these warnings make any sense. Is the robot drunk? Hi Johan, It is a false positive. Please kindly ignore. There was a bug in robot that sent unconfid

Re: [PATCH] xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed

2020-08-21 Thread Ding Hui
On 2020/8/21 4:44 下午, Mathias Nyman wrote: On 21.8.2020 10.31, Greg KH wrote: On Fri, Aug 21, 2020 at 03:06:52PM +0800, Ding Hui wrote: Some devices driver call libusb_clear_halt when target ep queue is not empty. (eg. spice client connected to qemu for usb redir) Before commit f5249461b504

[PATCH] xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed

2020-08-21 Thread Ding Hui
bit after xhci_endpoint_reset, even if it is failed. Signed-off-by: Ding Hui --- drivers/usb/host/xhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 3c41b14ecce7..e9884ae9c77d 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/h

Re: [PATCH] ALSA: usb-audio: Add prevent wakeup from s3 state trig by Lenovo ThinkCentre TI024Gen3 USB-audio

2020-08-19 Thread Hui Wang
launchpad.net/ubuntu/+source/linux/+filebug, then upload the needed logs,  Kai-Heng and I will help investigate this issue. Thanks, Hui. thanks, Takashi

RE: [kbuild-all] Re: drivers/vhost/net.c:1010 vhost_net_rx_peek_head_len() error: double unlocked 'sk->sk_receive_queue.lock' (orig line 1002)

2020-08-18 Thread Xia, Hui
e changed the rule to avoid send out this warning type directly. Sorry for inconvenient. > > >> Old smatch warnings: >> drivers/vhost/net.c:1528 vhost_net_set_backend() warn: passing a valid >> pointer >to 'PTR_ERR' > >this stumped me too... Ignore

RE: [kbuild-all] Re: drivers/dma/xilinx/xilinx_dpdma.c:1172 xilinx_dpdma_synchronize() error: double unlocked 'chan->vchan.lock' (orig line 1170)

2020-08-18 Thread Xia, Hui
gt;vchan.lock' (orig line 1170) > >Unless I'm mistaken, this is a false positive. I'd appreciate if someone could >check >if I'm missing something obvious. Please ignore this report. It is a false positive. We have changed the rule to avoid send out this warning type direc

[PATCH v2] mm: LMK, adjust oom_score_adj when fork a new process

2020-08-12 Thread hui yang
From: YangHui Also it rely on inheritance,But there are some things you need't inheriting if all children oom_score_adj is -1000,the oom is meaningless Signed-off-by: YangHui --- include/uapi/linux/oom.h | 1 + kernel/fork.c| 4 ++-- 2 files changed, 3 insertions(+), 2

RE: [kbuild-all] Re: drivers/input/touchscreen/elants_i2c.c:859:45: warning: Clarify calculation precedence for '&' and

2020-08-10 Thread Xia, Hui
;> ^ > >No, there is no need to clarify precedence as it is already clear. Thanks Dmitry. We will ignore this warning type. Sorry for the noise. --Hui > >Thanks. > >-- >Dmitry >___ >kbuild-all mailing list -- kbuild-...@lists.01.org To unsubscribe send an >email to >kbuild-all-le...@lists.01.org

RE: [kbuild-all] Re: fs/init.c:72:8: warning: Variable 'error' is reassigned a value before the old one has been used.

2020-08-10 Thread Xia, Hui
been used. >> error = security_path_chroot(); > >I really don't understand the warning. We assign a value to error, if there >is an >error we jump the out labe and return it, or else continue. > >That is a pretty common pattern in the kernel. What do I miss? Please ignore this repo

RE: [kbuild-all] Re: fs/fuse/virtio_fs.c:1009:6: warning: Variable 'err' is reassigned a value before the old one has been used.

2020-08-10 Thread Xia, Hui
ath, and return err. Very >fact >that we did not take that path means we are not going to use previous value of >err, hence it is ok to override it. > >IOW, this seems like a false warning from compiler. This pattern has been used >in >fuse and overlayfs code all over the place.

[RFC for qemu v4 2/2] virtio_balloon: Add dcvq to deflate continuous pages

2020-07-15 Thread Hui Zhu
This commit adds a vq dcvq to deflate continuous pages. When VIRTIO_BALLOON_F_CONT_PAGES is set, try to get continuous pages from icvq and use madvise MADV_WILLNEED with the pages. Signed-off-by: Hui Zhu --- hw/virtio/virtio-balloon.c | 14 +- include/hw/virtio/virtio

[RFC for Linux v4 1/2] virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES and inflate_cont_vq

2020-07-15 Thread Hui Zhu
This commit adds a new flag VIRTIO_BALLOON_F_CONT_PAGES to virtio_balloon. Add it adds a vq inflate_cont_vq to inflate continuous pages. When VIRTIO_BALLOON_F_CONT_PAGES is set, try to allocate continuous pages and report them use inflate_cont_vq. Signed-off-by: Hui Zhu --- drivers/virtio

[RFC for qemu v4 0/2] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_F_CONT_PAGES

2020-07-15 Thread Hui Zhu
two benefits: 1. Increase the speed of balloon inflate and deflate. 2. Decrease the splitted THPs number in the host. [1] https://github.com/teawater/linux/tree/balloon_conts [2] https://github.com/teawater/qemu/tree/balloon_conts [3] https://lkml.org/lkml/2020/5/13/1211 Hui Zhu (2

[RFC for Linux v4 0/2] virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES to report continuous pages

2020-07-15 Thread Hui Zhu
kml/2020/5/12/324 [4] https://github.com/teawater/linux/tree/balloon_conts [5] https://github.com/teawater/qemu/tree/balloon_conts [6] https://lkml.org/lkml/2020/5/13/1211 Hui Zhu (2): virtio_balloon: Add VIRTIO_BALLOON_F_CONT_PAGES and inflate_cont_vq virtio_balloon: Add deflate_cont_vq to

[RFC for qemu v4 1/2] virtio_balloon: Add cont-pages and icvq

2020-07-15 Thread Hui Zhu
the pages. Signed-off-by: Hui Zhu --- hw/virtio/virtio-balloon.c | 80 - include/hw/virtio/virtio-balloon.h | 2 +- include/standard-headers/linux/virtio_balloon.h | 1 + 3 files changed, 55 insertions(+), 28 deletions(-) diff --git

[RFC for Linux v4 2/2] virtio_balloon: Add deflate_cont_vq to deflate continuous pages

2020-07-15 Thread Hui Zhu
-by: Hui Zhu --- drivers/virtio/virtio_balloon.c| 73 include/linux/balloon_compaction.h | 3 ++ mm/balloon_compaction.c| 76 ++ 3 files changed, 144 insertions(+), 8 deletions(-) diff --git a/drivers/virtio

RE: [kbuild-all] Re: arch/x86/kvm/../../../virt/kvm/kvm_main.c:4326:17: sparse: struct kvm_vcpu Documentation Kbuild Makefile crypto include sound usr kvm_get_running_vcpus( ... )

2020-07-08 Thread Xia, Hui
27 { >> 4328 return _running_vcpu; >> 4329 } >> 4330 > >Not the first time got confused with this report - this seems to have been >fixed by >fcd07f9adc7d ("KVM: let declaration of kvm_get_running_vcpus match >implementation&

RE: [kbuild-all] Re: [PATCH v1 1/4] ide: use generic power management

2020-06-29 Thread Xia, Hui
>-Original Message- >From: Bjorn Helgaas >Sent: 2020年6月26日 23:35 >To: lkp >Cc: Vaibhav Gupta ; bj...@helgaas.com; Vaibhav >Gupta ; David S. Miller ; >kbuild-...@lists.01.org; net...@vger.kernel.org; linux-kernel@vger.kernel.org; >linux-kernel-ment...@lists.linuxfoundation.org;

[PATCH] mm: remove the redundancy code

2020-06-29 Thread Su Hui
remove the redundancy code, the zone_start_pfn is assigned from zone->zone_start_pfn Signed-off-by: Su Hui --- mm/page_alloc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3c4eb750a199..3372a8c9fbc4 100644 --- a/mm/page_alloc.c +++ b

RE: arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types)

2020-06-12 Thread Xia, Hui
>-Original Message- >From: Christophe Leroy >Sent: 2020年6月12日 13:15 >To: lkp ; Christophe Leroy >Cc: kbuild-...@lists.01.org; linux-kernel@vger.kernel.org; Michael Ellerman > >Subject: Re: arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type >in >assignment (different base

[PATCH] gpio: mpc8xxx: change the gpio interrupt flags.

2020-06-11 Thread Hui Song
From: Song Hui Delete the interrupt IRQF_NO_THREAD flags in order to gpio interrupts can be threaded to allow high-priority processes to preempt. Signed-off-by: Song Hui --- drivers/gpio/gpio-mpc8xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio

[PATCH] gpio: mpc8xxx: change the gpio interrupt flags.

2020-06-09 Thread Hui Song
From: Song Hui delete the interrupt IRQF_NO_THREAD flags. Signed-off-by: Song Hui --- drivers/gpio/gpio-mpc8xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 604dfec..1e86652 100644 --- a/drivers/gpio/gpio

Re: [PATCH v29 00/20] Intel SGX foundations

2020-05-12 Thread Hui, Chunyang
so that ultimately the kernel can > decide what enclaves it wants run. The implementation does not create > any bottlenecks to support read-only MSRs later on. > > You can tell if your CPU supports SGX by looking into /proc/cpuinfo: > > cat /proc/cpuinfo | grep sgx Tested-b

[RFC v3 for QEMU] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT

2020-05-12 Thread Hui Zhu
. Then It will get continuous pages PFN that its order is current_pages_order from VQ ivq use use madvise MADV_DONTNEED release the page. This will handle the THP split issue. Signed-off-by: Hui Zhu --- hw/virtio/virtio-balloon.c | 77 + include/hw/virtio/virtio

[RFC v3 for Linux] virtio_balloon: Add VIRTIO_BALLOON_VQ_INFLATE_CONT to handle THP split issue

2020-05-12 Thread Hui Zhu
age. [1] https://lkml.org/lkml/2020/3/12/144 [2] https://lore.kernel.org/linux-mm/1584893097-12317-1-git-send-email-teawa...@gmail.com/ Signed-off-by: Hui Zhu --- drivers/virtio/virtio_balloon.c | 98 +++-- include/linux/balloon_compaction.h | 9 +++- incl

[PATCH v1 2/3] armv8: gpio: add gpio feature

2020-05-09 Thread Hui Song
From: "hui.song" add one struct mpc8xxx_gpio_plat to enable gpio feature. Signed-off-by: hui.song --- .../include/asm/arch-fsl-layerscape/gpio.h| 22 +++ 1 file changed, 22 insertions(+) create mode 100644 arch/arm/include/asm/arch-fsl-layerscape/gpio.h diff --git

[PATCH v1 1/3] gpio: mpc8xxx: support fsl-layerscape platform.

2020-05-09 Thread Hui Song
From: "hui.song" Make the MPC8XXX gpio driver to support the fsl-layerscape. Signed-off-by: hui.song --- drivers/gpio/mpc8xxx_gpio.c | 59 + 1 file changed, 59 insertions(+) diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c index

[PATCH v1 3/3] dm: armv8: gpio: include for fsl-layerscape

2020-05-09 Thread Hui Song
From: "hui.song" Enable the gpio feature on fsl-layerscape platform. Signed-off-by: hui.song --- arch/arm/include/asm/gpio.h | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index 333e407b66..7715a01706

[PATCH v1 1/3] gpio: mpc8xxx: support fsl-layerscape platform.

2020-05-09 Thread Hui Song
From: "hui.song" Make the MPC8XXX gpio driver to support the fsl-layerscape. Signed-off-by: hui.song --- drivers/gpio/mpc8xxx_gpio.c | 59 + 1 file changed, 59 insertions(+) diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c index

[PATCH v1 2/3] armv8: gpio: add gpio feature

2020-05-09 Thread Hui Song
From: "hui.song" add one struct mpc8xxx_gpio_plat to enable gpio feature. Signed-off-by: hui.song --- .../include/asm/arch-fsl-layerscape/gpio.h| 22 +++ 1 file changed, 22 insertions(+) create mode 100644 arch/arm/include/asm/arch-fsl-layerscape/gpio.h diff --git

[PATCH v1 3/3] dm: armv8: gpio: include for fsl-layerscape

2020-05-09 Thread Hui Song
From: "hui.song" Enable the gpio feature on fsl-layerscape platform. Signed-off-by: hui.song --- arch/arm/include/asm/gpio.h | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index 333e407b66..7715a01706

[PATCH 1/2] mm, frontswap: Fix frontswap_map issue with THP

2019-10-14 Thread Hui Zhu
. Signed-off-by: Hui Zhu --- mm/frontswap.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mm/frontswap.c b/mm/frontswap.c index 60bb20e..f07ea63 100644 --- a/mm/frontswap.c +++ b/mm/frontswap.c @@ -274,8 +274,12 @@ int __frontswap_store(struct page *page

[PATCH 2/2] mm, zswap: Support THP

2019-10-14 Thread Hui Zhu
This commit let zswap treats THP as continuous normal pages in zswap_frontswap_store. It will store them to a lot of "zswap_entry". These "zswap_entry" will be inserted to "zswap_tree" together. Signed-off-by:

[PATCH v8] gpio/mpc8xxx: change irq handler from chained to normal

2019-10-10 Thread Hui Song
From: Song Hui More than one gpio controllers can share one interrupt, change the driver to request shared irq. While this will work, it will mess up userspace accounting of the number of interrupts per second in tools such as vmstat. The reason is that for every GPIO interrupt, /proc

[PATCH v7] gpio/mpc8xxx: change irq handler from chained to normal

2019-10-09 Thread Hui Song
From: Song Hui More than one gpio controllers can share one interrupt, change the driver to request shared irq. While this will work, it will mess up userspace accounting of the number of interrupts per second in tools such as vmstat. The reason is that for every GPIO interrupt, /proc

[PATCH v6] gpio/mpc8xxx: change irq handler from chained to normal

2019-10-09 Thread Hui Song
From: Song Hui More than one gpio controllers can share one interrupt, change the driver to request shared irq. While this will work, it will mess up userspace accounting of the number of interrupts per second in tools such as vmstat. The reason is that for every GPIO interrupt, /proc

[RFC v4] zswap: Add CONFIG_ZSWAP_IO_SWITCH to handle swap IO issue

2019-10-08 Thread Hui Zhu
is enabled by the swap parameter io_switch_enabled_enabled, zswap will just work when the swap disk has outstanding I/O requests. [1] https://lkml.org/lkml/2019/9/11/935 [2] https://lkml.org/lkml/2019/9/20/90 [3] https://lkml.org/lkml/2019/9/22/927 Signed-off-by: Hui Zhu --- include/linux/swap.h |

[PATCH v6] gpio/mpc8xxx: change irq handler from chained to normal

2019-09-26 Thread Hui Song
From: Song Hui More than one gpio controllers can share one interrupt, change the driver to request shared irq. While this will work, it will mess up userspace accounting of the number of interrupts per second in tools such as vmstat. The reason is that for every GPIO interrupt, /proc

<    1   2   3   4   5   6   7   8   9   10   >