Re: [PATCH] swap: redirty page if page write fails on swap file

2013-05-01 Thread Will Huck
Hi Jerome, On 04/24/2013 05:57 PM, Jerome Marchand wrote: On 04/22/2013 10:37 PM, Andrew Morton wrote: On Wed, 17 Apr 2013 14:11:55 +0200 Jerome Marchand wrote: Since commit 62c230b, swap_writepage() calls direct_IO on swap files. However, in that case page isn't redirtied if I/O fails, and i

Re: [RFC PATCH 0/3] Obey mark_page_accessed hint given by filesystems

2013-04-30 Thread Will Huck
Hi Mel, On 04/30/2013 12:31 AM, Mel Gorman wrote: Andrew Perepechko reported a problem whereby pages are being prematurely evicted as the mark_page_accessed() hint is ignored for pages that are currently on a pagevec -- http://www.spinics.net/lists/linux-ext4/msg37340.html . Alexey Lyahkov and R

Re: OOM-killer and strange RSS value in 3.9-rc7

2013-04-30 Thread Will Huck
Hi Christoph, On 04/29/2013 10:49 PM, Christoph Lameter wrote: On Sat, 27 Apr 2013, Will Huck wrote: Hi Christoph, On 04/26/2013 01:17 AM, Christoph Lameter wrote: On Thu, 25 Apr 2013, Han Pingtian wrote: I have enabled "slub_debug" and here is the /sys/kernel/slab/kmalloc-512/a

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-28 Thread Will Huck
benefit? Will Huck wrote: On 04/28/2013 03:13 AM, Frantisek Hrbata wrote: On Sat, Apr 27, 2013 at 03:00:11PM +0800, Will Huck wrote: On 04/26/2013 11:35 PM, Frantisek Hrbata wrote: On Fri, Apr 26, 2013 at 01:21:28PM +0800, Will Huck wrote: Hi Peter, On 04/02/2013 08:28 PM, Frantisek Hrbata wrote

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-27 Thread Will Huck
On 04/28/2013 03:13 AM, Frantisek Hrbata wrote: On Sat, Apr 27, 2013 at 03:00:11PM +0800, Will Huck wrote: On 04/26/2013 11:35 PM, Frantisek Hrbata wrote: On Fri, Apr 26, 2013 at 01:21:28PM +0800, Will Huck wrote: Hi Peter, On 04/02/2013 08:28 PM, Frantisek Hrbata wrote: When CR4.PAE is set

Re: OOM-killer and strange RSS value in 3.9-rc7

2013-04-27 Thread Will Huck
Hi Christoph, On 04/26/2013 01:17 AM, Christoph Lameter wrote: On Thu, 25 Apr 2013, Han Pingtian wrote: I have enabled "slub_debug" and here is the /sys/kernel/slab/kmalloc-512/alloc_calls contents: 50 .__alloc_workqueue_key+0x90/0x5d0 age=113630/116957/119419 pid=1-1730 cpus=0,6-8,13,2

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-27 Thread Will Huck
On 04/26/2013 11:35 PM, Frantisek Hrbata wrote: On Fri, Apr 26, 2013 at 01:21:28PM +0800, Will Huck wrote: Hi Peter, On 04/02/2013 08:28 PM, Frantisek Hrbata wrote: When CR4.PAE is set, the 64b PTE's are used(ARCH_PHYS_ADDR_T_64BIT is set for X86_64 || X86_PAE). According to [1] Chap

Re: [PATCH] x86: add phys addr validity check for /dev/mem mmap

2013-04-25 Thread Will Huck
Hi Peter, On 04/02/2013 08:28 PM, Frantisek Hrbata wrote: When CR4.PAE is set, the 64b PTE's are used(ARCH_PHYS_ADDR_T_64BIT is set for X86_64 || X86_PAE). According to [1] Chapter 4 Paging, some higher bits in 64b PTE are reserved and have to be set to zero. For example, for IA-32e and 4KB page

Re: [PATCH] Add a sysctl for numa_balancing.

2013-04-24 Thread Will Huck
On 04/25/2013 07:56 AM, Andi Kleen wrote: From: Andi Kleen As discussed earlier, this adds a working sysctl to enable/disable automatic numa memory balancing at runtime. This was possible earlier through debugfs, but only with special debugging options set. Also fix the boot message. One off

Re: [PATCH] slab: Remove unnecessary __builtin_constant_p()

