[PATCH] mm/slab.c: cleanup outdated comments and unify variables naming

2014-02-26 Thread Jianyu Zhan
As time goes, the code changes a lot, and this leads to that some old-days comments scatter around , which instead of faciliating understanding, but make more confusion. So this patch cleans up them. Also, this patch unifies some variables naming. Signed-off-by: Jianyu Zhan --- mm/slab.c | 66

[PATCH] blkdev: use an efficient way to check merge flags

2014-04-02 Thread Jianyu Zhan
A bitwise flag comparison could be done using a more efficient bit-ops way. Signed-off-by: Jianyu Zhan --- include/linux/blkdev.h | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1e1fa3f..adfa40a 100644

Re: [PATCH] blkdev: use an efficient way to check merge flags

2014-04-03 Thread Jianyu Zhan
efficient bit-ops way, by mimicking GCC logic of optimizing such bitwise comparison. Signed-off-by: Jianyu Zhan --- include/linux/blkdev.h | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1e1fa3

[PATCH]mm/vmalloc: interchage the implementation of vmalloc_to_{pfn,page}

2013-11-28 Thread Jianyu Zhan
pfn. This seems too circuitous, so this patch reverses the way: implementing the vmalloc_to_page() as a wrapper of vmalloc_to_pfn(). This makes vmalloc_to_pfn() and vmalloc_to_page() slightly effective. No functional change. Signed-off-by: Jianyu Zhan --- mm/vmalloc.c | 20

Re: [PATCH]mm/vmalloc: interchage the implementation of vmalloc_to_{pfn,page}

2013-11-28 Thread Jianyu Zhan
Hi, Vladimir, On Fri, Nov 29, 2013 at 1:41 AM, Vladimir Murzin wrote: > > Any numbers for efficiency? > For the original implementation, vmalloc_to_pfn() wraps the vmalloc_to_page(), which means pfn --> struct page -->pfn |

Re: [PATCH] blk-cgroup: explicitly init the early_init field

2014-04-22 Thread Jianyu Zhan
is there, docment it should be needed. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 2/4] mm/memcontrol.c: use accessor to get id from css

2014-04-22 Thread Jianyu Zhan
m and will be sent out soon, so just forget this patch and wait. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Pleas

Re: [PATCH RESEND] kprobes: be more permissive when user specifies both symbol name and address

2014-07-29 Thread Jianyu Zhan
Hi, Ingo, Here is the new patch with typo fixed. Thanks. ---8<--- Currently, if user specifies both symbol name and address, we just bail out. This might be too rude. This patch makes it give more tolerance. If both are specified, check address first, if the symbol found does not match the one

Re: [PATCH RESEND] kprobes: be more permissive when user specifies both symbol name and address

2014-07-29 Thread Jianyu Zhan
Sorry for the noise, plz add these Acked-by and Signed-off-by: Acked-by: Masami Hiramatsu Signed-off-by: Jianyu Zhan Thanks, Jianyu Zhan On Tue, Jul 29, 2014 at 8:47 PM, Jianyu Zhan wrote: > Hi, Ingo, > > Here is the new patch with typo fixed. > > Thanks. > > ---8&

Re: [PATCH] Documentation/memory-barriers.txt: match table to its comment followed

2014-09-16 Thread Jianyu Zhan
Hi, Some one has submitted a patch addressing this issue a few days ago. The patch is now being cooked in the paulk's tree now, IIRC. Thanks, Jianyu Zhan On Tue, Sep 16, 2014 at 4:51 PM, Yao Dongdong wrote: > The table shows CPU2's sequence of events as "x = B; y = A;

Re: [PATCH] kernfs: move the last knowledge of sysfs out from kernfs

2014-04-26 Thread Jianyu Zhan
ould be kernfs user specific, so this patch moves it out. Kerrnfs user should specify their magic number while mouting. Signed-off-by: Jianyu Zhan Acked-by: Tejun Heo --- fs/kernfs/mount.c | 11 ++- fs/sysfs/mount.c | 4 +++- include/linux/kernfs.h | 13 - kernel/c

[PATCH RFC 1/2] mm/swap.c: split put_compound_page function

