[PATCH] F2FS: Fix the logic of IS_DNODE()

2013-04-07 Thread Zhihui Zhang
Signed-off-by: Zhihui Zhang zzhs...@gmail.com --- fs/f2fs/node.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index afdb130..2be47b2 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h @@ -239,7 +239,7 @@ static inline bool IS_DNODE(struct

[PATCH] Use LOAD_PHYSICAL_ADDR in vmlinux.lds.S

2014-01-26 Thread Zhihui Zhang
This unifies the way to specify start VMA on both 32 and 64-bit platforms. I would like to remove __PHYSICAL_START as well, but that appears to be harder. Signed-off-by: Zhihui Zhang zzhs...@gmail.com --- arch/x86/kernel/vmlinux.lds.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH] [sched] Don't account time after deadline twice

2014-06-29 Thread Zhihui Zhang
Unless we want to double-penalize an overrun task, the time after the deadline and before the current time is already accounted in the negative dl_se-runtime value. So we can leave it as is in the case of dmiss rorun. Signed-off-by: Zhihui Zhang zzhs...@gmail.com --- kernel/sched/deadline.c | 6

Re: [PATCH] [sched] Don't account time after deadline twice

2014-07-03 Thread Zhihui Zhang
(perhaps with numbers)? thanks, -Zhihui On Thu, Jul 3, 2014 at 5:50 AM, Juri Lelli juri.le...@gmail.com wrote: On Wed, 2 Jul 2014 19:44:04 -0400 Zhihui Zhang zzhs...@gmail.com wrote: My point is that rq_clock(rq) - dl_se-deadline is already part of dl_se-runtime, which is decremented before

[PATCH] [sched] Rename a misleading variable in build_overlap_sched_groups()

2014-08-01 Thread Zhihui Zhang
The child variable in build_overlap_sched_groups() actually refers to the peer or sibling domain of the given CPU. Rename it to sibling to be consistent with the naming in build_group_mask(). Signed-off-by: Zhihui Zhang zzhs...@gmail.com --- kernel/sched/core.c | 13 ++--- 1 file changed

[PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-25 Thread Zhihui Zhang
Since we have already allocated the full unit size for the first chunk, we might as well use it so that the unit size are the same for all chunks. The page first chunk allocator already has this effect because it allocates one page at a time. Signed-off-by: Zhihui Zhang zzhs...@gmail.com

Re: [PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-27 Thread Zhihui Zhang
+ size_sum, ai-unit_size - size_sum); I am trying to make each CPU to have a full unit size in the first chunk, same as in all other chunks. Does this make sense? -Zhihui On Mon, Oct 27, 2014 at 10:08 AM, Tejun Heo t...@kernel.org wrote: On Sat, Oct 25, 2014 at 11:05:58AM -0400, Zhihui Zhang wrote

Re: [PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-29 Thread Zhihui Zhang
I see your point. Thanks. -Zhihui On Wed, Oct 29, 2014 at 12:18 AM, Tejun Heo t...@kernel.org wrote: Plesae restore lkml cc when replying. On Tue, Oct 28, 2014 at 08:12:30PM -0400, Zhihui Zhang wrote: My patch just increases the dynamic area in the first chunk slightly to cover the round up

[PATCH] [sched] Clean up some typos and grammatical errors in code/comments

2014-09-20 Thread Zhihui Zhang
Well, the subject line says it all. Signed-off-by: Zhihui Zhang zzhs...@gmail.com --- kernel/sched/core.c | 4 ++-- kernel/sched/fair.c | 6 +++--- kernel/sched/sched.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH] [mempolicy] remove unnecessary is_valid_nodemask()

2014-11-15 Thread Zhihui Zhang
When nodes is true, nsc-mask2 has already been filtered by nsc-mask1, which has already factored in node_states[N_MEMORY]. Signed-off-by: Zhihui Zhang zzhs...@gmail.com --- mm/mempolicy.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mm/mempolicy.c b/mm

Re: [PATCH] [mempolicy] remove unnecessary is_valid_nodemask()

2014-11-17 Thread Zhihui Zhang
is based on mask1. mask2 is only used when nodes is not NULL later. so we don't care the case of (pol-mode == MPOL_PREFERRED nodes_empty(*nodes)). -Zhihui On Mon, Nov 17, 2014 at 6:08 PM, Andrew Morton a...@linux-foundation.org wrote: On Sat, 15 Nov 2014 21:49:57 -0500 Zhihui Zhang zzhs...@gmail.com

[PATCH] [sched] Account the elapse of each period accurately

2015-01-03 Thread Zhihui Zhang
), we can use a separate field to track how much time the current period has elapsed instead of overloading runnable_avg_period. This patch achieves this. Signed-off-by: Zhihui Zhang zzhs...@gmail.com --- include/linux/sched.h | 2 +- kernel/sched/fair.c | 5 - 2 files changed, 5 insertions

