[PATCH] dax: Kconfig: add depends on !FS_DAX_LIMITED for ARCH_HAS_PMEM_API

2022-12-08 Thread Qi Zheng
, page_address(pfn_to_page(pfn)), count * PAGE_SIZE); Instead of fixing this, it is better to declare in Kconfig that pmem does not support CONFIG_FS_DAX_LIMITED now. Signed-off-by: Qi Zheng --- BTW, it seems that CONFIG_FS_DAX_LIMITED currently only has DCSSBLK as a user, but this makes

[PATCH] sched/fair: Remove the redundant critical section

2020-11-10 Thread Qi Zheng
Now there is nothing in the critical section, so remove it. Signed-off-by: Qi Zheng --- kernel/sched/fair.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 52cacfc62922..06c4f3430e95 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c

Re: [PATCH] sched/deadline: Replace rq_of_dl_rq(dl_rq_of_se(dl_se)) with ... ...task_rq(dl_task_of(dl_se))

2020-10-14 Thread Qi Zheng
On 2020/10/13 下午11:48, Peter Zijlstra wrote: > On Tue, Oct 13, 2020 at 10:31:40PM +0800, Qi Zheng wrote: >> The rq is already obtained in the dl_rq_of_se() function: >> struct task_struct *p = dl_task_of(dl_se); >> struct rq *rq = task_rq(p); >> So there is no

[PATCH] sched/deadline: Replace rq_of_dl_rq(dl_rq_of_se(dl_se)) with ... ...task_rq(dl_task_of(dl_se))

2020-10-13 Thread Qi Zheng
The rq is already obtained in the dl_rq_of_se() function: struct task_struct *p = dl_task_of(dl_se); struct rq *rq = task_rq(p); So there is no need to do extra conversion. Signed-off-by: Qi Zheng --- kernel/sched/deadline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH] of/fdt: Remove duplicate check in early_init_dt_scan_memory()

2020-08-17 Thread Qi Zheng
On 2020/8/18 上午2:21, Rob Herring wrote: On Fri, Aug 14, 2020 at 4:57 PM Qi Zheng wrote: When the value of the first reg is not NULL, there will be two repeated checks. So modify it. I prefer the way it was. I'm sure the compiler is smart enough to throw out the 2nd check. Plus, &

[PATCH] of/fdt: Remove duplicate check in early_init_dt_scan_memory()

2020-08-14 Thread Qi Zheng
When the value of the first reg is not NULL, there will be two repeated checks. So modify it. Signed-off-by: Qi Zheng --- drivers/of/fdt.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 4602e467ca8b..f54412c00642 100644 --- a

Re: [PATCH] sched/core: add unlikely in group_has_capacity()

2020-08-11 Thread Qi Zheng
On 2020/8/7 上午10:47, Qi Zheng wrote: Yeah, because of the following two points, I also think the probability is 0%: a) the sd is protected by rcu lock, and load_balance()    func is between rcu_read_lock() and rcu_read_unlock(). b) the sgs is a local variable. So in the group_classify(), the

Re: [PATCH] sched/fair: Remove the duplicate check from group_has_capacity()