2013-04-17 Thread Will Huck
Hi Steven, On 04/18/2013 03:09 AM, Steven Rostedt wrote: The slab.c code has a size check macro that checks the size of the following structs: struct arraycache_init struct kmem_list3 The index_of() function that takes the sizeof() of the above two structs and does an unnecessary __builtin_cons

Re: [PATCH 01/10] mm: vmscan: Limit the number of pages kswapd reclaims at each priority

2013-04-10 Thread Will Huck
Hi Rik, On 03/22/2013 11:52 AM, Rik van Riel wrote: On 03/21/2013 08:05 PM, Will Huck wrote: One offline question, how to understand this in function balance_pgdat: /* * Do some background aging of the anon list, to give * pages a chance to be referenced before reclaiming

Re: [PATCH 01/10] mm: vmscan: Limit the number of pages kswapd reclaims at each priority

2013-04-10 Thread Will Huck
Hi Rik, On 03/22/2013 11:52 AM, Rik van Riel wrote: On 03/21/2013 08:05 PM, Will Huck wrote: One offline question, how to understand this in function balance_pgdat: /* * Do some background aging of the anon list, to give * pages a chance to be referenced before reclaiming

Re: [PATCH 01/10] mm: vmscan: Limit the number of pages kswapd reclaims at each priority

2013-04-07 Thread Will Huck
cc Fengguang, On 04/05/2013 08:05 AM, Will Huck wrote: Hi Rik, On 03/22/2013 09:01 PM, Rik van Riel wrote: On 03/22/2013 12:59 AM, Will Huck wrote: Hi Rik, On 03/22/2013 11:56 AM, Will Huck wrote: Hi Rik, On 03/22/2013 11:52 AM, Rik van Riel wrote: On 03/21/2013 08:05 PM, Will Huck wrote

Re: [PATCH 01/10] mm: vmscan: Limit the number of pages kswapd reclaims at each priority

2013-04-07 Thread Will Huck
Ping Rik. On 04/05/2013 08:05 AM, Will Huck wrote: Hi Rik, On 03/22/2013 09:01 PM, Rik van Riel wrote: On 03/22/2013 12:59 AM, Will Huck wrote: Hi Rik, On 03/22/2013 11:56 AM, Will Huck wrote: Hi Rik, On 03/22/2013 11:52 AM, Rik van Riel wrote: On 03/21/2013 08:05 PM, Will Huck wrote: One

Re: [PATCH 01/10] mm: vmscan: Limit the number of pages kswapd reclaims at each priority

2013-04-04 Thread Will Huck
Hi Rik, On 03/22/2013 09:01 PM, Rik van Riel wrote: On 03/22/2013 12:59 AM, Will Huck wrote: Hi Rik, On 03/22/2013 11:56 AM, Will Huck wrote: Hi Rik, On 03/22/2013 11:52 AM, Rik van Riel wrote: On 03/21/2013 08:05 PM, Will Huck wrote: One offline question, how to understand this in function

Re: [PATCH 01/10] mm: vmscan: Limit the number of pages kswapd reclaims at each priority

2013-03-21 Thread Will Huck
Hi Rik, On 03/22/2013 11:52 AM, Rik van Riel wrote: On 03/21/2013 08:05 PM, Will Huck wrote: One offline question, how to understand this in function balance_pgdat: /* * Do some background aging of the anon list, to give * pages a chance to be referenced before reclaiming

Re: [PATCH 01/10] mm: vmscan: Limit the number of pages kswapd reclaims at each priority

2013-03-21 Thread Will Huck
Hi Rik, On 03/22/2013 11:56 AM, Will Huck wrote: Hi Rik, On 03/22/2013 11:52 AM, Rik van Riel wrote: On 03/21/2013 08:05 PM, Will Huck wrote: One offline question, how to understand this in function balance_pgdat: /* * Do some background aging of the anon list, to give * pages a chance to

Re: [PATCH 01/10] mm: vmscan: Limit the number of pages kswapd reclaims at each priority

2013-03-21 Thread Will Huck
Hi Rik, On 03/21/2013 08:52 AM, Rik van Riel wrote: On 03/20/2013 12:18 PM, Michal Hocko wrote: On Sun 17-03-13 13:04:07, Mel Gorman wrote: [...] diff --git a/mm/vmscan.c b/mm/vmscan.c index 88c5fed..4835a7a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2593,6 +2593,32 @@ static bool prepare_k

Re: [PATCH 01/10] mm: vmscan: Limit the number of pages kswapd reclaims at each priority

2013-03-21 Thread Will Huck
Hi Johannes, On 03/21/2013 11:57 PM, Johannes Weiner wrote: On Sun, Mar 17, 2013 at 01:04:07PM +, Mel Gorman wrote: The number of pages kswapd can reclaim is bound by the number of pages it scans which is related to the size of the zone and the scanning priority. In many cases the priority r

Re: [PATCH] mm: page_alloc: remove branch operation in free_pages_prepare()

2013-03-08 Thread Will Huck
Hi Hugh, On 03/08/2013 10:01 AM, Hugh Dickins wrote: On Fri, 8 Mar 2013, Joonsoo Kim wrote: On Thu, Mar 07, 2013 at 10:54:15AM -0800, Hugh Dickins wrote: On Thu, 7 Mar 2013, Joonsoo Kim wrote: When we found that the flag has a bit of PAGE_FLAGS_CHECK_AT_PREP, we reset the flag. If we always r

Re: Inactive memory keep growing and how to release it?

2013-03-08 Thread Will Huck
Cc experts. Hugh, Johannes, On 03/04/2013 08:21 PM, Lenky Gao wrote: 2013/3/4 Zlatko Calusic : The drop_caches mechanism doesn't free dirty page cache pages. And your bash script is creating a lot of dirty pages. Run it like this and see if it helps your case: sync; echo 3 > /proc/sys/vm/drop_

Re: [PATCH 2/2] tmpfs: fix mempolicy object leaks

2013-03-06 Thread Will Huck
Hi Hugh, On 03/06/2013 03:40 AM, Hugh Dickins wrote: On Mon, 4 Mar 2013, Will Huck wrote: Could you explain me why shmem has more relationship with mempolicy? It seems that there are many codes in shmem handle mempolicy, but other components in mm subsystem just have little. NUMA mempolicy is

Re: [PATCH 2/7] ksm: treat unstable nid like in stable tree

2013-03-05 Thread Will Huck
Hi Hugh, On 03/02/2013 10:57 AM, Hugh Dickins wrote: How ksm treat a ksm forked page? IIUC, it's not merged in ksm stable tree. It will just be ignore? On Sat, 2 Mar 2013, Ric Mason wrote: On 03/02/2013 04:03 AM, Hugh Dickins wrote: On Fri, 1 Mar 2013, Ric Mason wrote: I think the ksm impl

Re: [PATCH 2/2] tmpfs: fix mempolicy object leaks

2013-03-03 Thread Will Huck
Hi Hugh, On 02/21/2013 04:26 AM, Hugh Dickins wrote: On Tue, 19 Feb 2013, Greg Thelen wrote: This patch fixes several mempolicy leaks in the tmpfs mount logic. These leaks are slow - on the order of one object leaked per mount attempt. Leak 1 (umount doesn't free mpol allocated in mount):

Re: [Bug fix PATCH 1/2] acpi, movablemem_map: Exclude memblock.reserved ranges when parsing SRAT.

2013-02-20 Thread Will Huck
On 02/20/2013 08:31 PM, Tang Chen wrote: On 02/20/2013 07:00 PM, Tang Chen wrote: As mentioned by HPA before, when we are using movablemem_map=acpi, if all the memory ranges in SRAT is hotpluggable, then no memory can be used by kernel. Before parsing SRAT, memblock has already reserve some m

Re: Should a swapped out page be deleted from swap cache?

2013-02-19 Thread Will Huck
On 02/20/2013 03:06 AM, Hugh Dickins wrote: On Tue, 19 Feb 2013, Will Huck wrote: Another question: I don't see the connection to deleting a swapped out page from swap cache. Why kernel memory mapping use direct mapping instead of kmalloc/vmalloc which will setup mapping on demand?

Re: Should a swapped out page be deleted from swap cache?

2013-02-18 Thread Will Huck
On 02/19/2013 10:04 AM, Li Haifeng wrote: 2013/2/19 Hugh Dickins On Mon, 18 Feb 2013, Li Haifeng wrote: For explain my question, the two points should be displayed as below. 1. If an anonymous page is swapped out, this page will be deleted from swap cache and be put back into buddy system.

Re: Should a swapped out page be deleted from swap cache?

2013-02-18 Thread Will Huck
Hi Hugh, On 02/19/2013 02:06 AM, Hugh Dickins wrote: Another question: Why kernel memory mapping use direct mapping instead of kmalloc/vmalloc which will setup mapping on demand? On Mon, 18 Feb 2013, Li Haifeng wrote: For explain my question, the two points should be displayed as below. 1