[PATCH] Do not use arbitrary large movablecore to calculate kernelcore

2015-03-28 Thread Zhihui Zhang
If kernelcore is not set, then we are working with a very large kernelcore for nothing - no movable zone will be created. If kernelcore is set, then it is not respected at all. Signed-off-by: Zhihui Zhang zzhs...@gmail.com --- mm/page_alloc.c | 6 +- 1 file changed, 5 insertions(+), 1

Re: [PATCH] Do not use arbitrary large movablecore to calculate kernelcore

2015-04-02 Thread Zhihui Zhang
, 2015 at 11:36:02PM -0400, Zhihui Zhang wrote: If kernelcore is not set, then we are working with a very large kernelcore for nothing - no movable zone will be created. If kernelcore is set, then it is not respected at all. Signed-off-by: Zhihui Zhang zzhs...@gmail.com I'm confused. What bug

[PATCH] Rename RECLAIM_SWAP to RECLAIM_UNMAP.

2015-05-10 Thread Zhihui Zhang
, leaving RECLAIM_SWAP behind. commit 2e2e42598908 reintroduced .may_swap for memory controller. Signed-off-by: Zhihui Zhang zzhs...@gmail.com --- mm/vmscan.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 5e8eadd..15328de 100644

[PATCH] sched/fair: remove the swap() logic in load_too_imbalanced()

2015-10-17 Thread Zhihui Zhang
-off-by: Zhihui Zhang <zzhs...@gmail.com> --- kernel/sched/fair.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6e2e348..5e8e17b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/

Re: [PATCH] timers: Reconcile the code and the comment for the 250HZ case