2020-08-11 Thread Qi Zheng
On 2020/8/12 上午4:16, Valentin Schneider wrote: On 11/08/20 14:12, Qi Zheng wrote: On 2020/8/11 下午8:48, Valentin Schneider wrote: On 11/08/20 12:44, Qi Zheng wrote: In fact, at the beginning, I added unlikely() here to hint the compiler: - if ((sgs->group_capacity * imbalance_

Re: [PATCH] sched/fair: Remove the duplicate check from group_has_capacity()

2020-08-11 Thread Qi Zheng
On 2020/8/11 下午8:48, Valentin Schneider wrote: On 11/08/20 12:44, Qi Zheng wrote: On 2020/8/11 下午6:38, Valentin Schneider wrote: On 11/08/20 04:39, Qi Zheng wrote: On 2020/8/11 上午2:33, Valentin Schneider wrote: On 10/08/20 02:00, Qi Zheng wrote: 1. The group_has_capacity() function is

Re: [PATCH] sched/fair: Remove the duplicate check from group_has_capacity()

2020-08-11 Thread Qi Zheng
On 2020/8/11 下午6:38, Valentin Schneider wrote: On 11/08/20 04:39, Qi Zheng wrote: On 2020/8/11 上午2:33, Valentin Schneider wrote: On 10/08/20 02:00, Qi Zheng wrote: 1. The group_has_capacity() function is only called in group_classify(). 2. The following inequality has already been

Re: [PATCH] sched/fair: Remove the duplicate check from group_has_capacity()

2020-08-10 Thread Qi Zheng
On 2020/8/11 上午2:33, Valentin Schneider wrote: On 10/08/20 02:00, Qi Zheng wrote: 1. The group_has_capacity() function is only called in group_classify(). 2. The following inequality has already been checked in group_is_overloaded() which was also called in group_classify

[PATCH] sched/fair: Remove the duplicate check from group_has_capacity()

2020-08-09 Thread Qi Zheng
_runnable * 100) So just remove the duplicate check from group_has_capacity(). Signed-off-by: Qi Zheng --- kernel/sched/fair.c | 4 1 file changed, 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2ba8f230feb9..a41903fb327a 100644 --- a/kernel/sched/fair.c +++

Re: [PATCH] sched/core: add unlikely in group_has_capacity()

2020-08-06 Thread Qi Zheng
nd the sgs will not be changed. May I remove the duplicate check from group_has_capacity() and resubmit a patch? Yours, Qi Zheng On 2020/8/6 下午10:45, Ingo Molnar wrote: * Qi Zheng wrote: 1. The group_has_capacity() function is only called in group_classify(). 2. Before calli

Re: [PATCH] sched/fair: Fix the logic about active_balance in load_balance()

2020-08-03 Thread Qi Zheng
Hi Dietmar, I understand, thank you for your review and very detailed explanation. Yours, Qi Zheng On 2020/8/3 下午3:36, Dietmar Eggemann wrote: On 02/08/2020 06:51, Qi Zheng wrote: I think the unbalance scenario here should be that we need to do active balance but it is not actually done. So

[PATCH] sched/fair: Fix the logic about active_balance in load_balance()

2020-08-01 Thread Qi Zheng
I think the unbalance scenario here should be that we need to do active balance but it is not actually done. So fix it. Signed-off-by: Qi Zheng --- 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

[PATCH] sched/core: add unlikely in group_has_capacity()

2020-07-30 Thread Qi Zheng
->group_capacity * imbalance_pct) < (sgs->group_runnable * 100) Therefore, when the group_has_capacity() is called, the probability that the above formalu holds is very small. Hint compilers about that. Signed-off-by: Qi Zheng --- kernel/sched/fair.c | 4 ++-- 1 file c

[PATCH] sched/fair: Fix comment in newidle_balance()

2020-06-10 Thread Qi Zheng
The code is using newidle_balance() rather than idle_balance(). Signed-off-by: Qi Zheng --- kernel/sched/fair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 0ed04d2a8959..7f9c3245c967 100644 --- a/kernel/sched/fair.c

[PATCH v2] of/fdt: Remove redundant kbasename function call

2020-05-28 Thread Qi Zheng
node unit name only (or an empty string for the root node). So the above equation will still not hold. So the kbasename() is redundant, just remove it. Signed-off-by: Qi Zheng --- Change in v2: remove another kbasename() also. drivers/of/fdt.c | 4 1 file changed, 4 deletions(-)

Re: [PATCH] of/fdt: Remove redundant kbasename function call

2020-05-28 Thread Qi Zheng
Hi Rob, Thanks for your review. I will send you a patch of v2 later. Yours, Qi Zheng On 2020/5/28 上午2:27, Rob Herring wrote: On Tue, May 12, 2020 at 11:49:09PM +0800, Qi Zheng wrote: For version 1 to 3 of the device tree, this is the node full path as a zero terminated string, starting with

[PATCH] dt/platform: Fix comment in of_dev_lookup()

2020-05-24 Thread Qi Zheng
The code is using of_dev_lookup() rather than of_devname_lookup(). Signed-off-by: Qi Zheng --- drivers/of/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 3371e4a06248..3627fee60215 100644 --- a/drivers/of

Re: [PATCH] of/fdt: Remove redundant kbasename function call

2020-05-13 Thread Qi Zheng
On 2020/5/12 下午11:49, Qi Zheng wrote: For version 1 to 3 of the device tree, this is the node full path as a zero terminated string, starting with "/". The following equation will not hold, since the node name has been processed in the fdt_get_name(). *pathp == '/'

[PATCH] of/fdt: Remove redundant kbasename function call

2020-05-12 Thread Qi Zheng
node unit name only (or an empty string for the root node). So the above equation will still not hold. So the kbasename() is redundant, just remove it. Signed-off-by: Qi Zheng --- drivers/of/fdt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 8a8e07

[PATCH] kobject: documentation: Fix erroneous function example in kobject doc.

2020-05-04 Thread Qi Zheng
Update the definitions of some functions listed in the kobject document, since they have been changed. Signed-off-by: Qi Zheng --- Documentation/core-api/kobject.rst | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Documentation/core-api