Re: 3.18-rc2 sudden strike of OOM killer

2014-10-28 Thread Hillf Danton
Hey Mel FYI, the following report may be related to Kswapd 100% CPU since 3.8 on Sandybridge http://marc.info/?l=linux-mmm=141244232304682w=2 Hillf Date: Tue, 28 Oct 2014 09:53:54 +0100 From: =?UTF-8?B?T3J0d2luIEdsw7xjaw==?= o...@odi.ch To: linux-kernel@vger.kernel.org

RE: [PATCH v2 7/8] x86, perf: Only allow rdpmc if a perf_event is mapped

2014-10-27 Thread Hillf Danton
> >> Subject: Re: [PATCH v2 7/8] x86, perf: Only allow rdpmc if a perf_event is > >> mapped > >> > > CPU D CPU A > > switch_mm > > load_mm_cr4 > > x86_pmu_event_unmapped > > > > I wonder if the X86_CR4_PCE set on CPU D is > > cleared by CPU A by

RE: [PATCH v2 7/8] x86, perf: Only allow rdpmc if a perf_event is mapped

2014-10-27 Thread Hillf Danton
Subject: Re: [PATCH v2 7/8] x86, perf: Only allow rdpmc if a perf_event is mapped CPU D CPU A switch_mm load_mm_cr4 x86_pmu_event_unmapped I wonder if the X86_CR4_PCE set on CPU D is cleared by CPU A by broadcasting IPI. It should

Re: [RFC][PATCH 5/6] mm: Provide speculative fault infrastructure

2014-10-21 Thread Hillf Danton
Hey Peter > Date: Mon, 20 Oct 2014 23:56:38 +0200 > From: Peter Zijlstra > To: torva...@linux-foundation.org, paul...@linux.vnet.ibm.com, > t...@linutronix.de, a...@linux-foundation.org, r...@redhat.com, > mgor...@suse.de, o...@redhat.com, mi...@redhat.com, minc...@kernel.org, >

Re: [RFC][PATCH 5/6] mm: Provide speculative fault infrastructure

2014-10-21 Thread Hillf Danton
Hey Peter Date: Mon, 20 Oct 2014 23:56:38 +0200 From: Peter Zijlstra pet...@infradead.org To: torva...@linux-foundation.org, paul...@linux.vnet.ibm.com, t...@linutronix.de, a...@linux-foundation.org, r...@redhat.com, mgor...@suse.de, o...@redhat.com, mi...@redhat.com, minc...@kernel.org,

Re: [PATCH v6 8/8] ARM: mm: allow text and rodata sections to be read-only

2014-10-17 Thread Hillf Danton
Hey Kees > From: Kees Cook > To: linux-kernel@vger.kernel.org > Cc: Kees Cook , Will Deacon , > Rabin Vincent , Laura Abbott , Rob > Herring , Leif Lindholm , Mark > Salter , Liu hua < > Subject: [PATCH v6 8/8] ARM: mm: allow text and rodata sections to be > read-only > Date: Thu, 18 Sep

Re: [PATCH v6 8/8] ARM: mm: allow text and rodata sections to be read-only

2014-10-17 Thread Hillf Danton
Hey Kees From: Kees Cook keesc...@chromium.org To: linux-kernel@vger.kernel.org Cc: Kees Cook keesc...@chromium.org, Will Deacon will.dea...@arm.com, Rabin Vincent ra...@rab.in, Laura Abbott lau...@codeaurora.org, Rob Herring r...@kernel.org, Leif Lindholm leif.lindh...@linaro.org, Mark

Re:

2014-10-16 Thread Hillf Danton
Hey Kees > From: Kees Cook > To: linux-kernel@vger.kernel.org > Cc: Kees Cook , Will Deacon , > Rabin Vincent , Laura Abbott , Rob > Herring , Leif Lindholm , Mark > Salter , Liu hua < > Subject: [PATCH v6 8/8] ARM: mm: allow text and rodata sections to be > read-only > Date: Thu, 18 Sep

Re:

2014-10-16 Thread Hillf Danton
Hey Kees From: Kees Cook keesc...@chromium.org To: linux-kernel@vger.kernel.org Cc: Kees Cook keesc...@chromium.org, Will Deacon will.dea...@arm.com, Rabin Vincent ra...@rab.in, Laura Abbott lau...@codeaurora.org, Rob Herring r...@kernel.org, Leif Lindholm leif.lindh...@linaro.org, Mark

Re: [RFC 2/5] x86: Store a per-cpu shadow copy of CR4

2014-10-15 Thread Hillf Danton
Hey Andy > > Context switches and TLB flushes can change individual bits of CR4. > CR4 reads take several cycles, so store a shadow copy of CR4 in a > per-cpu variable. > > To avoid wasting a cache line, I added the CR4 shadow to > cpu_tlbstate, which is already touched during context switches. >

Re: [RFC 2/5] x86: Store a per-cpu shadow copy of CR4