2017-01-21 Thread Zhihui Zhang
, John Stultz <john.stu...@linaro.org> wrote: > On Mon, Jan 2, 2017 at 1:14 PM, Zhihui Zhang <zzhs...@gmail.com> wrote: >> Adjust the time start of each level to match the comments. Note that >> LVL_START(n) is never used for n = 0 case. Also, each level (except >> l

Re: [PATCH] timers: Reconcile the code and the comment for the 250HZ case

2017-01-24 Thread Zhihui Zhang
Ah, I see your point. Thanks for the detail explanation. -Zhihui On Mon, Jan 23, 2017 at 6:10 AM, Thomas Gleixner <t...@linutronix.de> wrote: > On Sat, 21 Jan 2017, Zhihui Zhang wrote: > >> Sure, I believe that comments should always match the code. In this > > That'

[PATCH] timers: Reconcile the code and the comment for the 250HZ case

2017-01-02 Thread Zhihui Zhang
Adjust the time start of each level to match the comments. Note that LVL_START(n) is never used for n = 0 case. Also, each level (except level 0) has more than enough room to accommodate all its timers. Signed-off-by: Zhihui Zhang <zzhs...@gmail.com> --- kernel/time/timer.c | 4 ++--

[PATCH] x86: Unify definition of jiffies

2018-01-07 Thread Zhihui Zhang
jiffies_64 is always defined in file kernel/time/timer.c. Thus, we can unify definition of jiffies and make it less confusing. This only affects 64-bit platforms. Signed-off-by: Zhihui Zhang <zzhs...@gmail.com> --- arch/x86/kernel/time.c| 4 arch/x86/kernel/vmlinux.lds.S | 4 +

[PATCH] F2FS: Fix the logic of IS_DNODE()

2013-04-07 Thread Zhihui Zhang
Signed-off-by: Zhihui Zhang --- fs/f2fs/node.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index afdb130..2be47b2 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h @@ -239,7 +239,7 @@ static inline bool IS_DNODE(struct page *node_page

[PATCH] Use LOAD_PHYSICAL_ADDR in vmlinux.lds.S

2014-01-26 Thread Zhihui Zhang
This unifies the way to specify start VMA on both 32 and 64-bit platforms. I would like to remove __PHYSICAL_START as well, but that appears to be harder. Signed-off-by: Zhihui Zhang --- arch/x86/kernel/vmlinux.lds.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86

Re: [PATCH] [sched] Don't account time after deadline twice

2014-07-03 Thread Zhihui Zhang
e example (perhaps with numbers)? thanks, -Zhihui On Thu, Jul 3, 2014 at 5:50 AM, Juri Lelli wrote: > On Wed, 2 Jul 2014 19:44:04 -0400 > Zhihui Zhang wrote: > >> My point is that rq_clock(rq) - dl_se->deadline is already part of >> dl_se->runtime, which is decremente

[PATCH] [sched] Don't account time after deadline twice

2014-06-29 Thread Zhihui Zhang
Unless we want to double-penalize an overrun task, the time after the deadline and before the current time is already accounted in the negative dl_se->runtime value. So we can leave it as is in the case of dmiss && rorun. Signed-off-by: Zhihui Zhang --- kernel/sched/deadline.c |

[PATCH] [sched] Rename a misleading variable in build_overlap_sched_groups()

2014-08-01 Thread Zhihui Zhang
The child variable in build_overlap_sched_groups() actually refers to the peer or sibling domain of the given CPU. Rename it to sibling to be consistent with the naming in build_group_mask(). Signed-off-by: Zhihui Zhang --- kernel/sched/core.c | 13 ++--- 1 file changed, 6 insertions

[PATCH] x86: Unify definition of jiffies

2018-01-07 Thread Zhihui Zhang
jiffies_64 is always defined in file kernel/time/timer.c. Thus, we can unify definition of jiffies and make it less confusing. This only affects 64-bit platforms. Signed-off-by: Zhihui Zhang --- arch/x86/kernel/time.c| 4 arch/x86/kernel/vmlinux.lds.S | 4 ++-- 2 files changed, 2

Re: [PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-29 Thread Zhihui Zhang
I see your point. Thanks. -Zhihui On Wed, Oct 29, 2014 at 12:18 AM, Tejun Heo wrote: > Plesae restore lkml cc when replying. > > On Tue, Oct 28, 2014 at 08:12:30PM -0400, Zhihui Zhang wrote: >> My patch just increases the dynamic area in the first chunk slightly >> to cover

Re: [PATCH] [mempolicy] remove unnecessary is_valid_nodemask()

2014-11-17 Thread Zhihui Zhang
so mask2 is based on mask1. mask2 is only used when nodes is not NULL later. so we don't care the case of (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes)). -Zhihui On Mon, Nov 17, 2014 at 6:08 PM, Andrew Morton wrote: > On Sat, 15 Nov 2014 21:49:57 -0500 Zhihui Zhang wr

[PATCH] [sched] Clean up some typos and grammatical errors in code/comments

2014-09-20 Thread Zhihui Zhang
Well, the subject line says it all. Signed-off-by: Zhihui Zhang --- kernel/sched/core.c | 4 ++-- kernel/sched/fair.c | 6 +++--- kernel/sched/sched.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index ec1a286..eb5505f 100644

Re: [PATCH] Do not use arbitrary large movablecore to calculate kernelcore

2015-04-02 Thread Zhihui Zhang
11:36:02PM -0400, Zhihui Zhang wrote: >> If kernelcore is not set, then we are working with a very large kernelcore >> for nothing - no movable zone will be created. If kernelcore is set, >> then it is not respected at all. >> >> Signed-off-by: Zhihui Zhang > > I

[PATCH] Do not use arbitrary large movablecore to calculate kernelcore

2015-03-28 Thread Zhihui Zhang
If kernelcore is not set, then we are working with a very large kernelcore for nothing - no movable zone will be created. If kernelcore is set, then it is not respected at all. Signed-off-by: Zhihui Zhang --- mm/page_alloc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH] [mempolicy] remove unnecessary is_valid_nodemask()

2014-11-15 Thread Zhihui Zhang
When nodes is true, nsc->mask2 has already been filtered by nsc->mask1, which has already factored in node_states[N_MEMORY]. Signed-off-by: Zhihui Zhang --- mm/mempolicy.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c

[PATCH] Rename RECLAIM_SWAP to RECLAIM_UNMAP.

2015-05-10 Thread Zhihui Zhang
RECLAIM_SWAP behind. commit <2e2e42598908> reintroduced .may_swap for memory controller. Signed-off-by: Zhihui Zhang --- mm/vmscan.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 5e8eadd..15328de 100644 --- a/mm/vmscan.c ++

[PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-25 Thread Zhihui Zhang
Since we have already allocated the full unit size for the first chunk, we might as well use it so that the unit size are the same for all chunks. The page first chunk allocator already has this effect because it allocates one page at a time. Signed-off-by: Zhihui Zhang --- mm/percpu.c | 6

Re: [PATCH] [percpu] Make the unit size of the first chunk the same as other chunks

2014-10-27 Thread Zhihui Zhang
ee_fn(ptr + size_sum, ai->unit_size - size_sum); I am trying to make each CPU to have a full unit size in the first chunk, same as in all other chunks. Does this make sense? -Zhihui On Mon, Oct 27, 2014 at 10:08 AM, Tejun Heo wrote: > On Sat, Oct 25, 2014 at 11:05:58AM -0400, Zhihui Zhang

[PATCH] [sched] Account the elapse of each period accurately

2015-01-03 Thread Zhihui Zhang
), we can use a separate field to track how much time the current period has elapsed instead of overloading runnable_avg_period. This patch achieves this. Signed-off-by: Zhihui Zhang --- include/linux/sched.h | 2 +- kernel/sched/fair.c | 5 - 2 files changed, 5 insertions(+), 2 deletions

Re: [PATCH] timers: Reconcile the code and the comment for the 250HZ case

2017-01-21 Thread Zhihui Zhang
, John Stultz wrote: > On Mon, Jan 2, 2017 at 1:14 PM, Zhihui Zhang wrote: >> Adjust the time start of each level to match the comments. Note that >> LVL_START(n) is never used for n = 0 case. Also, each level (except >> level 0) has more than enough room to accommodate a

[PATCH] timers: Reconcile the code and the comment for the 250HZ case

2017-01-02 Thread Zhihui Zhang
Adjust the time start of each level to match the comments. Note that LVL_START(n) is never used for n = 0 case. Also, each level (except level 0) has more than enough room to accommodate all its timers. Signed-off-by: Zhihui Zhang --- kernel/time/timer.c | 4 ++-- 1 file changed, 2 insertions

Re: [PATCH] timers: Reconcile the code and the comment for the 250HZ case

2017-01-24 Thread Zhihui Zhang
Ah, I see your point. Thanks for the detail explanation. -Zhihui On Mon, Jan 23, 2017 at 6:10 AM, Thomas Gleixner wrote: > On Sat, 21 Jan 2017, Zhihui Zhang wrote: > >> Sure, I believe that comments should always match the code. In this > > That's fine. > >> case

[PATCH] sched/fair: remove the swap() logic in load_too_imbalanced()

2015-10-17 Thread Zhihui Zhang
-off-by: Zhihui Zhang --- kernel/sched/fair.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6e2e348..5e8e17b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1203,7 +1203,7

[tip:sched/core] sched: Rename a misleading variable in build_overlap_sched_groups()

2014-08-12 Thread tip-bot for Zhihui Zhang
Commit-ID: aaecac4ad46b35ad308245384d019633fb9bc21b Gitweb: http://git.kernel.org/tip/aaecac4ad46b35ad308245384d019633fb9bc21b Author: Zhihui Zhang zzhs...@gmail.com AuthorDate: Fri, 1 Aug 2014 21:18:03 -0400 Committer: Ingo Molnar mi...@kernel.org CommitDate: Tue, 12 Aug 2014 12:48:21

[tip:sched/core] sched: Clean up some typos and grammatical errors in code/comments

2014-09-21 Thread tip-bot for Zhihui Zhang
Commit-ID: 9c58c79a8a76c510cd3a5012c536d4fe3c81ec3b Gitweb: http://git.kernel.org/tip/9c58c79a8a76c510cd3a5012c536d4fe3c81ec3b Author: Zhihui Zhang zzhs...@gmail.com AuthorDate: Sat, 20 Sep 2014 21:24:36 -0400 Committer: Ingo Molnar mi...@kernel.org CommitDate: Sun, 21 Sep 2014 09:00:02

[tip:sched/core] sched: Rename a misleading variable in build_overlap_sched_groups()

2014-08-12 Thread tip-bot for Zhihui Zhang
Commit-ID: aaecac4ad46b35ad308245384d019633fb9bc21b Gitweb: http://git.kernel.org/tip/aaecac4ad46b35ad308245384d019633fb9bc21b Author: Zhihui Zhang AuthorDate: Fri, 1 Aug 2014 21:18:03 -0400 Committer: Ingo Molnar CommitDate: Tue, 12 Aug 2014 12:48:21 +0200 sched: Rename a misleading

[tip:sched/core] sched: Clean up some typos and grammatical errors in code/comments

2014-09-21 Thread tip-bot for Zhihui Zhang
Commit-ID: 9c58c79a8a76c510cd3a5012c536d4fe3c81ec3b Gitweb: http://git.kernel.org/tip/9c58c79a8a76c510cd3a5012c536d4fe3c81ec3b Author: Zhihui Zhang AuthorDate: Sat, 20 Sep 2014 21:24:36 -0400 Committer: Ingo Molnar CommitDate: Sun, 21 Sep 2014 09:00:02 +0200 sched: Clean up some typos