2014-04-27 Thread Jianyu Zhan
with the original one). Besides, this patch rearranges/rewrites some comments(hope I don't do it wrong). Signed-off-by: Jianyu Zhan --- mm/swap.c | 227 -- 1 file changed, 131 insertions(+), 96 deletions(-) diff --git a/mm/swap.c

[PATCH RFC 2/2] mm: introdule compound_head_by_tail()

2014-04-27 Thread Jianyu Zhan
compound_head_by_tail() which deal with a possible tail page(though it could be spilt by a racy thread), and make compound_head() a wrapper on it. Signed-off-by: Jianyu Zhan --- include/linux/mm.h | 34 ++ mm/swap.c | 2 +- 2 files changed, 23 insertions

Re: [PATCH RFC 2/2] mm: introdule compound_head_by_tail()

2014-04-28 Thread Jianyu Zhan
ctually, I checked the assembled code, the compiler is _not_ so smart to recognize this case. It just does optimization as the hint unlikely() told it. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vg

Re: [PATCH RFC 1/2] mm/swap.c: split put_compound_page function

2014-04-28 Thread Jianyu Zhan
On Mon, Apr 28, 2014 at 11:00 PM, Michal Hocko wrote: > This is a big change and really hard to review to be honest. Maybe a > split up would make it easier to follow. Ok, actually it is quite simple, but the diff looks messy, I will try to split up this patch to several phases. Thanks,

Re: [PATCH RFC 2/2] mm: introdule compound_head_by_tail()

2014-04-28 Thread Jianyu Zhan
ell compiler unlikely, so it happily did as we told it) # all code are compiled by gcc (GCC) 4.8.2 > and why didn't your changelog include this useful information? Sorry, I would have done so. I will resend the patch. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "u

[PATCH 2/3] mm/swap.c: split put_compound_page function

2014-04-29 Thread Jianyu Zhan
g has no functinal change, but it brings readability. This patch and the previous one blow the code by 32 lines, which mostly credits to comments. Signed-off-by: Jianyu Zhan --- mm/swap.c | 142 +++--- 1 file changed, 16 insertions(+), 126 dele

[PATCH 1/3] mm/swap.c: introduce put_[un]refcounted_compound_page helpers for spliting put_compound_page

2014-04-29 Thread Jianyu Zhan
e path (2), respectively. They both are tagged __always_inline, thus it elmiates function call overhead, making them operating the same way as before. They are almost copied verbatim(except one place, a "goto out_put_single" is expanded), with some comments rephrasing. Signed-off-by: Jian

[PATCH 3/3] mm: introdule compound_head_by_tail()

2014-04-29 Thread Jianyu Zhan
lines, but with a reduced object size. I still believe this helper deserves to exsit. Signed-off-by: Jianyu Zhan --- include/linux/mm.h | 29 + mm/swap.c | 2 +- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/include/linux/mm.h b/include/lin

[PATCH] mm/vmscan.c: use DIV_ROUND_UP for calculation of zone's balance_gap and correct comments.

2014-05-18 Thread Jianyu Zhan
uot;, not "present pages". This patch also corrects the comment and do some rephrasing. Signed-off-by: Jianyu Zhan --- include/linux/swap.h | 8 mm/vmscan.c | 10 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/linux/swap.h b/includ

Re: time to move fs/bio.c to block/ ?

2014-05-19 Thread Jianyu Zhan
could make code skeleton more clear and could avoid such mis-sending patches in a long term maintainability view. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH] mm/vmscan: Do not block forever at shrink_inactive_list().

2014-05-19 Thread Jianyu Zhan
d for too long. */ > + if (i == 50 && (current->flags & PF_KTHREAD)) > + break; > } > > lru_add_drain(); Hi, Tetsuo Handa I think it is good to use a MACRO for this magic number instead of harding code it, in a l

[PATCH RESEND] scripts/tags.sh: add regular expression replacement pattern for memcg

2014-05-12 Thread Jianyu Zhan
id of it. Signed-off-by: Jianyu Zhan --- scripts/tags.sh | 8 1 file changed, 8 insertions(+) diff --git a/scripts/tags.sh b/scripts/tags.sh index f2c5b00..7d3ebfe 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -187,6 +187,10 @@ exuberant() --regex-c++='/TESTCL

Re: [PATCH] scripts/tags.sh: add regular expression replacement pattern for memcg

2014-05-13 Thread Jianyu Zhan
ar expression replacement pattern for such symbols, like what have done for the PageXXX flag. It will teach ctags to find out the definition for us. Signed-off-by: Jianyu Zhan --- scripts/tags.sh | 8 1 file changed, 8 insertions(+) diff --git a/scripts/tags.sh b/scripts/tags.sh inde

