Re: [PATCH 0/4] per anon_vma lock and turn anon_vma rwsem lock to rwlock_t

2013-11-01 Thread KOSAKI Motohiro
(11/1/13 3:54 AM), Yuanhan Liu wrote: Patch 1 turns locking the anon_vma's root to locking itself to let it be a per anon_vma lock, which would reduce contentions. In the same time, lock range becomes quite small then, which is bascially a call of anon_vma_interval_tree_insert(). Patch 2

Re: [PATCH] mm: cache largest vma

2013-11-01 Thread KOSAKI Motohiro
(11/1/13 4:17 PM), Davidlohr Bueso wrote: While caching the last used vma already does a nice job avoiding having to iterate the rbtree in find_vma, we can improve. After studying the hit rate on a load of workloads and environments, it was seen that it was around 45-50% - constant for a

[PATCH v2] mm: __rmqueue_fallback() should respect pageblock type

2013-10-31 Thread kosaki . motohiro
From: KOSAKI Motohiro When __rmqueue_fallback() don't find out a free block with the same size of required, it splits a larger page and puts back rest peiece of the page to free list. But it has one serious mistake. When putting back, __rmqueue_fallback() always use start_migratetype if type

Re: [PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

2013-10-31 Thread KOSAKI Motohiro
Nit. I would like to add following hunk. This is just nit because moving reserve pageblock is extreme rare. if (block_migratetype == MIGRATE_RESERVE) { + found++; set_pageblock_migratetype(page, MIGRATE_MOVABLE);

Re: [PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

2013-10-31 Thread KOSAKI Motohiro
Nit. I would like to add following hunk. This is just nit because moving reserve pageblock is extreme rare. if (block_migratetype == MIGRATE_RESERVE) { + found++; set_pageblock_migratetype(page, MIGRATE_MOVABLE);

[PATCH v2] mm: __rmqueue_fallback() should respect pageblock type

2013-10-31 Thread kosaki . motohiro
From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com When __rmqueue_fallback() don't find out a free block with the same size of required, it splits a larger page and puts back rest peiece of the page to free list. But it has one serious mistake. When putting back, __rmqueue_fallback() always

Re: [PATCH] mm: __rmqueue_fallback() should respect pageblock type

2013-10-30 Thread KOSAKI Motohiro
(10/31/13 12:24 AM), kosaki.motoh...@gmail.com wrote: > From: KOSAKI Motohiro > > When __rmqueue_fallback() don't find out a free block with the same size > of required, it splits a larger page and puts back rest peiece of the page > to free list. > > But it has one

Re: [PATCH] mm: __rmqueue_fallback() should respect pageblock type

2013-10-30 Thread KOSAKI Motohiro
(10/31/13 12:35 AM), Andrew Morton wrote: On Thu, 31 Oct 2013 00:24:49 -0400 kosaki.motoh...@gmail.com wrote: When __rmqueue_fallback() don't find out a free block with the same size of required, it splits a larger page and puts back rest peiece of the page to free list. But it has one

Re: [PATCH] mm: Do not walk all of system memory during show_mem

2013-10-30 Thread KOSAKI Motohiro
such information on my long oom debugging history. Acked-by: KOSAKI Motohiro -- 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 FA

[PATCH] mm: __rmqueue_fallback() should respect pageblock type

2013-10-30 Thread kosaki . motohiro
From: KOSAKI Motohiro When __rmqueue_fallback() don't find out a free block with the same size of required, it splits a larger page and puts back rest peiece of the page to free list. But it has one serious mistake. When putting back, __rmqueue_fallback() always use start_migratetype if type

Re: [PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

2013-10-30 Thread KOSAKI Motohiro
@@ -3926,11 +3929,11 @@ static void setup_zone_migrate_reserve(struct zone *zone) /* * Reserve blocks are generally in place to help high-order atomic * allocations that are short-lived. A min_free_kbytes value that -* would result in more than 2 reserve blocks

Re: [PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

2013-10-30 Thread KOSAKI Motohiro
(10/30/13 11:19 AM), Mel Gorman wrote: On Wed, Oct 23, 2013 at 05:01:32PM -0400, kosaki.motoh...@gmail.com wrote: From: KOSAKI Motohiro Yasuaki Ithimatsu reported memory hot-add spent more than 5 _hours_ on 9TB memory machine and we found out setup_zone_migrate_reserve spnet >90% t

Re: [PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

2013-10-30 Thread KOSAKI Motohiro
(10/30/13 11:19 AM), Mel Gorman wrote: On Wed, Oct 23, 2013 at 05:01:32PM -0400, kosaki.motoh...@gmail.com wrote: From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com Yasuaki Ithimatsu reported memory hot-add spent more than 5 _hours_ on 9TB memory machine and we found out

Re: [PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

2013-10-30 Thread KOSAKI Motohiro
@@ -3926,11 +3929,11 @@ static void setup_zone_migrate_reserve(struct zone *zone) /* * Reserve blocks are generally in place to help high-order atomic * allocations that are short-lived. A min_free_kbytes value that -* would result in more than 2 reserve blocks

[PATCH] mm: __rmqueue_fallback() should respect pageblock type

2013-10-30 Thread kosaki . motohiro
From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com When __rmqueue_fallback() don't find out a free block with the same size of required, it splits a larger page and puts back rest peiece of the page to free list. But it has one serious mistake. When putting back, __rmqueue_fallback() always

Re: [PATCH] mm: Do not walk all of system memory during show_mem

2013-10-30 Thread KOSAKI Motohiro
used such information on my long oom debugging history. Acked-by: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com -- 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

Re: [PATCH] mm: __rmqueue_fallback() should respect pageblock type

2013-10-30 Thread KOSAKI Motohiro
(10/31/13 12:35 AM), Andrew Morton wrote: On Thu, 31 Oct 2013 00:24:49 -0400 kosaki.motoh...@gmail.com wrote: When __rmqueue_fallback() don't find out a free block with the same size of required, it splits a larger page and puts back rest peiece of the page to free list. But it has one

Re: [PATCH] mm: __rmqueue_fallback() should respect pageblock type

2013-10-30 Thread KOSAKI Motohiro
(10/31/13 12:24 AM), kosaki.motoh...@gmail.com wrote: From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com When __rmqueue_fallback() don't find out a free block with the same size of required, it splits a larger page and puts back rest peiece of the page to free list. But it has one

Re: [PATCH] mm: cma: free cma page to buddy instead of being cpu hot page

2013-10-29 Thread KOSAKI Motohiro
> The concern is likely/unlikely usage is proper in this code peice. > If we don't use memory isolation, the code path is used for only > MIGRATE_RESERVE which is very rare allocation in normal workload. > > Even, in memory isolation environement, I'm not sure how many > CMA/HOTPLUG is used

Re: [PATCH] mm: cma: free cma page to buddy instead of being cpu hot page

2013-10-29 Thread KOSAKI Motohiro
The concern is likely/unlikely usage is proper in this code peice. If we don't use memory isolation, the code path is used for only MIGRATE_RESERVE which is very rare allocation in normal workload. Even, in memory isolation environement, I'm not sure how many CMA/HOTPLUG is used compared to

[PATCH] Fix page_group_by_mobility_disabled breakage

2013-10-25 Thread kosaki . motohiro
From: KOSAKI Motohiro Currently, set_pageblock_migratetype screw up MIGRATE_CMA and MIGRATE_ISOLATE if page_group_by_mobility_disabled is true. It rewrite the argument to MIGRATE_UNMOVABLE and we lost these attribute. The problem was introduced commit 49255c619f (page allocator: move check

[PATCH] mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag()

2013-10-25 Thread kosaki . motohiro
From: KOSAKI Motohiro In general, every tracepoint should be zero overhead if it is disabled. However, trace_mm_page_alloc_extfrag() is one of exception. It evaluate "new_type == start_migratetype" even if tracepoint is disabled. However, the code can be moved into tracepoint's TP_f

[PATCH] mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag()

2013-10-25 Thread kosaki . motohiro
From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com In general, every tracepoint should be zero overhead if it is disabled. However, trace_mm_page_alloc_extfrag() is one of exception. It evaluate new_type == start_migratetype even if tracepoint is disabled. However, the code can be moved

[PATCH] Fix page_group_by_mobility_disabled breakage

2013-10-25 Thread kosaki . motohiro
From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com Currently, set_pageblock_migratetype screw up MIGRATE_CMA and MIGRATE_ISOLATE if page_group_by_mobility_disabled is true. It rewrite the argument to MIGRATE_UNMOVABLE and we lost these attribute. The problem was introduced commit 49255c619f

[PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

2013-10-23 Thread kosaki . motohiro
From: KOSAKI Motohiro Yasuaki Ithimatsu reported memory hot-add spent more than 5 _hours_ on 9TB memory machine and we found out setup_zone_migrate_reserve spnet >90% time. The problem is, setup_zone_migrate_reserve scan all pageblock unconditionally, but it is only necessary number of reser

[PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

2013-10-23 Thread kosaki . motohiro
From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com Yasuaki Ithimatsu reported memory hot-add spent more than 5 _hours_ on 9TB memory machine and we found out setup_zone_migrate_reserve spnet 90% time. The problem is, setup_zone_migrate_reserve scan all pageblock unconditionally, but it is only

Re: [PATCH] alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist

2013-10-18 Thread KOSAKI Motohiro
On 10/18/2013 6:39 PM, John Stultz wrote: > On 10/17/2013 06:12 PM, KOSAKI Motohiro wrote: >> (10/17/13 1:05 PM), John Stultz wrote: >>> On 10/14/2013 02:33 PM, kosaki.motoh...@gmail.com wrote: >>>> From: KOSAKI Motohiro >>>> >>>> Fedora Ruby

Re: [PATCH] alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist

2013-10-18 Thread KOSAKI Motohiro
On 10/18/2013 6:39 PM, John Stultz wrote: On 10/17/2013 06:12 PM, KOSAKI Motohiro wrote: (10/17/13 1:05 PM), John Stultz wrote: On 10/14/2013 02:33 PM, kosaki.motoh...@gmail.com wrote: From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com Fedora Ruby maintainer reported latest Ruby doesn't

Re: [PATCH] alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist

2013-10-17 Thread KOSAKI Motohiro
(10/17/13 1:05 PM), John Stultz wrote: On 10/14/2013 02:33 PM, kosaki.motoh...@gmail.com wrote: From: KOSAKI Motohiro Fedora Ruby maintainer reported latest Ruby doesn't work on Fedora Rawhide on ARM. (http://bugs.ruby-lang.org/issues/9008) Because of, commit 1c6b39ad3f (alarmtimers: Return

Re: [PATCH] alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist

2013-10-17 Thread KOSAKI Motohiro
(10/17/13 1:05 PM), John Stultz wrote: On 10/14/2013 02:33 PM, kosaki.motoh...@gmail.com wrote: From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com Fedora Ruby maintainer reported latest Ruby doesn't work on Fedora Rawhide on ARM. (http://bugs.ruby-lang.org/issues/9008) Because of, commit

[PATCH] alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist

2013-10-14 Thread kosaki . motohiro
From: KOSAKI Motohiro Fedora Ruby maintainer reported latest Ruby doesn't work on Fedora Rawhide on ARM. (http://bugs.ruby-lang.org/issues/9008) Because of, commit 1c6b39ad3f (alarmtimers: Return -ENOTSUPP if no RTC device is present) intruduced to return ENOTSUPP when clock_get{time,res} can't

[PATCH] alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist

2013-10-14 Thread kosaki . motohiro
From: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com Fedora Ruby maintainer reported latest Ruby doesn't work on Fedora Rawhide on ARM. (http://bugs.ruby-lang.org/issues/9008) Because of, commit 1c6b39ad3f (alarmtimers: Return -ENOTSUPP if no RTC device is present) intruduced to return ENOTSUPP

Re: [PATCH 05/14] vrange: Add new vrange(2) system call

2013-10-07 Thread KOSAKI Motohiro
(10/7/13 11:07 PM), Minchan Kim wrote: Hi KOSAKI, On Mon, Oct 07, 2013 at 10:51:18PM -0400, KOSAKI Motohiro wrote: Maybe, int madvise5(addr, length, MADV_DONTNEED|MADV_LAZY|MADV_SIGBUS, , ); Another reason to make it hard is that madvise(2) is tight coupled with with vmas split/merge

Re: [PATCH 05/14] vrange: Add new vrange(2) system call

2013-10-07 Thread KOSAKI Motohiro
Maybe, int madvise5(addr, length, MADV_DONTNEED|MADV_LAZY|MADV_SIGBUS, , ); Another reason to make it hard is that madvise(2) is tight coupled with with vmas split/merge. It needs mmap_sem's write-side lock and it hurt anon-vrange test performance much heavily and userland might want to

Re: [PATCH 18/26] mm: Convert process_vm_rw_pages() to use get_user_pages_unlocked()

2013-10-07 Thread KOSAKI Motohiro
(10/7/13 4:55 PM), Jan Kara wrote: On Thu 03-10-13 18:40:06, KOSAKI Motohiro wrote: (10/2/13 3:36 PM), Jan Kara wrote: On Wed 02-10-13 12:32:33, KOSAKI Motohiro wrote: (10/2/13 10:27 AM), Jan Kara wrote: Signed-off-by: Jan Kara --- mm/process_vm_access.c | 8 ++-- 1 file changed, 2

Re: [PATCH 18/26] mm: Convert process_vm_rw_pages() to use get_user_pages_unlocked()

2013-10-07 Thread KOSAKI Motohiro
(10/7/13 4:55 PM), Jan Kara wrote: On Thu 03-10-13 18:40:06, KOSAKI Motohiro wrote: (10/2/13 3:36 PM), Jan Kara wrote: On Wed 02-10-13 12:32:33, KOSAKI Motohiro wrote: (10/2/13 10:27 AM), Jan Kara wrote: Signed-off-by: Jan Kara j...@suse.cz --- mm/process_vm_access.c | 8 ++-- 1

Re: [PATCH 05/14] vrange: Add new vrange(2) system call

2013-10-07 Thread KOSAKI Motohiro
Maybe, int madvise5(addr, length, MADV_DONTNEED|MADV_LAZY|MADV_SIGBUS, purged, ret); Another reason to make it hard is that madvise(2) is tight coupled with with vmas split/merge. It needs mmap_sem's write-side lock and it hurt anon-vrange test performance much heavily and userland

Re: [PATCH 05/14] vrange: Add new vrange(2) system call

2013-10-07 Thread KOSAKI Motohiro
(10/7/13 11:07 PM), Minchan Kim wrote: Hi KOSAKI, On Mon, Oct 07, 2013 at 10:51:18PM -0400, KOSAKI Motohiro wrote: Maybe, int madvise5(addr, length, MADV_DONTNEED|MADV_LAZY|MADV_SIGBUS, purged, ret); Another reason to make it hard is that madvise(2) is tight coupled with with vmas

Re: [PATCH 18/26] mm: Convert process_vm_rw_pages() to use get_user_pages_unlocked()

2013-10-03 Thread KOSAKI Motohiro
(10/2/13 3:36 PM), Jan Kara wrote: On Wed 02-10-13 12:32:33, KOSAKI Motohiro wrote: (10/2/13 10:27 AM), Jan Kara wrote: Signed-off-by: Jan Kara --- mm/process_vm_access.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mm/process_vm_access.c b/mm

Re: [PATCH 18/26] mm: Convert process_vm_rw_pages() to use get_user_pages_unlocked()

2013-10-03 Thread KOSAKI Motohiro
(10/2/13 3:36 PM), Jan Kara wrote: On Wed 02-10-13 12:32:33, KOSAKI Motohiro wrote: (10/2/13 10:27 AM), Jan Kara wrote: Signed-off-by: Jan Kara j...@suse.cz --- mm/process_vm_access.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mm/process_vm_access.c b/mm

Re: [PATCH 18/26] mm: Convert process_vm_rw_pages() to use get_user_pages_unlocked()

2013-10-02 Thread KOSAKI Motohiro
(10/2/13 10:27 AM), Jan Kara wrote: > Signed-off-by: Jan Kara > --- > mm/process_vm_access.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/mm/process_vm_access.c b/mm/process_vm_access.c > index fd26d0433509..c1bc47d8ed90 100644 > ---

Re: [PATCH 16/26] mm: Provide get_user_pages_unlocked()

2013-10-02 Thread KOSAKI Motohiro
(10/2/13 10:27 AM), Jan Kara wrote: > Provide a wrapper for get_user_pages() which takes care of acquiring and > releasing mmap_sem. Using this function reduces amount of places in > which we deal with mmap_sem. > > Signed-off-by: Jan Kara > --- > include/linux/mm.h | 14 ++ > 1

Re: [PATCH 16/26] mm: Provide get_user_pages_unlocked()

2013-10-02 Thread KOSAKI Motohiro
(10/2/13 10:27 AM), Jan Kara wrote: Provide a wrapper for get_user_pages() which takes care of acquiring and releasing mmap_sem. Using this function reduces amount of places in which we deal with mmap_sem. Signed-off-by: Jan Kara j...@suse.cz --- include/linux/mm.h | 14 ++

Re: [PATCH 18/26] mm: Convert process_vm_rw_pages() to use get_user_pages_unlocked()

2013-10-02 Thread KOSAKI Motohiro
(10/2/13 10:27 AM), Jan Kara wrote: Signed-off-by: Jan Kara j...@suse.cz --- mm/process_vm_access.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mm/process_vm_access.c b/mm/process_vm_access.c index fd26d0433509..c1bc47d8ed90 100644 ---

Re: [patch for-3.12] mm, memcg: protect mem_cgroup_read_events for cpu hotplug

2013-10-01 Thread KOSAKI Motohiro
(10/1/13 7:31 PM), David Rientjes wrote: for_each_online_cpu() needs the protection of {get,put}_online_cpus() so cpu_online_mask doesn't change during the iteration. Signed-off-by: David Rientjes Acked-by: KOSAKI Motohiro -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCHv2 2/2] mm: add a field to store names for private anonymous memory

2013-10-01 Thread KOSAKI Motohiro
> +static void seq_print_vma_name(struct seq_file *m, struct vm_area_struct > *vma) > +{ > + const char __user *name = vma_get_anon_name(vma); > + struct mm_struct *mm = vma->vm_mm; > + > + unsigned long page_start_vaddr; > + unsigned long page_offset; > + unsigned long

Re: [PATCHv2 2/2] mm: add a field to store names for private anonymous memory

2013-10-01 Thread KOSAKI Motohiro
+static void seq_print_vma_name(struct seq_file *m, struct vm_area_struct *vma) +{ + const char __user *name = vma_get_anon_name(vma); + struct mm_struct *mm = vma-vm_mm; + + unsigned long page_start_vaddr; + unsigned long page_offset; + unsigned long num_pages; +

Re: [patch for-3.12] mm, memcg: protect mem_cgroup_read_events for cpu hotplug

2013-10-01 Thread KOSAKI Motohiro
(10/1/13 7:31 PM), David Rientjes wrote: for_each_online_cpu() needs the protection of {get,put}_online_cpus() so cpu_online_mask doesn't change during the iteration. Signed-off-by: David Rientjes rient...@google.com Acked-by: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com -- To unsubscribe

Re: [RESEND PATCH v5 3/4] mm/vmalloc: revert "mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info"

2013-09-16 Thread KOSAKI Motohiro
On Mon, Sep 16, 2013 at 8:18 PM, Wanpeng Li wrote: > Hi KOSAKI, > On Mon, Sep 16, 2013 at 05:23:32PM -0400, KOSAKI Motohiro wrote: >>On 9/14/2013 7:45 PM, Wanpeng Li wrote: >>> Changelog: >>> *v2 -> v3: revert commit d157a558 directly >>> >>

Re: [RESEND PATCH v5 2/4] mm/vmalloc: revert "mm/vmalloc.c: emit the failure message before return"

2013-09-16 Thread KOSAKI Motohiro
On Mon, Sep 16, 2013 at 7:41 PM, Wanpeng Li wrote: > Hi KOSAKI, > On Mon, Sep 16, 2013 at 04:15:29PM -0400, KOSAKI Motohiro wrote: >>On 9/14/2013 7:45 PM, Wanpeng Li wrote: >>> Changelog: >>> *v2 -> v3: revert commit 46c001a2 directly >>> >

Re: [RESEND PATCH v5 3/4] mm/vmalloc: revert "mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info"

2013-09-16 Thread KOSAKI Motohiro
On 9/14/2013 7:45 PM, Wanpeng Li wrote: > Changelog: > *v2 -> v3: revert commit d157a558 directly > > The VM_UNINITIALIZED/VM_UNLIST flag introduced by commit f5252e00(mm: avoid > null pointer access in vm_struct via /proc/vmallocinfo) is used to avoid > accessing the pages field with

Re: [RESEND PATCH v5 2/4] mm/vmalloc: revert "mm/vmalloc.c: emit the failure message before return"

2013-09-16 Thread KOSAKI Motohiro
On 9/14/2013 7:45 PM, Wanpeng Li wrote: > Changelog: > *v2 -> v3: revert commit 46c001a2 directly > > Don't warning twice in __vmalloc_area_node and __vmalloc_node_range if > __vmalloc_area_node allocation failure. This patch revert commit 46c001a2 > (mm/vmalloc.c: emit the failure message

Re: [RESEND PATCH v5 1/4] mm/vmalloc: don't set area->caller twice

2013-09-16 Thread KOSAKI Motohiro
On 9/14/2013 7:45 PM, Wanpeng Li wrote: > Changelog: > *v1 -> v2: rebase against mmotm tree > > The caller address has already been set in set_vmalloc_vm(), there's no need setup_vmalloc_vm() > to set it again in __vmalloc_area_node. > >

Re: [RESEND PATCH v5 4/4] mm/vmalloc: fix show vmap_area information race with vmap_area tear down

2013-09-16 Thread KOSAKI Motohiro
> down in race window mentioned above. This patch fix it by don't dump any > information for !VM_VM_AREA case and also remove (VM_LAZY_FREE | > VM_LAZY_FREEING) > check since they are not possible for !VM_VM_AREA case. > > Suggested-by: Joonsoo Kim > Signed-off-by: Wanpeng Li A

Re: [PATCH] mm/mempolicy: use NUMA_NO_NODE

2013-09-16 Thread KOSAKI Motohiro
(9/16/13 8:53 AM), Jianguo Wu wrote: Use more appropriate NUMA_NO_NODE instead of -1 Signed-off-by: Jianguo Wu --- mm/mempolicy.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) I think this patch don't make any functional change, right? Acked-by: KOSAKI Motohiro

Re: [PATCH] mm/mempolicy: use NUMA_NO_NODE

2013-09-16 Thread KOSAKI Motohiro
-by: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com -- 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: [RESEND PATCH v5 4/4] mm/vmalloc: fix show vmap_area information race with vmap_area tear down

2013-09-16 Thread KOSAKI Motohiro
for !VM_VM_AREA case. Suggested-by: Joonsoo Kim iamjoonsoo@lge.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com Acked-by: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org

Re: [RESEND PATCH v5 1/4] mm/vmalloc: don't set area-caller twice

2013-09-16 Thread KOSAKI Motohiro
On 9/14/2013 7:45 PM, Wanpeng Li wrote: Changelog: *v1 - v2: rebase against mmotm tree The caller address has already been set in set_vmalloc_vm(), there's no need setup_vmalloc_vm() to set it again in __vmalloc_area_node. Reviewed-by: Zhang

Re: [RESEND PATCH v5 2/4] mm/vmalloc: revert mm/vmalloc.c: emit the failure message before return

2013-09-16 Thread KOSAKI Motohiro
On 9/14/2013 7:45 PM, Wanpeng Li wrote: Changelog: *v2 - v3: revert commit 46c001a2 directly Don't warning twice in __vmalloc_area_node and __vmalloc_node_range if __vmalloc_area_node allocation failure. This patch revert commit 46c001a2 (mm/vmalloc.c: emit the failure message before

Re: [RESEND PATCH v5 3/4] mm/vmalloc: revert mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info

2013-09-16 Thread KOSAKI Motohiro
On 9/14/2013 7:45 PM, Wanpeng Li wrote: Changelog: *v2 - v3: revert commit d157a558 directly The VM_UNINITIALIZED/VM_UNLIST flag introduced by commit f5252e00(mm: avoid null pointer access in vm_struct via /proc/vmallocinfo) is used to avoid accessing the pages field with unallocated page

Re: [RESEND PATCH v5 2/4] mm/vmalloc: revert mm/vmalloc.c: emit the failure message before return

2013-09-16 Thread KOSAKI Motohiro
On Mon, Sep 16, 2013 at 7:41 PM, Wanpeng Li liw...@linux.vnet.ibm.com wrote: Hi KOSAKI, On Mon, Sep 16, 2013 at 04:15:29PM -0400, KOSAKI Motohiro wrote: On 9/14/2013 7:45 PM, Wanpeng Li wrote: Changelog: *v2 - v3: revert commit 46c001a2 directly Don't warning twice in __vmalloc_area_node

Re: [RESEND PATCH v5 3/4] mm/vmalloc: revert mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info

2013-09-16 Thread KOSAKI Motohiro
On Mon, Sep 16, 2013 at 8:18 PM, Wanpeng Li liw...@linux.vnet.ibm.com wrote: Hi KOSAKI, On Mon, Sep 16, 2013 at 05:23:32PM -0400, KOSAKI Motohiro wrote: On 9/14/2013 7:45 PM, Wanpeng Li wrote: Changelog: *v2 - v3: revert commit d157a558 directly The VM_UNINITIALIZED/VM_UNLIST flag

Re: RFD: Non-Disruptive Core Dump Infrastructure

2013-09-13 Thread KOSAKI Motohiro
On 9/12/2013 12:45 AM, Suzuki K. Poulose wrote: > On 09/12/2013 12:57 AM, KOSAKI Motohiro wrote: >> (9/3/13 4:39 AM), Janani Venkataraman wrote: >>> Hello, >>> >>> We are working on an infrastructure to create a system core file of a >>> specific >

Re: RFD: Non-Disruptive Core Dump Infrastructure

2013-09-13 Thread KOSAKI Motohiro
On 9/12/2013 12:45 AM, Suzuki K. Poulose wrote: On 09/12/2013 12:57 AM, KOSAKI Motohiro wrote: (9/3/13 4:39 AM), Janani Venkataraman wrote: Hello, We are working on an infrastructure to create a system core file of a specific process at run-time, non-disruptively. It can also be extended

Re: [PATCH] vsprintf: drop comment claiming %n is ignored

2013-09-11 Thread KOSAKI Motohiro
vma->vm_end, +flags & VM_READ ? 'r' : '-', +flags & VM_WRITE ? 'w' : '-', +flags & VM_EXEC ? 'x' : '-', +flags & VM_MAYSHARE ? +flags &

Re: RFD: Non-Disruptive Core Dump Infrastructure

2013-09-11 Thread KOSAKI Motohiro
(9/3/13 4:39 AM), Janani Venkataraman wrote: Hello, We are working on an infrastructure to create a system core file of a specific process at run-time, non-disruptively. It can also be extended to a case where a process is able to take a self-core dump. gcore, an existing utility creates a

Re: RFD: Non-Disruptive Core Dump Infrastructure

2013-09-11 Thread KOSAKI Motohiro
(9/3/13 4:39 AM), Janani Venkataraman wrote: Hello, We are working on an infrastructure to create a system core file of a specific process at run-time, non-disruptively. It can also be extended to a case where a process is able to take a self-core dump. gcore, an existing utility creates a

Re: [PATCH] vsprintf: drop comment claiming %n is ignored

2013-09-11 Thread KOSAKI Motohiro
' : 's' : 'p', +pgoff, +MAJOR(dev), MINOR(dev), ino); if (file) { pad_len_spaces(m, len); ack for mm parts. Acked-by: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH 10/13] x86: Move cond resched for copy_{from,to}_user into low level code 64bit

2013-08-20 Thread KOSAKI Motohiro
>> Hmm. I can do that, but wouldn't that make CONFIG_PREEMPT_VOLUNTARY >> mostly equivalent to CONFIG_PREEMPT_NONE? > > According the the Kconfig help, PREEMPT_VOLUNTARY is about the > *explicit* preemption points. And we do have a lot of them in > "might_sleep()". > > And personally, I think it

Re: [PATCH 10/13] x86: Move cond resched for copy_{from,to}_user into low level code 64bit

2013-08-20 Thread KOSAKI Motohiro
Hmm. I can do that, but wouldn't that make CONFIG_PREEMPT_VOLUNTARY mostly equivalent to CONFIG_PREEMPT_NONE? According the the Kconfig help, PREEMPT_VOLUNTARY is about the *explicit* preemption points. And we do have a lot of them in might_sleep(). And personally, I think it makes a *lot*

Re: [PATCH] mm/hotplug: Remove stop_machine() from try_offline_node()

2013-08-16 Thread KOSAKI Motohiro
This patch removes the use of stop_machine() in try_offline_node() and adds comments to try_offline_node() and remove_memory() that lock_device_hotplug() is required. This patch need more verbose explanation. check_cpu_on_node() traverse cpus and cpu hotplug seems to use

Re: [PATCH] mm/hotplug: Remove stop_machine() from try_offline_node()

2013-08-16 Thread KOSAKI Motohiro
This patch removes the use of stop_machine() in try_offline_node() and adds comments to try_offline_node() and remove_memory() that lock_device_hotplug() is required. This patch need more verbose explanation. check_cpu_on_node() traverse cpus and cpu hotplug seems to use

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 9:33 PM), Tejun Heo wrote: On Wed, Aug 14, 2013 at 09:21:33PM -0400, Tejun Heo wrote: Secondly, memory hotplug is now maintained I and kamezawa-san. Then, I much likely have a chance to get a hotplug related bug report. For protecting my life, I don't want get a false bug claim.

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 9:21 PM), Tejun Heo wrote: Hello, KOSAKI. On Wed, Aug 14, 2013 at 09:08:22PM -0400, KOSAKI Motohiro wrote: ... a fallback. Bogus and misguided fallback give a user false relief and they don't notice their mistake quickly. The answer is, there is the fundamental rule. We always said

Re: [PATCH] mm/hotplug: Remove stop_machine() from try_offline_node()

2013-08-14 Thread KOSAKI Motohiro
(8/12/13 3:34 PM), Toshi Kani wrote: > lock_device_hotplug() serializes hotplug & online/offline operations. > The lock is held in common sysfs online/offline interfaces and ACPI > hotplug code paths. > > try_offline_node() off-lines a node if all memory sections and cpus > are removed on the

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 5:36 PM), Tejun Heo wrote: > On Wed, Aug 14, 2013 at 05:17:23PM -0400, KOSAKI Motohiro wrote: >> You haven't explain practical benefit of your opinion. As far as users have >> no benefit, I'm never agree. Sorry. > > Umm... how about being more robust and actu

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 4:35 PM), Tejun Heo wrote: On Wed, Aug 14, 2013 at 04:29:05PM -0400, KOSAKI Motohiro wrote: Because boot failure have no chance to overlook and better way for practice. That's an extremely poor excuse. We favor WARNs over BUGs for good reasons. If a sysadmin cares about hotplug

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 3:55 PM), Tejun Heo wrote: Hello, On Wed, Aug 14, 2013 at 03:40:31PM -0400, KOSAKI Motohiro wrote: I don't agree it. Please look at other kernel options. A lot of these don't follow you. These behave as direction, not advise. I mean the fallback should be implemented at turning

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 2:23 PM), Tejun Heo wrote: Hello, On Wed, Aug 14, 2013 at 02:15:44PM -0400, KOSAKI Motohiro wrote: I don't follow this. We need to think why memory hotplug is necessary. Because system reboot is unacceptable on several critical services. Then, if someone set wrong boot option, systems

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/12/13 1:23 PM), H. Peter Anvin wrote: On 08/12/2013 10:01 AM, Tang Chen wrote: I'm just thinking of a more extreme case. For example, if a machine has only one node hotpluggable, and the kernel resides in that node. Then the system has no hotpluggable node. Yeah, sure, then there's no

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/12/13 2:07 PM), Tejun Heo wrote: Hey, On Tue, Aug 13, 2013 at 01:01:09AM +0800, Tang Chen wrote: Sorry for the misunderstanding. I was trying to answer your question: "Why can't the kenrel allocate hotpluggable memory opportunistic ?". I've used the wrong word, I was meaning best-effort,

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/12/13 2:07 PM), Tejun Heo wrote: Hey, On Tue, Aug 13, 2013 at 01:01:09AM +0800, Tang Chen wrote: Sorry for the misunderstanding. I was trying to answer your question: Why can't the kenrel allocate hotpluggable memory opportunistic ?. I've used the wrong word, I was meaning best-effort,

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/12/13 1:23 PM), H. Peter Anvin wrote: On 08/12/2013 10:01 AM, Tang Chen wrote: I'm just thinking of a more extreme case. For example, if a machine has only one node hotpluggable, and the kernel resides in that node. Then the system has no hotpluggable node. Yeah, sure, then there's no

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 2:23 PM), Tejun Heo wrote: Hello, On Wed, Aug 14, 2013 at 02:15:44PM -0400, KOSAKI Motohiro wrote: I don't follow this. We need to think why memory hotplug is necessary. Because system reboot is unacceptable on several critical services. Then, if someone set wrong boot option, systems

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 3:55 PM), Tejun Heo wrote: Hello, On Wed, Aug 14, 2013 at 03:40:31PM -0400, KOSAKI Motohiro wrote: I don't agree it. Please look at other kernel options. A lot of these don't follow you. These behave as direction, not advise. I mean the fallback should be implemented at turning

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 4:35 PM), Tejun Heo wrote: On Wed, Aug 14, 2013 at 04:29:05PM -0400, KOSAKI Motohiro wrote: Because boot failure have no chance to overlook and better way for practice. That's an extremely poor excuse. We favor WARNs over BUGs for good reasons. If a sysadmin cares about hotplug

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 5:36 PM), Tejun Heo wrote: On Wed, Aug 14, 2013 at 05:17:23PM -0400, KOSAKI Motohiro wrote: You haven't explain practical benefit of your opinion. As far as users have no benefit, I'm never agree. Sorry. Umm... how about being more robust and actually useable to begin with? What's

Re: [PATCH] mm/hotplug: Remove stop_machine() from try_offline_node()

2013-08-14 Thread KOSAKI Motohiro
(8/12/13 3:34 PM), Toshi Kani wrote: lock_device_hotplug() serializes hotplug online/offline operations. The lock is held in common sysfs online/offline interfaces and ACPI hotplug code paths. try_offline_node() off-lines a node if all memory sections and cpus are removed on the node. It

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 9:21 PM), Tejun Heo wrote: Hello, KOSAKI. On Wed, Aug 14, 2013 at 09:08:22PM -0400, KOSAKI Motohiro wrote: ... a fallback. Bogus and misguided fallback give a user false relief and they don't notice their mistake quickly. The answer is, there is the fundamental rule. We always said

Re: [PATCH part5 0/7] Arrange hotpluggable memory as ZONE_MOVABLE.

2013-08-14 Thread KOSAKI Motohiro
(8/14/13 9:33 PM), Tejun Heo wrote: On Wed, Aug 14, 2013 at 09:21:33PM -0400, Tejun Heo wrote: Secondly, memory hotplug is now maintained I and kamezawa-san. Then, I much likely have a chance to get a hotplug related bug report. For protecting my life, I don't want get a false bug claim.

Re: [PATCH 1/1] pagemap: fix buffer overflow in add_page_map()

2013-08-10 Thread KOSAKI Motohiro
is the size of buffer, > it is a mistake to compare pos and len in add_to_pagemap() for checking > buffer is full or not, and this can lead to buffer overflow and random > kernel panic issue. > > Correct len to be total number of PM_ENTRY_BYTES in buffer. > > Signed-off-by: Yon

Re: [PATCH 1/1] pagemap: fix buffer overflow in add_page_map()

2013-08-10 Thread KOSAKI Motohiro
-by: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com -- 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] mm/hotplug: Verify hotplug memory range

2013-08-08 Thread KOSAKI Motohiro
Note that remove_memory() has > to use BUG_ON() since this function cannot fail. > > Signed-off-by: Toshi Kani > --- > mm/memory_hotplug.c | 22 ++ memory_hotplug.c is maintained by me and kamezawa-san. Please cc us if you have a subsequent patch. Acked-by: KOSA

Re: [PATCH] mm/hotplug: Verify hotplug memory range

2013-08-08 Thread KOSAKI Motohiro
() since this function cannot fail. Signed-off-by: Toshi Kani toshi.k...@hp.com --- mm/memory_hotplug.c | 22 ++ memory_hotplug.c is maintained by me and kamezawa-san. Please cc us if you have a subsequent patch. Acked-by: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com

Re: [PATCH resend] drop_caches: add some documentation and info message

2013-08-04 Thread KOSAKI Motohiro
On Sun, Aug 4, 2013 at 4:07 AM, Michal Hocko wrote: > On Sat 03-08-13 16:16:58, KOSAKI Motohiro wrote: >> >>> You missed the "!". I'm proposing that setting the new bit 2 will >> >>> permit people to prevent the new printk if it is causing them proble

Re: [PATCH resend] drop_caches: add some documentation and info message

2013-08-04 Thread KOSAKI Motohiro
On Sun, Aug 4, 2013 at 4:07 AM, Michal Hocko mho...@suse.cz wrote: On Sat 03-08-13 16:16:58, KOSAKI Motohiro wrote: You missed the !. I'm proposing that setting the new bit 2 will permit people to prevent the new printk if it is causing them problems. No I don't. I'm sure almost all

Re: RFC: named anonymous vmas

2013-08-03 Thread KOSAKI Motohiro
On Thu, Aug 1, 2013 at 4:36 AM, Rich Felker wrote: > On Thu, Aug 01, 2013 at 01:29:51AM -0700, Christoph Hellwig wrote: >> Btw, FreeBSD has an extension to shm_open to create unnamed but fd >> passable segments. From their man page: >> >> As a FreeBSD extension, the constant SHM_ANON may be

Re: [PATCH resend] drop_caches: add some documentation and info message

2013-08-03 Thread KOSAKI Motohiro
>>> You missed the "!". I'm proposing that setting the new bit 2 will >>> permit people to prevent the new printk if it is causing them problems. >> >> No I don't. I'm sure almost all abuse users think our usage is correct. Then, >> I can imagine all crazy applications start to use this flag

Re: [PATCH resend] drop_caches: add some documentation and info message

2013-08-03 Thread KOSAKI Motohiro
You missed the !. I'm proposing that setting the new bit 2 will permit people to prevent the new printk if it is causing them problems. No I don't. I'm sure almost all abuse users think our usage is correct. Then, I can imagine all crazy applications start to use this flag eventually. I

Re: RFC: named anonymous vmas

2013-08-03 Thread KOSAKI Motohiro
On Thu, Aug 1, 2013 at 4:36 AM, Rich Felker dal...@aerifal.cx wrote: On Thu, Aug 01, 2013 at 01:29:51AM -0700, Christoph Hellwig wrote: Btw, FreeBSD has an extension to shm_open to create unnamed but fd passable segments. From their man page: As a FreeBSD extension, the constant SHM_ANON

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