2014-10-15 Thread Hillf Danton
Hey Andy Context switches and TLB flushes can change individual bits of CR4. CR4 reads take several cycles, so store a shadow copy of CR4 in a per-cpu variable. To avoid wasting a cache line, I added the CR4 shadow to cpu_tlbstate, which is already touched during context switches.

Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-22 Thread Hillf Danton
Hi Jonathan On Tue, Jul 22, 2014 at 12:56 AM, Jonathan Davies wrote: > > > On 18/07/14 15:08, Peter Zijlstra wrote: >> >> On Fri, Jul 18, 2014 at 01:59:06PM +0100, Jonathan Davies wrote: >>> >>> The current implementation of idle_cpu only considers tasks that might be >>> in the >>> CPU's

Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-22 Thread Hillf Danton
Hi Jonathan On Tue, Jul 22, 2014 at 12:56 AM, Jonathan Davies jonathan.dav...@citrix.com wrote: On 18/07/14 15:08, Peter Zijlstra wrote: On Fri, Jul 18, 2014 at 01:59:06PM +0100, Jonathan Davies wrote: The current implementation of idle_cpu only considers tasks that might be in the CPU's

Re: How to automate checkpatch && get_maintainers && git send-email of commits range?

2014-07-18 Thread Hillf Danton
On Sat, Jul 19, 2014 at 9:31 AM, Steven Rostedt wrote: > On Fri, Jul 18, 2014 at 06:22:15PM -0400, Theodore Ts'o wrote: >> >> And then think very hard about which patches people need to see in >> order to be able to evaluate a patch. For example, if you have patch >> 1 out of a series which adds

Re: How to automate checkpatch get_maintainers git send-email of commits range?

2014-07-18 Thread Hillf Danton
On Sat, Jul 19, 2014 at 9:31 AM, Steven Rostedt rost...@goodmis.org wrote: On Fri, Jul 18, 2014 at 06:22:15PM -0400, Theodore Ts'o wrote: And then think very hard about which patches people need to see in order to be able to evaluate a patch. For example, if you have patch 1 out of a series

[tip:sched/core] sched: Fix CACHE_HOT_BUDY condition

2014-06-19 Thread tip-bot for Hillf Danton
Commit-ID: 5d5e2b1bcbdc996e72815c03fdc5ea82c4642397 Gitweb: http://git.kernel.org/tip/5d5e2b1bcbdc996e72815c03fdc5ea82c4642397 Author: Hillf Danton AuthorDate: Tue, 10 Jun 2014 10:58:43 +0200 Committer: Ingo Molnar CommitDate: Wed, 18 Jun 2014 18:29:59 +0200 sched: Fix CACHE_HOT_BUDY

[tip:sched/core] sched: Fix CACHE_HOT_BUDY condition

2014-06-19 Thread tip-bot for Hillf Danton
Commit-ID: 5d5e2b1bcbdc996e72815c03fdc5ea82c4642397 Gitweb: http://git.kernel.org/tip/5d5e2b1bcbdc996e72815c03fdc5ea82c4642397 Author: Hillf Danton dhi...@gmail.com AuthorDate: Tue, 10 Jun 2014 10:58:43 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 18 Jun 2014 18:29:59

Re: [PATCH v2 -next] x86,vdso: Fix an OOPS accessing the hpet mapping w/o an hpet

2014-05-14 Thread Hillf Danton
On Thu, May 15, 2014 at 11:38 AM, Andrew Morton wrote: > > We could easily change the interface so that pages==NULL means "no > pages" but that isn't the way it works at present. > Yeah, thanks /Hillf -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH v2 -next] x86,vdso: Fix an OOPS accessing the hpet mapping w/o an hpet

2014-05-14 Thread Hillf Danton
Hi Andy, On Thu, May 15, 2014 at 7:46 AM, Andy Lutomirski wrote: > The oops can be triggered in qemu using -no-hpet (but not nohpet) by > reading a couple of pages past the end of the vdso text. This > should send SIGBUS instead of OOPSing. > > The bug was introduced by: > > commit

Re: [PATCH v2 -next] x86,vdso: Fix an OOPS accessing the hpet mapping w/o an hpet

2014-05-14 Thread Hillf Danton
Hi Andy, On Thu, May 15, 2014 at 7:46 AM, Andy Lutomirski l...@amacapital.net wrote: The oops can be triggered in qemu using -no-hpet (but not nohpet) by reading a couple of pages past the end of the vdso text. This should send SIGBUS instead of OOPSing. The bug was introduced by: commit

Re: [PATCH v2 -next] x86,vdso: Fix an OOPS accessing the hpet mapping w/o an hpet

2014-05-14 Thread Hillf Danton
On Thu, May 15, 2014 at 11:38 AM, Andrew Morton a...@linux-foundation.org wrote: We could easily change the interface so that pages==NULL means no pages but that isn't the way it works at present. Yeah, thanks /Hillf -- To unsubscribe from this list: send the line unsubscribe linux-kernel in

Re: [patch v2] Documentation/email-clients.txt: add a section about git

2014-05-08 Thread Hillf Danton
On Thu, May 8, 2014 at 5:05 PM, Julian Andres Klode wrote: > On Thu, May 08, 2014 at 11:44:12AM +0300, Dan Carpenter wrote: >> +as raw text including all the headers. Run `cat raw_email.txt | git am` > > `cat raw_email.txt | git am` seems a bit pointless. Why not simply > `git am raw_email.txt`?

Re: [patch v2] Documentation/email-clients.txt: add a section about git