[PATCH] mm, hugetlb: use list_for_each_entry in region_xxx

2014-05-14 Thread Jianyu Zhan
each_entry is enough. Signed-off-by: Jianyu Zhan --- mm/hugetlb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index c82290b..26b1464 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -156,7 +156,7 @@ struct file_region { static long region

[PATCH] mm, hugetlb: move the error handle logic out of normal code path

2014-05-14 Thread Jianyu Zhan
alloc_huge_page() now mixes normal code path with error handle logic. This patches move out the error handle logic, to make normal code path more clean and redue code duplicate. Signed-off-by: Jianyu Zhan --- mm/hugetlb.c | 26 +- 1 file changed, 13 insertions(+), 13

[PATCH] mm: use a irq-safe __mod_zone_page_state in mlocked_vma_newpage()

2014-05-09 Thread Jianyu Zhan
() here. Signed-off-by: Jianyu Zhan --- mm/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/internal.h b/mm/internal.h index 07b6736..69079b1 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -196,7 +196,7 @@ static inline int mlocked_vma_newpage(struct vm_area_struct

Re: [PATCH] mm: use a irq-safe __mod_zone_page_state in mlocked_vma_newpage()

2014-05-09 Thread Jianyu Zhan
a *new* page. And such page is initially only visible via the pagetables, and the pte is locked while calling page_add_new_anon_rmap(), so we need not use an irq-safe mod_zone_page_state() here, using a light-weight version __mod_zone_page_state() would be OK. Signed-off-by: Jianyu Zhan --- mm/in

[PATCH 1/3] mm: add comment for __mod_zone_page_stat

2014-05-10 Thread Jianyu Zhan
__mod_zone_page_stat() is not irq-safe, so it should be used carefully. And it is not appropirately documented now. This patch adds comment for it, and also documents for some of its call sites. Suggested-by: Andrew Morton Signed-off-by: Jianyu Zhan --- mm/page_alloc.c | 2 ++ mm/rmap.c

[PATCH 2/3] mm: use a light-weight __mod_zone_page_state in mlocked_vma_newpage()

2014-05-10 Thread Jianyu Zhan
page_add_new_anon_rmap() in rmap.c, with detailed document added. Suggested-by: Andrew Morton Signed-off-by: Jianyu Zhan --- mm/internal.h | 22 ++ mm/rmap.c | 24 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/mm/internal.h b/mm/internal.h

[PATCH 3/3] mm: rename mlocked_vma_newpage to newpage_in_mlocked_vma

2014-05-10 Thread Jianyu Zhan
mlocked_vma_newpage is used to determine if a new page is mapped into a *mlocked* vma. It is poorly named, so rename it to newpage_in_mlocked_vma. Signed-off-by: Jianyu Zhan --- mm/internal.h | 4 ++-- mm/rmap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mm

Re: [PATCH 1/3] mm: add comment for __mod_zone_page_stat

2014-05-11 Thread Jianyu Zhan
via the pagetables, and the pte is locked while calling page_add_new_anon_rmap(), so we need not use an irq-safe mod_zone_page_state() here, using a light-weight version __mod_zone_page_state() would be OK. This patch also documents __mod_zone_page_state() and some of its callsites. Suggeste

Re: [PATCH 2/3] mm: use a light-weight __mod_zone_page_state in mlocked_vma_newpage()

2014-05-11 Thread Jianyu Zhan
age() into its only call site, page_add_new_anon_rmap, to make it open-cocded. Suggested-by: Andrew Morton Suggested-by: Hugh Dickins Signed-off-by: Jianyu Zhan --- mm/internal.h | 31 --- mm/rmap.c | 22 +++--- 2 files changed, 19 insertions(+

Re: [PATCH 1/3] mm: add comment for __mod_zone_page_stat

2014-05-12 Thread Jianyu Zhan
On Mon, May 12, 2014 at 10:01 PM, Christoph Lameter wrote: > > > >/* > > * For use when we know that interrupts are disabled, > > * or when we know that preemption is disabled and that > > * particular counter cannot be updated from interrupt context. > > */ > > The description above looks ok to m

Re: [PATCH 1/3] mm: add comment for __mod_zone_page_stat

2014-05-12 Thread Jianyu Zhan
age_state() and some of its callsites. The comment above __mod_zone_page_state() is from Hugh Dickins, and acked by Christoph. Most credits to Hugh and Christoph for the clarification on the usage of the __mod_zone_page_state(). Suggested-by: Andrew Morton Signed-off-by: Hugh Dickins S

Re: [PATCH 1/3] mm: add comment for __mod_zone_page_stat

2014-05-12 Thread Jianyu Zhan
>Preemption is mis-spelled throughout. > >Otherwise > >Reviewed-by: Christoph Lameter Oops, corrected. Thanks. -<8- >From 1d0a080429542accfeac7de03e159a0bea12abba Mon Sep 17 00:00:00 2001 From: Jianyu Zhan Date: Tue, 13 May 2014 00:19:08 +0800 Subject: [PAT

Re: [PATCH 2/3] mm: use a light-weight __mod_zone_page_state in mlocked_vma_newpage()

2014-05-12 Thread Jianyu Zhan
Andrew, since the previous patch [PATCH 1/3] mm: add comment for __mod_zone_page_stat is updated, update this one accordingly. -<8- >From 9701fbdb3f9e7730b89780a5bf22effd1580cf35 Mon Sep 17 00:00:00 2001 From: Jianyu Zhan Date: Tue, 13 May 2014 01:48:01 +0800 Subject: [PATCH] mm

[PATCH] scripts/tags.sh: add regular expression replacement pattern for memcg

2014-04-10 Thread Jianyu Zhan
Currently, no regular expression replacement pattern for PageCgroug* defined, which causes quite a few pain while reading code. Just get rid of it. Also, add a comment to inform people to add pattern for whatever new flags they add. Signed-off-by: Jianyu Zhan --- include/linux/page_cgroup.h

Re: [PATCH] scripts/tags.sh: add regular expression replacement pattern for memcg

2014-04-10 Thread Jianyu Zhan
add pattern for whatever new flag-ops they add. Signed-off-by: Jianyu Zhan --- include/linux/page_cgroup.h | 6 ++ scripts/tags.sh | 8 2 files changed, 14 insertions(+) diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 777a524..9c60b77 100644

[PATCH] mm/memcontrol.c: make mem_cgroup_read_stat() read all interested stat item in one go

2014-04-10 Thread Jianyu Zhan
mark them in a bitmap, and then make mem_cgroup_read_stat() read them all in one go. This is more efficient, and to some degree make it more like *stat snapshot*. Signed-off-by: Jianyu Zhan --- mm/memcontrol.c | 91 +++-- 1 file change

[PATCH] block/blk-core.c: print readable string instead of values.

2014-04-12 Thread Jianyu Zhan
Print the r/w direction string instead of internal values. Signed-off-by: Jianyu Zhan --- block/blk-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index a0e3096..0a3bde3 100644 --- a/block/blk-core.c +++ b/block/blk-core.c

[PATCH 2/2] mm/percpu.c: don't bother to re-walk the pcpu_slot list if nobody free space since we last drop pcpu_lock.

2014-03-27 Thread Jianyu Zhan
f not, we just do allocation using the newly-allocated fully-free new chunk. Signed-off-by: Jianyu Zhan --- mm/percpu.c | 80 - 1 file changed, 69 insertions(+), 11 deletions(-) diff --git a/mm/percpu.c b/mm/percpu.c index cfda29c..4e

[PATCH 1/2] mm/percpu.c: renew the max_contig if we merge the head and previous block.

2014-03-27 Thread Jianyu Zhan
During pcpu_alloc_area(), we might merge the current head with the previous block. Since we have calculated the max_contig using the size of previous block before we skip it, and now we update the size of previous block, so we should renew the max_contig. Signed-off-by: Jianyu Zhan --- mm

[PATCH] percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree()

2014-04-13 Thread Jianyu Zhan
b4916cb17c261a6043bcb2a98d0d6512497a7cf8 addressed this problem, but missed this one. Signed-off-by: Jianyu Zhan --- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index 63e24fb..2ddf9a9 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -610,7 +610,7

[PATCH] kprobes: be more permissive when user specifies both symbol name and address

2014-04-14 Thread Jianyu Zhan
that using symbol is more preferred. Signed-off-by: Jianyu Zhan --- Documentation/kprobes.txt | 4 +++- kernel/kprobes.c | 33 + 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index

Re: [PATCH] block/blk-core.c: print readable string instead of values.

2014-04-14 Thread Jianyu Zhan
Hi, Joe Perches, I think your suggestion is more desirable. The message is too long, I broke it into two lines. Thanks. ---<8--- Also print the r/w direction string instead of only internal values. Suggested-by: Joe Perches Signed-off-by: Jianyu Zhan --- block/blk-core.c | 6 +++--- 1 f

[PATCH] kprobes: be more permissive when user specifies both symbol name and address

2014-04-15 Thread Jianyu Zhan
some symbols might have muplitple instances, we don't bother to check symbol name. Signed-off-by: Jianyu Zhan --- Documentation/kprobes.txt | 4 +++- kernel/kprobes.c | 30 ++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/Document

Re: [PATCH] kprobes: be more permissive when user specifies both symbol name and address

2014-04-15 Thread Jianyu Zhan
int a waring. If not found, return -ENOENT, because some symbols might have muplitple instances, we don't bother to check symbol name. Suggested-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com> Signed-off-by: Jianyu Zhan --- Documentation/kprobes.txt | 4 +++- kernel/kprobes.c

[PATCH] cgroup: print pretty format in /proc/cgroups

2014-04-15 Thread Jianyu Zhan
1 blkio 8 1 1 perf_event 9 1 1 hugetlb 10 1 1 Signed-off-by: Jianyu Zhan --- kernel/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup.c

[PATCH] scripts/tags.sh: add pattern for DEFINE_HASHTABLE

2014-04-16 Thread Jianyu Zhan
Signed-off-by: Jianyu Zhan --- scripts/tags.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/tags.sh b/scripts/tags.sh index 7122fea..a5d27db 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -205,7 +205,8 @@ exuberant() --regex-c='/DEC

[PATCH] crypto: sha{256,512}_ssse3 - remove asmlinkage from static functions

2014-04-16 Thread Jianyu Zhan
asmlinkage here to avoid such warnings. Also see Commit 8783dd3a37a5853689e1("irqchip: Remove asmlinkage from static functions") Signed-off-by: Jianyu Zhan --- arch/x86/crypto/sha256_ssse3_glue.c | 2 +- arch/x86/crypto/sha512_ssse3_glue.c | 2 +- 2 files changed, 2 insertions(+), 2 dele

[PATCH] kernfs: move the last knowledge of sysfs out from kernfs

2014-04-16 Thread Jianyu Zhan
There is still one residue of sysfs remaining: the sb_magic SYSFS_MAGIC. However this should be kernfs user specific, so this patch moves it out. Kerrnfs user should specify their magic number while mouting. Signed-off-by: Jianyu Zhan --- fs/kernfs/mount.c | 9 + fs/sysfs/mount.c

Re: [PATCH] kernfs: move the last knowledge of sysfs out from kernfs

2014-04-16 Thread Jianyu Zhan
newed patch here: There is still one residue of sysfs remaining: the sb_magic SYSFS_MAGIC. However this should be kernfs user specific, so this patch moves it out. Kerrnfs user should specify their magic number while mouting. Signed-off-by: Jianyu Zhan --- fs/kernfs/mount.c | 11 ++

[PATCH RESEND] kprobes: be more permissive when user specifies both symbol name and address

2014-06-20 Thread Jianyu Zhan
;t bother to check symbol name. Acked-by: Masami Hiramatsu Signed-off-by: Jianyu Zhan --- Documentation/kprobes.txt | 4 +++- kernel/kprobes.c | 32 +--- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/Documentation/kprobes.txt b/Documen

[PATCH] kernfs: fix a subdir count leak

2014-04-17 Thread Jianyu Zhan
children node numbers. This patches fix this problem, by moving the subdir accouting after the actual addtion happening. Signed-off-by: Jianyu Zhan --- fs/kernfs/dir.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index 78f3403..ac127cd

Re: [PATCH] scripts/tags.sh: add regular expression replacement pattern for memcg

2014-04-17 Thread Jianyu Zhan
cement pattern for PageCgroug* defined, which causes quite a few pain while reading code. Just get rid of it. Signed-off-by: Jianyu Zhan --- scripts/tags.sh | 8 1 file changed, 8 insertions(+) diff --git a/scripts/tags.sh b/scripts/tags.sh index f2c5b00..7d3ebfe 100755 --- a/scripts

[PATCH] cgroup: clean up obsolete code and comment

2014-04-17 Thread Jianyu Zhan
This patch purely makes cleanup. 1. parse_cgroupfs_options() no longer takes refcounts on subsystems to be used, update its comment. 2. cgroup_pidlist_seq_operations has no more user, remove it. 3. s/pr_warning/pr_warn/g, suggested by scripts/checkpatch.pl. Signed-off-by: Jianyu Zhan

Re: [PATCH] cgroup: clean up obsolete code and comment

2014-04-17 Thread Jianyu Zhan
_operations has no more user, remove it. >> 3. s/pr_warning/pr_warn/g, suggested by scripts/checkpatch.pl. > > And let's put 2 and 3 in separate patches too. > >> Signed-off-by: Jianyu Zhan > > Also, please regenerate the patches on top of the following branch. > >

[PATCH 3/3] cgroup: replace pr_warning with preferred pr_warn

2014-04-17 Thread Jianyu Zhan
As suggested by scripts/checkpatch.pl, substitude all pr_warning() with pr_warn. No functional change. Signed-off-by: Jianyu Zhan --- kernel/cgroup.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 38a9cd0..2b436e2

[PATCH 2/3] cgroup: remove orphaned cgroup_pidlist_seq_operations

2014-04-17 Thread Jianyu Zhan
Commit 6612f05b88fa309c9(cgroup: unify pidlist and other file handling) has removed the only user of cgroup_pidlist_seq_operations : cgroup_pidlist_open(). This patch removes it. Signed-off-by: Jianyu Zhan --- kernel/cgroup.c | 11 --- 1 file changed, 11 deletions(-) diff --git a

[PATCH 1/3] cgroup: clean up obsolete comment for parse_cgroupfs_options()

2014-04-17 Thread Jianyu Zhan
cleanups these comment and BUG_ON(). Signed-off-by: Jianyu Zhan --- kernel/cgroup.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 2412cb7..b261798 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1222,10 +1222,7 @@ struct

Re: [PATCH 1/3] cgroup: clean up obsolete comment for parse_cgroupfs_options()

2014-04-17 Thread Jianyu Zhan
On Thu, Apr 17, 2014 at 11:38 PM, Tejun Heo wrote: > Also, next > time, please put the patches in a series into a thread so that they're > easier to track. Ok. Thanks. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

[PATCH] mm/swap: cleanup *lru_cache_add* functions

2014-04-18 Thread Jianyu Zhan
lru_cache_add_file() and lru_cache_add_anon(), which both delegate to __lru_cache_add(). Signed-off-by: Jianyu Zhan --- include/linux/swap.h | 19 ++- mm/swap.c| 33 + 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/include/linux

Re: [PATCH] mm/swap: cleanup *lru_cache_add* functions

2014-04-18 Thread Jianyu Zhan
y cifs, which be loaded as module. Signed-off-by: Jianyu Zhan --- include/linux/swap.h | 19 ++- mm/swap.c| 31 +++ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 3507115..5a14

[PATCH 1/2] mm/memcontrol.c: remove meaningless while loop in mem_cgroup_iter()

2014-04-18 Thread Jianyu Zhan
!= NULL, a round-trip is done, break out, no loop. 2.2 prev == NULL, this is impossible, since prev==NULL means the initial interation, it will returns memcg==root. So, this patches remove this meaningless while loop. Signed-off-by: Jianyu Zhan --- mm/memcontrol.c | 49

[PATCH 2/2] mm/memcontrol.c: introduce helper mem_cgroup_zoneinfo_zone()

2014-04-18 Thread Jianyu Zhan
introduce helper mem_cgroup_zoneinfo_zone(). This will make mem_cgroup_iter() code more compact. Signed-off-by: Jianyu Zhan --- mm/memcontrol.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index e0ce15c..80d9e38 100644

Re: [PATCH] fix the code style errors in sn9c102

2014-04-18 Thread Jianyu Zhan
ater, like this: "sn9c102: fix the coding style errors" 3. maybe some changelog is good, but for this patch, leaving it out is OK. You would better read the "Documentation/SubmittingPatches" . Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscr

Re: [PATCH] mm/swap: cleanup *lru_cache_add* functions

2014-04-20 Thread Jianyu Zhan
s Rik suggests, it is unexported too. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] blk-cgroup: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to 0, for document reason. Signed-off-by: J

[PATCH] cgroup: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to 0, for document reason. Signed-off-by: J

[PATCH] cgroup_freezer: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to 0, for document reason. Signed-off-by: J

[PATCH] perf-event/cgroup: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to 0, for document reason. Signed-off-by: J

[PATCH] hugetlb_cgroup: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to 0, for document reason. Signed-off-by: J

[PATCH] netclassid_cgroup: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to 0, for document reason. Signed-off-by: J

[PATCH] netprio_cgroup: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to 0, for document reason. Signed-off-by: J

[PATCH] device_cgroup: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to 0, for document reason. Signed-off-by: J

[PATCH] cgroup: use uninitialized_var() for may-be uninitialized variable

2014-04-21 Thread Jianyu Zhan
To suppress this warning: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized] int err; ^ Use the uninitialized_var() to decalre err. It also serves to be good documetation. Signed-off-by: Jianyu Zhan --- kernel/cgroup.c | 2 +- 1 file changed, 1

[PATCH 1/4] cgroup: introduce helper css_to_id()

2014-04-21 Thread Jianyu Zhan
This is a prepared patch for converting from per-cgroup id to per-subsystem id. Some subsystems dereference the per-cgrpu id directly, but this is implementation-specific, so it should be transparent for subsystems. Use this accessor instead. Signed-off-by: Jianyu Zhan --- include/linux

[PATCH 0/4] cgroup: substitude per-cgroup id with per-subsys id

2014-04-21 Thread Jianyu Zhan
Currently, cgrp->id is only used to look up css's. As cgroup and css's lifetimes is now decoupled, it should be made per-subsystem and moved to css->css_id so that lookups are successful until the target css is released. Patch 1-3 are prep patches. Patch 4 do the coverting job.

[PATCH 2/4] mm/memcontrol.c: use accessor to get id from css

2014-04-21 Thread Jianyu Zhan
This is a prepared patch for converting from per-cgroup id to per-subsystem id. We should not access per-cgroup id directly, since this is implemetation detail. Use the accessor css_from_id() instead. This patch has no functional change. Signed-off-by: Jianyu Zhan --- mm/memcontrol.c | 8

[PATCH 3/4] netprio_cgroup: use accessor to get id from css

2014-04-21 Thread Jianyu Zhan
This is a prepared patch for converting from per-cgroup id to per-subsystem id. We should not access per-cgroup id directly, since this is implemetation detail. Use the accessor css_from_id() instead. This patch has no functional change. Signed-off-by: Jianyu Zhan --- net/core

[PATCH 4/4] cgroup: convert from per-cgroup id to per-subsys id

2014-04-21 Thread Jianyu Zhan
Currently, cgrp->id is only used to look up css's. As cgroup and css's lifetimes is now decoupled, it should be made per-subsystem and moved to css->css_id so that lookups are successful until the target css is released. Signed-off-by: Jianyu Zhan --- include/lin

Re: [PATCH] perf-event/cgroup: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
ll change this field, I just thought that this is a little subtle. as the comment in patches says, this is mainly for document reason to inform other maintainers that css_alloc implementation should be taken care of , depending on this field is zero or not. Thanks, Jianyu Zhan -- To unsubscribe

Re: [PATCH] cgroup: explicitly init the early_init field

2014-04-21 Thread Jianyu Zhan
On Tue, Apr 22, 2014 at 2:22 PM, Li Zefan wrote: > If you think this is the right thing to do, you can apply the same reason > to the initialization of other structures in the whole kernel tree. > >> Signed-off-by: Jianyu Zhan > > nack Hi, Li, Sorry for the noise. For c

Re: [PATCH] hugetlb_cgroup: explicitly init the early_init field

2014-04-22 Thread Jianyu Zhan
implementation, ->css_alloc will be called earlier before mm_init(). I don't think that the value of one field(early_init) has a so subtle restrition on the another field(css_alloc) is a good thing, but since it is there, docment it should be needed. Thanks, Jianyu Zhan -- To unsubscribe from th

Re: [PATCH 2/4] mm/memcontrol.c: use accessor to get id from css

2014-04-22 Thread Jianyu Zhan
Cc Andrew. Thanks, Jianyu Zhan On Tue, Apr 22, 2014 at 2:30 PM, Jianyu Zhan wrote: > This is a prepared patch for converting from per-cgroup id to > per-subsystem id. > > We should not access per-cgroup id directly, since this is implemetation > detail. Use the accessor css_fr

Re: [PATCH] perf-event/cgroup: explicitly init the early_init field

2014-04-22 Thread Jianyu Zhan
d be needed. I could resend the patch with more comment. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] cgroup: use uninitialized_var() for may-be uninitialized variable

2014-04-22 Thread Jianyu Zhan
Hi, Li, On Tue, Apr 22, 2014 at 2:26 PM, Li Zefan wrote: > > I don't see this warning, and I don't see how this is possible. You are right. No such warning. It is triggered by the other patch, should be fixed in that patch. Thanks, Jianyu Zhan -- To unsubscribe from thi

Re: [PATCH 4/4] cgroup: convert from per-cgroup id to per-subsys id

2014-04-22 Thread Jianyu Zhan
ved to css->css_id so that lookups are successful until the target css is released. Signed-off-by: Jianyu Zhan --- include/linux/cgroup.h | 26 +++ kernel/cgroup.c| 88 -- 2 files changed, 56 insertions(+), 58 deletions(-)

Re: [PATCH 2/4] mm/memcontrol.c: use accessor to get id from css

2014-04-22 Thread Jianyu Zhan
On Tue, Apr 22, 2014 at 2:30 PM, Jianyu Zhan wrote: > This is a prepared patch for converting from per-cgroup id to > per-subsystem id. > > We should not access per-cgroup id directly, since this is implemetation > detail. Use the accessor css_from_id() instead. > > This pa

Re: [PATCH 1/2] mm/memcontrol.c: remove meaningless while loop in mem_cgroup_iter()

2014-04-22 Thread Jianyu Zhan
is condition could be reduced to conditon 2.1 Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 1/2] mm/memcontrol.c: remove meaningless while loop in mem_cgroup_iter()

2014-04-22 Thread Jianyu Zhan
nd while loop, and thus omit the while loop, to save a mem_cgroup_iter_update() and a mem_cgroup_iter_update() But it maybe a bit hard to read. If it is OK, I could resend a new one. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bod

Re: [PATCH] netprio_cgroup: explicitly init the early_init field

2014-04-22 Thread Jianyu Zhan
another field(css_alloc) is a good thing, but since it is there, docment it should be needed. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.o

Re: [PATCH 1/2] mm/memcontrol.c: remove meaningless while loop in mem_cgroup_iter()

2014-04-22 Thread Jianyu Zhan
ch better to read. hmm, I agree. I will give it more thinking. Seem this has been merged into -mm. Andrew, please drop it! Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More m

[PATCH 2/2] mm/percpu.c: don't bother to re-walk the pcpu_slot list if nobody free space since we last drop pcpu_lock

2014-03-28 Thread Jianyu Zhan
ath and if we fall on the cold path, it means after satifying this allocation the chunk may be moved to lower slot, and the follow-up allocation of same or larger size(though rare) is likely to fail to cold path again. So this patch could be based on to do some heuristic later. Signed-off-by:

[PATCH 1/2] mm/percpu.c: renew the max_contig if we merge the head and previous block

2014-03-28 Thread Jianyu Zhan
hould renew the max_contig. Signed-off-by: Jianyu Zhan --- mm/percpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index 202e104..63e24fb 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -473,9 +473,11 @@ static int pcpu_alloc_area(struct pcpu_

[PATCH] mm/slab.c: cleanup outdated comments and unify variables naming

2014-03-30 Thread Jianyu Zhan
: Jianyu Zhan --- mm/slab.c | 66 +++ 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index b264214..5678673 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -277,8 +277,8 @@ static void kmem_cache_node_init

[PATCH] perf: fix 'make help' message error

2014-05-24 Thread Jianyu Zhan
t takes effect is the "DESTDIR" variable. In this case, "DESTDIR" has a empty value, so the actual install directory falls back $HOME, not '/usr/local'. Specifying "DESTDIR=/usr/local" will work as desired. This patch fixes the help message. Signed-off-by:

[PATCH] perf: fix 'make help' message error

2014-05-27 Thread Jianyu Zhan
t takes effect is the "DESTDIR" variable. In this case, "DESTDIR" has a empty value, so the actual install directory falls back $HOME, not '/usr/local'. Specifying "DESTDIR=/usr/local" will work as desired. This patch fixes the help message. Signed-off-by:

Re: [PATCH] rmap: validate pointer in anon_vma_clone

2014-05-06 Thread Jianyu Zhan
ointer. Thanks, Jianyu Zhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

  1   2   >