2014-05-08 Thread Hillf Danton
On Thu, May 8, 2014 at 5:05 PM, Julian Andres Klode j...@jak-linux.org wrote: On Thu, May 08, 2014 at 11:44:12AM +0300, Dan Carpenter wrote: +as raw text including all the headers. Run `cat raw_email.txt | git am` `cat raw_email.txt | git am` seems a bit pointless. Why not simply `git am

Re: mm: hangs in collapse_huge_page

2014-05-01 Thread Hillf Danton
hi all On Wed, Apr 30, 2014 at 11:42 PM, Kirill A. Shutemov wrote: > On Tue, Apr 15, 2014 at 10:06:56PM -0400, Sasha Levin wrote: >> Hi all, >> >> I often see hung task triggering in khugepaged within collapse_huge_page(). >> >> I've initially assumed the case may be that the guests are too

Re: mm: hangs in collapse_huge_page

2014-05-01 Thread Hillf Danton
hi all On Wed, Apr 30, 2014 at 11:42 PM, Kirill A. Shutemov kir...@shutemov.name wrote: On Tue, Apr 15, 2014 at 10:06:56PM -0400, Sasha Levin wrote: Hi all, I often see hung task triggering in khugepaged within collapse_huge_page(). I've initially assumed the case may be that the guests are

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

2014-04-22 Thread Hillf Danton
On Tue, Apr 22, 2014 at 1:30 PM, Jianyu Zhan wrote: > 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

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

2014-04-22 Thread Hillf Danton
On Tue, Apr 22, 2014 at 1:30 PM, Jianyu Zhan nasa4...@gmail.com wrote: 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

Re: [PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-11-06 Thread Hillf Danton
On Tue, Oct 29, 2013 at 6:16 AM, Dave Hansen wrote: > + > +void copy_high_order_page(struct page *newpage, > + struct page *oldpage, > + int order) > +{ > + int i; > + > + might_sleep(); > + for (i = 0; i < (1< +

Re: [PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-11-06 Thread Hillf Danton
On Tue, Oct 29, 2013 at 6:16 AM, Dave Hansen d...@sr71.net wrote: + +void copy_high_order_page(struct page *newpage, + struct page *oldpage, + int order) +{ + int i; + + might_sleep(); + for (i = 0; i (1order); i++) { +

Re: [RFC PATCH] mm: numa: adjust hinting fault record if page is migrated

2013-09-14 Thread Hillf Danton
Hello Rik On Sat, Sep 14, 2013 at 11:55 PM, Rik van Riel wrote: > On 09/14/2013 07:53 AM, Hillf Danton wrote: >> After page A on source node is migrated to page B on target node, hinting >> fault is recorded on the target node for B. On the source node there is >> anothe

Re: [RFC PATCH] mm: numa: adjust hinting fault record if page is migrated

2013-09-14 Thread Hillf Danton
Hello Rik On Sat, Sep 14, 2013 at 11:55 PM, Rik van Riel r...@redhat.com wrote: On 09/14/2013 07:53 AM, Hillf Danton wrote: After page A on source node is migrated to page B on target node, hinting fault is recorded on the target node for B. On the source node there is another record

Re: [PATCH 41/50] sched: numa: Use {cpu, pid} to create task groups for shared faults

2013-09-12 Thread Hillf Danton
Hello Mel On Tue, Sep 10, 2013 at 5:32 PM, Mel Gorman wrote: > > +void task_numa_free(struct task_struct *p) > +{ > + struct numa_group *grp = p->numa_group; > + int i; > + > + kfree(p->numa_faults); > + > + if (grp) { > + for (i = 0; i < 2*nr_node_ids; i++)

Re: [PATCH 41/50] sched: numa: Use {cpu, pid} to create task groups for shared faults

2013-09-12 Thread Hillf Danton
Hello Mel On Tue, Sep 10, 2013 at 5:32 PM, Mel Gorman wrote: > > +void task_numa_free(struct task_struct *p) > +{ > + struct numa_group *grp = p->numa_group; > + int i; > + > + kfree(p->numa_faults); > + > + if (grp) { > + for (i = 0; i < 2*nr_node_ids; i++)

Re: [PATCH 41/50] sched: numa: Use {cpu, pid} to create task groups for shared faults

2013-09-12 Thread Hillf Danton
Hello Mel On Tue, Sep 10, 2013 at 5:32 PM, Mel Gorman mgor...@suse.de wrote: +void task_numa_free(struct task_struct *p) +{ + struct numa_group *grp = p-numa_group; + int i; + + kfree(p-numa_faults); + + if (grp) { + for (i = 0; i 2*nr_node_ids;

Re: [PATCH 41/50] sched: numa: Use {cpu, pid} to create task groups for shared faults

2013-09-12 Thread Hillf Danton
Hello Mel On Tue, Sep 10, 2013 at 5:32 PM, Mel Gorman mgor...@suse.de wrote: +void task_numa_free(struct task_struct *p) +{ + struct numa_group *grp = p-numa_group; + int i; + + kfree(p-numa_faults); + + if (grp) { + for (i = 0; i 2*nr_node_ids;

Re: [PATCH 27/50] mm: numa: Scan pages with elevated page_mapcount

2013-09-11 Thread Hillf Danton
Hillo Mel On Tue, Sep 10, 2013 at 5:32 PM, Mel Gorman wrote: > Currently automatic NUMA balancing is unable to distinguish between false > shared versus private pages except by ignoring pages with an elevated > page_mapcount entirely. This avoids shared pages bouncing between the > nodes whose

Re: [PATCH 27/50] mm: numa: Scan pages with elevated page_mapcount

2013-09-11 Thread Hillf Danton
Hillo Mel On Tue, Sep 10, 2013 at 5:32 PM, Mel Gorman mgor...@suse.de wrote: Currently automatic NUMA balancing is unable to distinguish between false shared versus private pages except by ignoring pages with an elevated page_mapcount entirely. This avoids shared pages bouncing between the

Re: [PATCH 01/50] sched: monolithic code dump of what is being pushed upstream

2013-09-10 Thread Hillf Danton
On Tue, Sep 10, 2013 at 5:31 PM, Mel Gorman wrote: > @@ -5045,15 +5038,50 @@ static int need_active_balance(struct lb_env *env) > > static int active_load_balance_cpu_stop(void *data); > > +static int should_we_balance(struct lb_env *env) > +{ > + struct sched_group *sg = env->sd->groups;

Re: [PATCH 01/50] sched: monolithic code dump of what is being pushed upstream

2013-09-10 Thread Hillf Danton
On Tue, Sep 10, 2013 at 5:31 PM, Mel Gorman mgor...@suse.de wrote: @@ -5045,15 +5038,50 @@ static int need_active_balance(struct lb_env *env) static int active_load_balance_cpu_stop(void *data); +static int should_we_balance(struct lb_env *env) +{ + struct sched_group *sg =

Re: hugetlb: NULL ptr deref in region_truncate

2013-09-08 Thread Hillf Danton
On Sun, Sep 8, 2013 at 10:46 PM, Sasha Levin wrote: > Hi all, > > While fuzzing with trinity inside a KVM tools guest, running latest -next > kernel, I've > stumbled on the following: > > [ 998.281867] BUG: unable to handle kernel NULL pointer dereference at > 0274 > [ 998.28]

Re: hugetlb: NULL ptr deref in region_truncate

2013-09-08 Thread Hillf Danton
On Sun, Sep 8, 2013 at 10:46 PM, Sasha Levin sasha.le...@oracle.com wrote: Hi all, While fuzzing with trinity inside a KVM tools guest, running latest -next kernel, I've stumbled on the following: [ 998.281867] BUG: unable to handle kernel NULL pointer dereference at 0274 [

Re: 3.11-rc7:BUG: soft lockup

2013-08-30 Thread Hillf Danton
On Fri, Aug 30, 2013 at 8:18 PM, Cong Wang wrote: > Cc'ing netdev > > On Fri, Aug 30, 2013 at 4:20 PM, Baoquan He wrote: >> Hi, >> >> I tried the 3.11.0-rc7+ on x86_64, and after bootup, the soft lockup bug >> happened. >> >> [ 48.895000] BUG: soft lockup - CPU#1 stuck for 22s! [ebtables:444]

Re: 3.11-rc7:BUG: soft lockup

2013-08-30 Thread Hillf Danton
On Fri, Aug 30, 2013 at 8:18 PM, Cong Wang xiyou.wangc...@gmail.com wrote: Cc'ing netdev On Fri, Aug 30, 2013 at 4:20 PM, Baoquan He baoquan...@gmail.com wrote: Hi, I tried the 3.11.0-rc7+ on x86_64, and after bootup, the soft lockup bug happened. [ 48.895000] BUG: soft lockup - CPU#1

Re: unused swap offset / bad page map.

2013-08-25 Thread Hillf Danton
On Fri, Aug 23, 2013 at 11:53 AM, Dave Jones wrote: > > It actually seems worse, seems I can trigger it even easier now, as if > there's a leak. > Can you please try the new fix for TLB flush? commit 2b047252d087be7f2ba Fix TLB gather virtual address range invalidation corner cases -- To

Re: unused swap offset / bad page map.

2013-08-25 Thread Hillf Danton
On Fri, Aug 23, 2013 at 11:53 AM, Dave Jones da...@redhat.com wrote: It actually seems worse, seems I can trigger it even easier now, as if there's a leak. Can you please try the new fix for TLB flush? commit 2b047252d087be7f2ba Fix TLB gather virtual address range invalidation corner cases

Re: unused swap offset / bad page map.

2013-08-21 Thread Hillf Danton
On Thu, Aug 22, 2013 at 4:49 AM, Dave Jones wrote: > > didn't hit the bug_on, but got a bunch of > > [ 424.077993] swap_free: Unused swap offset entry 000187d5 > [ 439.377194] swap_free: Unused swap offset entry 000187e7 > [ 441.998411] swap_free: Unused swap offset entry 000187ee > [

Re: unused swap offset / bad page map.

2013-08-21 Thread Hillf Danton
On Thu, Aug 22, 2013 at 4:49 AM, Dave Jones wrote: > > didn't hit the bug_on, but got a bunch of > > [ 424.077993] swap_free: Unused swap offset entry 000187d5 > [ 439.377194] swap_free: Unused swap offset entry 000187e7 > [ 441.998411] swap_free: Unused swap offset entry 000187ee > [

Re: unused swap offset / bad page map.

2013-08-21 Thread Hillf Danton
On Thu, Aug 22, 2013 at 4:49 AM, Dave Jones da...@redhat.com wrote: didn't hit the bug_on, but got a bunch of [ 424.077993] swap_free: Unused swap offset entry 000187d5 [ 439.377194] swap_free: Unused swap offset entry 000187e7 [ 441.998411] swap_free: Unused swap offset entry 000187ee [

Re: unused swap offset / bad page map.

2013-08-21 Thread Hillf Danton
On Thu, Aug 22, 2013 at 4:49 AM, Dave Jones da...@redhat.com wrote: didn't hit the bug_on, but got a bunch of [ 424.077993] swap_free: Unused swap offset entry 000187d5 [ 439.377194] swap_free: Unused swap offset entry 000187e7 [ 441.998411] swap_free: Unused swap offset entry 000187ee [

Re: unused swap offset / bad page map.

2013-08-19 Thread Hillf Danton
On Tue, Aug 20, 2013 at 7:18 AM, Dave Jones wrote: > > btw, anyone have thoughts on a patch something like below ? And another(sorry if message is reformatted by the mail agent, and it took my an hour to get the agent back to the correct format but failed, and thanks a lot for any howto send

Re: unused swap offset / bad page map.

2013-08-19 Thread Hillf Danton
On Tue, Aug 20, 2013 at 7:18 AM, Dave Jones da...@redhat.com wrote: btw, anyone have thoughts on a patch something like below ? And another(sorry if message is reformatted by the mail agent, and it took my an hour to get the agent back to the correct format but failed, and thanks a lot for any

kswapd skips compaction if reclaim order drops to zero?

2013-08-15 Thread Hillf Danton
If the allocation order is not high, direct compaction does nothing. Can we skip compaction here if order drops to zero? --- a/mm/vmscan.c Thu Aug 15 17:47:26 2013 +++ b/mm/vmscan.c Thu Aug 15 17:48:58 2013 @@ -3034,7 +3034,7 @@ static unsigned long balance_pgdat(pg_da * Compact if necessary

kswapd skips compaction if reclaim order drops to zero?

2013-08-15 Thread Hillf Danton
If the allocation order is not high, direct compaction does nothing. Can we skip compaction here if order drops to zero? --- a/mm/vmscan.c Thu Aug 15 17:47:26 2013 +++ b/mm/vmscan.c Thu Aug 15 17:48:58 2013 @@ -3034,7 +3034,7 @@ static unsigned long balance_pgdat(pg_da * Compact if necessary

Re: unused swap offset / bad page map.

2013-08-08 Thread Hillf Danton
On Wed, Aug 7, 2013 at 11:30 PM, Dave Jones wrote: > printk didn't trigger. > Is a corrupted page table entry encountered, according to the comment of swap_duplicate()? --- a/mm/swapfile.c Wed Aug 7 17:27:22 2013 +++ b/mm/swapfile.c Thu Aug 8 23:12:30 2013 @@ -770,6 +770,7 @@ int

Re: unused swap offset / bad page map.

2013-08-08 Thread Hillf Danton
On Wed, Aug 7, 2013 at 11:30 PM, Dave Jones da...@redhat.com wrote: printk didn't trigger. Is a corrupted page table entry encountered, according to the comment of swap_duplicate()? --- a/mm/swapfile.c Wed Aug 7 17:27:22 2013 +++ b/mm/swapfile.c Thu Aug 8 23:12:30 2013 @@ -770,6

Re: unused swap offset / bad page map.

2013-08-07 Thread Hillf Danton
Hello Dave On Wed, Aug 7, 2013 at 1:51 PM, Dave Jones wrote: > Seen while fuzzing with lots of child processes. > > swap_free: Unused swap offset entry 001263f5 > BUG: Bad page map in process trinity-child29 pte:24c7ea00 pmd:09fec067 > addr:7f9db958d000 vm_flags:00100073

Re: unused swap offset / bad page map.

2013-08-07 Thread Hillf Danton
Hello Dave On Wed, Aug 7, 2013 at 1:51 PM, Dave Jones da...@redhat.com wrote: Seen while fuzzing with lots of child processes. swap_free: Unused swap offset entry 001263f5 BUG: Bad page map in process trinity-child29 pte:24c7ea00 pmd:09fec067 addr:7f9db958d000 vm_flags:00100073

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-08-03 Thread Hillf Danton
On Fri, Aug 2, 2013 at 12:17 AM, Aneesh Kumar K.V wrote: > Hillf Danton writes: > >> On Wed, Jul 31, 2013 at 2:37 PM, Joonsoo Kim wrote: >>> On Wed, Jul 31, 2013 at 02:21:38PM +0800, Hillf Danton wrote: >>>> On Wed, Jul 31, 2013 at 12:41 PM, Joonsoo Kim >&g

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-08-03 Thread Hillf Danton
On Fri, Aug 2, 2013 at 12:17 AM, Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com wrote: Hillf Danton dhi...@gmail.com writes: On Wed, Jul 31, 2013 at 2:37 PM, Joonsoo Kim iamjoonsoo@lge.com wrote: On Wed, Jul 31, 2013 at 02:21:38PM +0800, Hillf Danton wrote: On Wed, Jul 31, 2013 at 12:41

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-07-31 Thread Hillf Danton
On Wed, Jul 31, 2013 at 2:37 PM, Joonsoo Kim wrote: > On Wed, Jul 31, 2013 at 02:21:38PM +0800, Hillf Danton wrote: >> On Wed, Jul 31, 2013 at 12:41 PM, Joonsoo Kim wrote: >> > On Wed, Jul 31, 2013 at 10:49:24AM +0800, Hillf Danton wrote: >> >> On Wed, Jul 31,

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-07-31 Thread Hillf Danton
On Wed, Jul 31, 2013 at 12:41 PM, Joonsoo Kim wrote: > On Wed, Jul 31, 2013 at 10:49:24AM +0800, Hillf Danton wrote: >> On Wed, Jul 31, 2013 at 10:27 AM, Joonsoo Kim wrote: >> > On Mon, Jul 29, 2013 at 03:24:46PM +0800, Hillf Danton wrote: >> >> On Mon, Jul 29

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-07-31 Thread Hillf Danton
On Wed, Jul 31, 2013 at 12:41 PM, Joonsoo Kim iamjoonsoo@lge.com wrote: On Wed, Jul 31, 2013 at 10:49:24AM +0800, Hillf Danton wrote: On Wed, Jul 31, 2013 at 10:27 AM, Joonsoo Kim iamjoonsoo@lge.com wrote: On Mon, Jul 29, 2013 at 03:24:46PM +0800, Hillf Danton wrote: On Mon, Jul 29

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-07-31 Thread Hillf Danton
On Wed, Jul 31, 2013 at 2:37 PM, Joonsoo Kim iamjoonsoo@lge.com wrote: On Wed, Jul 31, 2013 at 02:21:38PM +0800, Hillf Danton wrote: On Wed, Jul 31, 2013 at 12:41 PM, Joonsoo Kim iamjoonsoo@lge.com wrote: On Wed, Jul 31, 2013 at 10:49:24AM +0800, Hillf Danton wrote: On Wed, Jul 31

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-07-30 Thread Hillf Danton
On Wed, Jul 31, 2013 at 10:27 AM, Joonsoo Kim wrote: > On Mon, Jul 29, 2013 at 03:24:46PM +0800, Hillf Danton wrote: >> On Mon, Jul 29, 2013 at 1:31 PM, Joonsoo Kim wrote: >> > alloc_huge_page_node() use dequeue_huge_page_node() without >> > any validation check, so

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-07-30 Thread Hillf Danton
On Wed, Jul 31, 2013 at 10:27 AM, Joonsoo Kim iamjoonsoo@lge.com wrote: On Mon, Jul 29, 2013 at 03:24:46PM +0800, Hillf Danton wrote: On Mon, Jul 29, 2013 at 1:31 PM, Joonsoo Kim iamjoonsoo@lge.com wrote: alloc_huge_page_node() use dequeue_huge_page_node() without any validation

Re: [PATCH v3 9/9] mm, hugetlb: decrement reserve count if VM_NORESERVE alloc page cache

2013-07-29 Thread Hillf Danton
mapping is VM_NORESERVE, VM_MAYSHARE and chg is 0, this imply > that current allocated page will go into page cache which is already > reserved region when mapping is created. In this case, we should decrease > reserve count. As implementing above, this patch solve the problem. > > Reviewed-b

Re: [PATCH v3 8/9] mm, hugetlb: remove decrement_hugepage_resv_vma()

2013-07-29 Thread Hillf Danton
e can remove function and embed it into > dequeue_huge_page_vma() directly. This patch implement it. > > Reviewed-by: Wanpeng Li > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Joonsoo Kim > Acked-by: Hillf Danton > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index ca15854.

Re: [PATCH v3 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-29 Thread Hillf Danton
above test generate a SIGBUG which is correct, > because all free pages are reserved and non reserved shared mapping > can't get a free page. > > Reviewed-by: Wanpeng Li > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Joonsoo Kim > Acked-by: Hillf Danton > diff --git a/mm

Re: [PATCH v3 6/9] mm, hugetlb: do not use a page in page cache for cow optimization

2013-07-29 Thread Hillf Danton
er condition of optimization. If this page is not > AnonPage, we don't do optimization. This makes this optimization turning > off for a page cache. > > Acked-by: Michal Hocko > Reviewed-by: Wanpeng Li > Reviewed-by: Naoya Horiguchi > Signed-off-by: Joonsoo Kim > Acked-b

Re: [PATCH v3 5/9] mm, hugetlb: remove redundant list_empty check in gather_surplus_pages()

2013-07-29 Thread Hillf Danton
On Mon, Jul 29, 2013 at 1:28 PM, Joonsoo Kim wrote: > If list is empty, list_for_each_entry_safe() doesn't do anything. > So, this check is redundant. Remove it. > > Acked-by: Michal Hocko > Reviewed-by: Wanpeng Li > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Joonsoo K

Re: [PATCH v3 3/9] mm, hugetlb: clean-up alloc_huge_page()

2013-07-29 Thread Hillf Danton
Joonsoo Kim > Acked-by: Hillf Danton > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 51564a8..31d78c5 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -1149,12 +1149,7 @@ static struct page *alloc_huge_page(struct > vm_area_struct *vma, >

Re: [PATCH v3 1/9] mm, hugetlb: move up the code which check availability of free huge page

2013-07-29 Thread Hillf Danton
cko > Reviewed-by: Wanpeng Li > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Joonsoo Kim > Acked-by: Hillf Danton > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index e2bfbf7..fc4988c 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -539,10 +539,6 @@ static

Re: [PATCH 05/18] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-07-29 Thread Hillf Danton
On Mon, Jul 29, 2013 at 1:31 PM, Joonsoo Kim wrote: > There is a race condition if we map a same file on different processes. > Region tracking is protected by mmap_sem and hugetlb_instantiation_mutex. > When we do mmap, we don't grab a hugetlb_instantiation_mutex, but, > grab a mmap_sem. This

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-07-29 Thread Hillf Danton
On Mon, Jul 29, 2013 at 1:31 PM, Joonsoo Kim wrote: > alloc_huge_page_node() use dequeue_huge_page_node() without > any validation check, so it can steal reserved page unconditionally. Well, why is it illegal to use reserved page here? > To fix it, check the number of free_huge_page in

Re: [PATCH 01/18] mm, hugetlb: protect reserved pages when softofflining requests the pages

2013-07-29 Thread Hillf Danton
On Mon, Jul 29, 2013 at 1:31 PM, Joonsoo Kim iamjoonsoo@lge.com wrote: alloc_huge_page_node() use dequeue_huge_page_node() without any validation check, so it can steal reserved page unconditionally. Well, why is it illegal to use reserved page here? To fix it, check the number of

Re: [PATCH 05/18] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-07-29 Thread Hillf Danton
On Mon, Jul 29, 2013 at 1:31 PM, Joonsoo Kim iamjoonsoo@lge.com wrote: There is a race condition if we map a same file on different processes. Region tracking is protected by mmap_sem and hugetlb_instantiation_mutex. When we do mmap, we don't grab a hugetlb_instantiation_mutex, but, grab a

Re: [PATCH v3 1/9] mm, hugetlb: move up the code which check availability of free huge page

2013-07-29 Thread Hillf Danton
Hocko mho...@suse.cz Reviewed-by: Wanpeng Li liw...@linux.vnet.ibm.com Reviewed-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Hillf Danton dhi...@gmail.com diff --git a/mm/hugetlb.c b/mm/hugetlb.c index e2bfbf7..fc4988c 100644

Re: [PATCH v3 3/9] mm, hugetlb: clean-up alloc_huge_page()

2013-07-29 Thread Hillf Danton
-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Hillf Danton dhi...@gmail.com diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 51564a8..31d78c5 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1149,12 +1149,7 @@ static struct page

Re: [PATCH v3 5/9] mm, hugetlb: remove redundant list_empty check in gather_surplus_pages()

2013-07-29 Thread Hillf Danton
Kumar K.V aneesh.ku...@linux.vnet.ibm.com Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Hillf Danton dhi...@gmail.com diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 87d7637..2e52afea 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1020,11 +1020,8 @@ free: spin_unlock

Re: [PATCH v3 6/9] mm, hugetlb: do not use a page in page cache for cow optimization

2013-07-29 Thread Hillf Danton
...@linux.vnet.ibm.com Reviewed-by: Naoya Horiguchi n-horigu...@ah.jp.nec.com Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Hillf Danton dhi...@gmail.com diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 2e52afea..1f6b3a6 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2511,7 +2511,6

Re: [PATCH v3 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-29 Thread Hillf Danton
...@linux.vnet.ibm.com Reviewed-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Hillf Danton dhi...@gmail.com diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 1f6b3a6..ca15854 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -464,6 +464,8 @@ void

Re: [PATCH v3 8/9] mm, hugetlb: remove decrement_hugepage_resv_vma()

2013-07-29 Thread Hillf Danton
we can remove function and embed it into dequeue_huge_page_vma() directly. This patch implement it. Reviewed-by: Wanpeng Li liw...@linux.vnet.ibm.com Reviewed-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Hillf Danton dhi

Re: [PATCH v3 9/9] mm, hugetlb: decrement reserve count if VM_NORESERVE alloc page cache

2013-07-29 Thread Hillf Danton
Acked-by: Hillf Danton dhi...@gmail.com diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 4b1b043..b3b8252 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -443,10 +443,23 @@ void reset_vma_resv_huge_pages(struct vm_area_struct *vma) } /* Returns true if the VMA has associated reserve pages

Re: [PATCH 2/2] hugepage: allow parallelization of the hugepage fault path

2013-07-28 Thread Hillf Danton
On Fri, Jul 26, 2013 at 10:27 PM, Davidlohr Bueso wrote: > From: David Gibson > > At present, the page fault path for hugepages is serialized by a > single mutex. This is used to avoid spurious out-of-memory conditions > when the hugepage pool is fully utilized (two processes or threads can >

Re: [PATCH 2/2] hugepage: allow parallelization of the hugepage fault path

2013-07-28 Thread Hillf Danton
On Fri, Jul 26, 2013 at 10:27 PM, Davidlohr Bueso davidlohr.bu...@hp.com wrote: From: David Gibson da...@gibson.dropbear.id.au At present, the page fault path for hugepages is serialized by a single mutex. This is used to avoid spurious out-of-memory conditions when the hugepage pool is

Re: [PATCH 5/8] mbind: add hugepage migration code to mbind()

2013-07-25 Thread Hillf Danton
revert introducing migrate_movable_pages > - added alloc_huge_page_noerr free from ERR_VALUE > > ChangeLog v2: > - updated description and renamed patch title > > Signed-off-by: Naoya Horiguchi > Acked-by: Andi Kleen > Reviewed-by: Wanpeng Li > --- Acked-by: Hillf Danto

Re: [PATCH 3/8] migrate: add hugepage migration code to migrate_pages()

2013-07-25 Thread Hillf Danton
_page > > ChangeLog v2: > - remove unnecessary extern > - fix page table lock in check_hugetlb_pmd_range > - updated description and renamed patch title > > Signed-off-by: Naoya Horiguchi > Acked-by: Andi Kleen > Reviewed-by: Wanpeng Li > --- Acked-by: Hillf

Re: [PATCH 2/8] soft-offline: use migrate_pages() instead of migrate_huge_page()

2013-07-25 Thread Hillf Danton
ft_offline_huge_page() switches to use migrate_pages(), > and migrate_huge_page() is not used any more. So let's remove it. > > ChangeLog v3: > - Merged with another cleanup patch (4/10 in previous version) > > Signed-off-by: Naoya Horiguchi > Acked-by: Andi Kleen > Reviewed-by: Wanpeng Li

Re: [PATCH 1/8] migrate: make core migration code aware of hugepage

2013-07-25 Thread Hillf Danton
code removing VM_HUGETLB from vma_migratable check into a >separate patch > - hold hugetlb_lock in putback_active_hugepage > - update comment near the definition of hugetlb_lock > > Signed-off-by: Naoya Horiguchi > Acked-by: Andi Kleen > Reviewed-by: Wanpeng Li > ---

Re: [PATCH 1/8] migrate: make core migration code aware of hugepage

2013-07-25 Thread Hillf Danton
--- Acked-by: Hillf Danton dhi...@gmail.com include/linux/hugetlb.h | 6 ++ mm/hugetlb.c| 32 +++- mm/migrate.c| 10 +- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git v3.11-rc1.orig/include/linux/hugetlb.h v3.11

Re: [PATCH 2/8] soft-offline: use migrate_pages() instead of migrate_huge_page()

2013-07-25 Thread Hillf Danton
--- Acked-by: Hillf Danton dhi...@gmail.com include/linux/migrate.h | 5 - mm/memory-failure.c | 15 --- mm/migrate.c| 28 ++-- 3 files changed, 14 insertions(+), 34 deletions(-) diff --git v3.11-rc1.orig/include/linux/migrate.h v3.11-rc1

Re: [PATCH 3/8] migrate: add hugepage migration code to migrate_pages()

2013-07-25 Thread Hillf Danton
extern - fix page table lock in check_hugetlb_pmd_range - updated description and renamed patch title Signed-off-by: Naoya Horiguchi n-horigu...@ah.jp.nec.com Acked-by: Andi Kleen a...@linux.intel.com Reviewed-by: Wanpeng Li liw...@linux.vnet.ibm.com --- Acked-by: Hillf Danton dhi...@gmail.com

Re: [PATCH 5/8] mbind: add hugepage migration code to mbind()

2013-07-25 Thread Hillf Danton
...@linux.vnet.ibm.com --- Acked-by: Hillf Danton dhi...@gmail.com include/linux/hugetlb.h | 3 +++ mm/hugetlb.c| 14 ++ mm/mempolicy.c | 4 +++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git v3.11-rc1.orig/include/linux/hugetlb.h v3.11-rc1/include/linux

Re: [PATCH 7/8] memory-hotplug: enable memory hotplug to handle hugepage

2013-07-20 Thread Hillf Danton
On Fri, Jul 19, 2013 at 10:39 PM, Naoya Horiguchi wrote: > On Fri, Jul 19, 2013 at 01:40:38PM +0800, Hillf Danton wrote: >> On Fri, Jul 19, 2013 at 5:34 AM, Naoya Horiguchi >> wrote: >> > @@ -518,9 +519,11 @@ static struct page *dequeue_huge_page_node(struct

Re: [PATCH 7/8] memory-hotplug: enable memory hotplug to handle hugepage

2013-07-20 Thread Hillf Danton
On Fri, Jul 19, 2013 at 10:39 PM, Naoya Horiguchi n-horigu...@ah.jp.nec.com wrote: On Fri, Jul 19, 2013 at 01:40:38PM +0800, Hillf Danton wrote: On Fri, Jul 19, 2013 at 5:34 AM, Naoya Horiguchi n-horigu...@ah.jp.nec.com wrote: @@ -518,9 +519,11 @@ static struct page *dequeue_huge_page_node

Re: [PATCH 7/8] memory-hotplug: enable memory hotplug to handle hugepage

2013-07-18 Thread Hillf Danton
On Fri, Jul 19, 2013 at 5:34 AM, Naoya Horiguchi wrote: > @@ -518,9 +519,11 @@ static struct page *dequeue_huge_page_node(struct hstate > *h, int nid) > { > struct page *page; > > - if (list_empty(>hugepage_freelists[nid])) > + list_for_each_entry(page,

Re: [PATCH 6/8] migrate: remove VM_HUGETLB from vma flag check in vma_migratable()

2013-07-18 Thread Hillf Danton
On Fri, Jul 19, 2013 at 5:34 AM, Naoya Horiguchi wrote: > This patch enables hugepage migration from migrate_pages(2), > move_pages(2), and mbind(2). > > Signed-off-by: Naoya Horiguchi > --- Acked-by: Hillf Danton > include/linux/mempolicy.h | 2 +- > 1 file chang

Re: [PATCH 1/8] migrate: make core migration code aware of hugepage

2013-07-18 Thread Hillf Danton
On Fri, Jul 19, 2013 at 11:18 AM, Naoya Horiguchi wrote: >> > +bool isolate_huge_page(struct page *page, struct list_head *l) >> >> Can we replace the page parameter with p? > > Yes. Maybe it's strange to use the full name "page" for one parameter > and an extremely shortened one "l" for another

Re: [PATCH 4/8] migrate: add hugepage migration code to move_pages()

2013-07-18 Thread Hillf Danton
On Fri, Jul 19, 2013 at 5:34 AM, Naoya Horiguchi wrote: > This patch extends move_pages() to handle vma with VM_HUGETLB set. > We will be able to migrate hugepage with move_pages(2) after > applying the enablement patch which comes later in this series. > > We avoid getting refcount on tail pages

Re: [PATCH 3/8] migrate: add hugepage migration code to migrate_pages()

2013-07-18 Thread Hillf Danton
On Fri, Jul 19, 2013 at 5:34 AM, Naoya Horiguchi wrote: > This patch extends check_range() to handle vma with VM_HUGETLB set. > We will be able to migrate hugepage with migrate_pages(2) after > applying the enablement patch which comes later in this series. > > Note that for larger hugepages

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