Re: [PATCH 2/3] mm: Ensure that mark_page_accessed moves pages to the active list

2013-05-01 Thread Ric Mason
On 05/01/2013 04:06 PM, Mel Gorman wrote: On Wed, May 01, 2013 at 01:41:34PM +0800, Sam Ben wrote: Hi Mel, On 04/30/2013 12:31 AM, Mel Gorman wrote: If a page is on a pagevec then it is !PageLRU and mark_page_accessed() may fail to move a page to the active list as expected. Now that the LRU is

Re: [PATCHv6 0/8] zswap: compressed swap caching

2013-05-01 Thread Ric Mason
Hi Seth, On 02/22/2013 02:25 AM, Seth Jennings wrote: On 02/21/2013 09:50 AM, Dan Magenheimer wrote: From: Seth Jennings [mailto:sjenn...@linux.vnet.ibm.com] Subject: [PATCHv6 0/8] zswap: compressed swap caching Changelog: v6: * fix improper freeing of rbtree (Cody) Cody's bug fix reminded me

Re: [PATCH] mm: swap: Mark swap pages writeback before queueing for direct IO

2013-05-01 Thread Ric Mason
Hi Mel, On 04/25/2013 02:57 AM, Mel Gorman wrote: As pointed out by Andrew Morton, the swap-over-NFS writeback is not setting PageWriteback before it is queued for direct IO. While swap pages do not Before commit commit 62c230bc1 (mm: add support for a filesystem to activate swap files and use

Re: [PATCH 2/2] Make batch size for memory accounting configured according to size of memory

2013-04-30 Thread Ric Mason
Hi Tim, On 04/30/2013 01:12 AM, Tim Chen wrote: Currently the per cpu counter's batch size for memory accounting is configured as twice the number of cpus in the system. However, for system with very large memory, it is more appropriate to make it proportional to the memory size per cpu in the s

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

2013-04-11 Thread Ric Mason
Ping Rik, I also want to know the answer. ;-) On 04/11/2013 01:58 PM, 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 ano

Re: [RFC Patch 0/2] mm: Add parameters to make kernel behavior at memory error on dirty cache selectable

2013-04-11 Thread Ric Mason
Hi Mitsuhiro, On 04/11/2013 08:51 PM, Mitsuhiro Tanino wrote: (2013/04/11 12:53), Simon Jeons wrote: One question against mce instead of the patchset. ;-) When check memory is bad? Before memory access? Is there a process scan it period? Hi Simon-san, Yes, there is a process to scan memory p

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-11 Thread Ric Mason
Hi Mel, On 04/11/2013 06:01 PM, Mel Gorman wrote: On Wed, Apr 10, 2013 at 02:21:42PM +0900, Joonsoo Kim wrote: @@ -2673,9 +2674,15 @@ static bool kswapd_shrink_zone(struct zone *zone, sc->nr_to_reclaim = max(SWAP_CLUSTER_MAX, high_wmark_pages(zone)); shrink_zone(zone, sc); - r

Re: [PATCH] mm: page_alloc: Avoid marking zones full prematurely after zone_reclaim()

2013-04-09 Thread Ric Mason
Hi Michal, On 04/09/2013 06:14 PM, Michal Hocko wrote: On Tue 09-04-13 18:05:30, Simon Jeons wrote: [...] I try this in v3.9-rc5: dd if=/dev/sda of=/dev/null bs=1MB 14813+0 records in 14812+0 records out 1481200 bytes (15 GB) copied, 105.988 s, 140 MB/s free -m -s 1 tota

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Ric Mason
Hi Minchan, On 04/10/2013 08:50 AM, Minchan Kim wrote: On Tue, Apr 09, 2013 at 01:25:45PM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) Hi Dan, On Mon, Apr 08, 2013 at 09:3

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Ric Mason
Hi Dan, On 04/10/2013 04:25 AM, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) Hi Dan, On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:mi

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-08 Thread Ric Mason
Hi Minchan, On 04/09/2013 09:02 AM, Minchan Kim wrote: Hi Andrew, On Mon, Apr 08, 2013 at 02:17:10PM -0700, Andrew Morton wrote: On Mon, 8 Apr 2013 15:01:02 +0900 Minchan Kim wrote: Swap subsystem does lazy swap slot free with expecting the page would be swapped out again so we can avoid un

Re: [PATCH part2 v6 0/3] staging: zcache: Support zero-filled pages more efficiently

2013-04-07 Thread Ric Mason
cc Bob On 04/07/2013 05:03 PM, Wanpeng Li wrote: On Wed, Apr 03, 2013 at 06:16:20PM +0800, Wanpeng Li wrote: Changelog: v5 -> v6: * shove variables in debug.c and in debug.h just have an extern, spotted by Konrad * update patch description, spotted by Konrad v4 -> v5: * fix compile error,

Re: [PATCHv3, RFC 00/34] Transparent huge page cache

2013-04-06 Thread Ric Mason
Hi Kirill, On 04/05/2013 07:59 PM, Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" Here's third RFC. Thanks everybody for feedback. Could you answer my questions in your version two? The patchset is pretty big already and I want to stop generate new features to keep it reviewable. Nex

Re: [PATCHv2, RFC 12/30] thp, mm: add event counters for huge page alloc on write to a file

2013-04-04 Thread Ric Mason
Hi Kirill, On 03/26/2013 04:40 PM, Kirill A. Shutemov wrote: Dave Hansen wrote: On 03/14/2013 10:50 AM, Kirill A. Shutemov wrote: --- a/include/linux/vm_event_item.h +++ b/include/linux/vm_event_item.h @@ -71,6 +71,8 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, THP_

Re: [PATCHv2, RFC 11/30] thp, mm: handle tail pages in page_cache_get_speculative()

2013-04-04 Thread Ric Mason
Hi Kirill, On 03/15/2013 01:50 AM, Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" For tail page we call __get_page_tail(). It has the same semantics, but for tail page. Signed-off-by: Kirill A. Shutemov --- include/linux/pagemap.h |4 +++- 1 file changed, 3 insertions(+), 1 delet

Re: [PATCHv2, RFC 07/30] thp, mm: introduce mapping_can_have_hugepages() predicate

2013-04-04 Thread Ric Mason
On 04/05/2013 11:45 AM, Ric Mason wrote: Hi Kirill, On 03/15/2013 01:50 AM, Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" Returns true if mapping can have huge pages. Just check for __GFP_COMP in gfp mask of the mapping for now. Signed-off-by: Kirill A. Shutemov --- inc

Re: [PATCHv2, RFC 07/30] thp, mm: introduce mapping_can_have_hugepages() predicate

2013-04-04 Thread Ric Mason
Hi Kirill, On 03/15/2013 01:50 AM, Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" Returns true if mapping can have huge pages. Just check for __GFP_COMP in gfp mask of the mapping for now. Signed-off-by: Kirill A. Shutemov --- include/linux/pagemap.h | 10 ++ 1 file changed

Re: [PATCHv2, RFC 05/30] thp, mm: avoid PageUnevictable on active/inactive lru lists

2013-04-04 Thread Ric Mason
Hi Kirill, On 03/22/2013 06:11 PM, Kirill A. Shutemov wrote: Dave Hansen wrote: On 03/14/2013 10:50 AM, Kirill A. Shutemov wrote: active/inactive lru lists can contain unevicable pages (i.e. ramfs pages that have been placed on the LRU lists when first allocated), but these pages must not have

Re: [PATCHv2, RFC 04/30] radix-tree: implement preload for multiple contiguous elements

2013-04-04 Thread Ric Mason
Hi Kirill, On 03/15/2013 01:50 AM, Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" Currently radix_tree_preload() only guarantees enough nodes to insert one element. It's a hard limit. You cannot batch a number insert under one tree_lock. This patch introduces radix_tree_preload_count().

Re: [PATCH, RFC 00/16] Transparent huge page cache

2013-04-04 Thread Ric Mason
Hi Hugh, On 01/29/2013 01:03 PM, Hugh Dickins wrote: On Mon, 28 Jan 2013, Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" Here's first steps towards huge pages in page cache. The intend of the work is get code ready to enable transparent huge page cache for the most simple fs -- ramfs.

Re: [PATCH v2 3/4] introduce zero-filled page stat count

2013-03-19 Thread Ric Mason
On 03/20/2013 12:41 AM, Konrad Rzeszutek Wilk wrote: On Sun, Mar 17, 2013 at 8:58 AM, Ric Mason wrote: Hi Konrad, On 03/16/2013 09:06 PM, Konrad Rzeszutek Wilk wrote: On Thu, Mar 14, 2013 at 06:08:16PM +0800, Wanpeng Li wrote: Introduce zero-filled page statistics to monitor the number of

Re: [PATCH v4 0/8] staging: zcache: Support zero-filled pages more efficiently

2013-03-19 Thread Ric Mason
bugfs fix static variables are defined in debug.h but use in multiple C files introduce zero-filled page stat count clean TODO list You can add Reviewed-by: Ric Mason to this patchset. drivers/staging/zcache/TODO |3 +- drivers/staging/zcache/debug.c |5 +- dr

Re: [PATCHv2, RFC 00/30] Transparent huge page cache

2013-03-18 Thread Ric Mason
On 03/18/2013 07:42 PM, Kirill A. Shutemov wrote: Simon Jeons wrote: Hi Kirill, On 03/18/2013 07:19 PM, Kirill A. Shutemov wrote: Simon Jeons wrote: On 03/18/2013 12:03 PM, Simon Jeons wrote: Hi Kirill, On 03/15/2013 01:50 AM, Kirill A. Shutemov wrote: From: "Kirill A. Shutemov" Here's the

Re: [PATCH v2 3/4] introduce zero-filled page stat count

2013-03-17 Thread Ric Mason
Hi Konrad, On 03/16/2013 09:06 PM, Konrad Rzeszutek Wilk wrote: On Thu, Mar 14, 2013 at 06:08:16PM +0800, Wanpeng Li wrote: Introduce zero-filled page statistics to monitor the number of zero-filled pages. Hm, you must be using an older version of the driver. Please rebase it against Greg KH's

Re: mmap vs fs cache

2013-03-08 Thread Ric Mason
Hi Johannes, On 03/09/2013 12:16 AM, Johannes Weiner wrote: On Fri, Mar 08, 2013 at 07:00:55AM -0800, Howard Chu wrote: Chris Friesen wrote: On 03/08/2013 03:40 AM, Howard Chu wrote: There is no way that a process that is accessing only 30GB of a mmap should be able to fill up 32GB of RAM. Th

Re: mmap vs fs cache

2013-03-08 Thread Ric Mason
Hi Johannes, On 03/08/2013 10:08 AM, Johannes Weiner wrote: On Thu, Mar 07, 2013 at 04:43:12PM +0100, Jan Kara wrote: Added mm list to CC. On Tue 05-03-13 09:57:34, Howard Chu wrote: I'm testing our memory-mapped database code on a small VM. The machine has 32GB of RAM and the size of the D

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

2013-03-07 Thread Ric Mason
Ping Hugh, :-) On 03/06/2013 06:18 PM, Ric Mason wrote: Hi Hugh, On 03/06/2013 01:05 PM, Hugh Dickins wrote: On Wed, 6 Mar 2013, Ric Mason wrote: [ I've deleted the context because that was about the unstable tree, and here you have moved to asking about a case in the stable tree.

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

2013-03-06 Thread Ric Mason
On 03/06/2013 07:04 PM, Ric Mason wrote: On 03/06/2013 01:34 PM, Li Haifeng wrote: 2013/2/20 Ric Mason : Hi Hugh, On 02/20/2013 02:56 AM, Hugh Dickins wrote: On Tue, 19 Feb 2013, Ric Mason wrote: There is a call of try_to_free_swap in function swap_writepage, if swap_writepage is call from

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

2013-03-06 Thread Ric Mason
On 03/06/2013 01:34 PM, Li Haifeng wrote: 2013/2/20 Ric Mason : Hi Hugh, On 02/20/2013 02:56 AM, Hugh Dickins wrote: On Tue, 19 Feb 2013, Ric Mason wrote: There is a call of try_to_free_swap in function swap_writepage, if swap_writepage is call from shrink_page_list path, PageSwapCache(page

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

2013-03-06 Thread Ric Mason
Hi Hugh, On 03/06/2013 01:05 PM, Hugh Dickins wrote: On Wed, 6 Mar 2013, Ric Mason wrote: [ I've deleted the context because that was about the unstable tree, and here you have moved to asking about a case in the stable tree. ] I think I can basically understand you, please correct

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

2013-03-05 Thread Ric Mason
Hi Hugh, On 03/06/2013 01:05 PM, Hugh Dickins wrote: On Wed, 6 Mar 2013, Ric Mason wrote: [ I've deleted the context because that was about the unstable tree, and here you have moved to asking about a case in the stable tree. ] For the case of a ksm page is migrated to a different NUMA

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

2013-03-05 Thread Ric Mason
On 03/02/2013 10:57 AM, Hugh Dickins wrote: 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 implementation for num awareness is buggy. Sorry, I just don't understand your comments below, but will t

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

2013-03-01 Thread Ric Mason
Hi Hugh, On 03/02/2013 04:03 AM, Hugh Dickins wrote: On Fri, 1 Mar 2013, Ric Mason wrote: I think the ksm implementation for num awareness is buggy. Sorry, I just don't understand your comments below, but will try to answer or question them as best I can. For page migratyion stuff

Re: [RFC PATCH v2 1/2] mm: tuning hardcoded reserved memory

2013-03-01 Thread Ric Mason
On 03/02/2013 06:41 AM, Andrew Shewmaker wrote: On Fri, Mar 01, 2013 at 10:40:43AM +0800, Ric Mason wrote: On 02/28/2013 11:48 AM, Andrew Shewmaker wrote: On Thu, Feb 28, 2013 at 02:12:00PM -0800, Andrew Morton wrote: On Wed, 27 Feb 2013 15:56:30 -0500 Andrew Shewmaker wrote: The following

Re: [PATCHv5 2/8] zsmalloc: add documentation

2013-02-28 Thread Ric Mason
On 02/25/2013 11:18 PM, Seth Jennings wrote: On 02/23/2013 06:37 PM, Ric Mason wrote: On 02/23/2013 05:02 AM, Seth Jennings wrote: On 02/21/2013 08:56 PM, Ric Mason wrote: On 02/21/2013 11:50 PM, Seth Jennings wrote: On 02/21/2013 02:49 AM, Ric Mason wrote: On 02/19/2013 03:16 AM, Seth

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

2013-02-28 Thread Ric Mason
Hi Hugh, On 02/23/2013 05:03 AM, Hugh Dickins wrote: On Fri, 22 Feb 2013, Ric Mason wrote: On 02/21/2013 04:20 PM, Hugh Dickins wrote: An inconsistency emerged in reviewing the NUMA node changes to KSM: when meeting a page from the wrong NUMA node in a stable tree, we say that it's oka

Re: [RFC PATCH v2 1/2] mm: tuning hardcoded reserved memory

2013-02-28 Thread Ric Mason
On 02/28/2013 11:48 AM, Andrew Shewmaker wrote: On Thu, Feb 28, 2013 at 02:12:00PM -0800, Andrew Morton wrote: On Wed, 27 Feb 2013 15:56:30 -0500 Andrew Shewmaker wrote: The following patches are against the mmtom git tree as of February 27th. The first patch only affects OVERCOMMIT_NEVER mo

Re: zsmalloc limitations and related topics

2013-02-28 Thread Ric Mason
On 02/28/2013 07:24 AM, Dan Magenheimer wrote: Hi all -- I've been doing some experimentation on zsmalloc in preparation for my topic proposed for LSFMM13 and have run across some perplexing limitations. Those familiar with the intimate details of zsmalloc might be well aware of these limitatio

Re: [PATCH] staging/zcache: Fix/improve zcache writeback code, tie to a config option

2013-02-28 Thread Ric Mason
On 03/01/2013 06:29 AM, Dan Magenheimer wrote: From: Ric Mason [mailto:ric.mas...@gmail.com] Subject: Re: [PATCH] staging/zcache: Fix/improve zcache writeback code, tie to a config option On 02/07/2013 02:27 AM, Dan Magenheimer wrote: It was observed by Andrea Arcangeli in 2011 that zcache

Re: [PATCH] staging/zcache: Fix/improve zcache writeback code, tie to a config option

2013-02-25 Thread Ric Mason
On 02/26/2013 01:29 AM, Dan Magenheimer wrote: From: Ric Mason [mailto:ric.mas...@gmail.com] Subject: Re: [PATCH] staging/zcache: Fix/improve zcache writeback code, tie to a config option On 02/07/2013 02:27 AM, Dan Magenheimer wrote: It was observed by Andrea Arcangeli in 2011 that zcache

Re: [PATCH 0/7] ksm: responses to NUMA review

2013-02-23 Thread Ric Mason
On 02/23/2013 04:38 AM, Hugh Dickins wrote: On Fri, 22 Feb 2013, Ric Mason wrote: On 02/21/2013 04:17 PM, Hugh Dickins wrote: Here's a second KSM series, based on mmotm 2013-02-19-17-20: partly in response to Mel's review feedback, partly fixes to issues that I found myself in

Re: [PATCHv5 2/8] zsmalloc: add documentation

2013-02-23 Thread Ric Mason
On 02/23/2013 05:02 AM, Seth Jennings wrote: On 02/21/2013 08:56 PM, Ric Mason wrote: On 02/21/2013 11:50 PM, Seth Jennings wrote: On 02/21/2013 02:49 AM, Ric Mason wrote: On 02/19/2013 03:16 AM, Seth Jennings wrote: On 02/16/2013 12:21 AM, Ric Mason wrote: On 02/14/2013 02:38 AM, Seth

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

2013-02-21 Thread Ric Mason
On 02/21/2013 04:20 PM, Hugh Dickins wrote: An inconsistency emerged in reviewing the NUMA node changes to KSM: when meeting a page from the wrong NUMA node in a stable tree, we say that it's okay for comparisons, but not as a leaf for merging; whereas when meeting a page from the wrong NUMA node

Re: [PATCH 1/7] ksm: add some comments

2013-02-21 Thread Ric Mason
On 02/21/2013 04:19 PM, Hugh Dickins wrote: Added slightly more detail to the Documentation of merge_across_nodes, a few comments in areas indicated by review, and renamed get_ksm_page()'s argument from "locked" to "lock_it". No functional change. Signed-off-by: Hugh Dickins --- Documentatio

Re: [PATCH] staging/zcache: Fix/improve zcache writeback code, tie to a config option

2013-02-21 Thread Ric Mason
On 02/07/2013 02:27 AM, Dan Magenheimer wrote: It was observed by Andrea Arcangeli in 2011 that zcache can get "full" and there must be some way for compressed swap pages to be (uncompressed and then) sent through to the backing swap disk. A prototype of this functionality, called "unuse", was a

Re: [PATCH] staging/zcache: Fix/improve zcache writeback code, tie to a config option

2013-02-21 Thread Ric Mason
On 02/07/2013 02:27 AM, Dan Magenheimer wrote: It was observed by Andrea Arcangeli in 2011 that zcache can get "full" and there must be some way for compressed swap pages to be (uncompressed and then) sent through to the backing swap disk. A prototype of this functionality, called "unuse", was a

Re: [PATCH 0/7] ksm: responses to NUMA review

2013-02-21 Thread Ric Mason
On 02/21/2013 04:17 PM, Hugh Dickins wrote: Here's a second KSM series, based on mmotm 2013-02-19-17-20: partly in response to Mel's review feedback, partly fixes to issues that I found myself in doing more review and testing. None of the issues fixed are truly show-stoppers, though I would pref

Re: Questin about swap_slot free and invalidate page

2013-02-21 Thread Ric Mason
On 02/22/2013 05:42 AM, Dan Magenheimer wrote: From: Ric Mason [mailto:ric.mas...@gmail.com] Subject: Re: Questin about swap_slot free and invalidate page On 02/19/2013 11:27 PM, Dan Magenheimer wrote: From: Ric Mason [mailto:ric.mas...@gmail.com] Hugh is right that handling the possibility

Re: [PATCHv5 2/8] zsmalloc: add documentation

2013-02-21 Thread Ric Mason
On 02/21/2013 11:50 PM, Seth Jennings wrote: On 02/21/2013 02:49 AM, Ric Mason wrote: On 02/19/2013 03:16 AM, Seth Jennings wrote: On 02/16/2013 12:21 AM, Ric Mason wrote: On 02/14/2013 02:38 AM, Seth Jennings wrote: This patch adds a documentation file for zsmalloc at Documentation/vm

Re: [PATCHv5 2/8] zsmalloc: add documentation

2013-02-21 Thread Ric Mason
On 02/21/2013 11:50 PM, Seth Jennings wrote: On 02/21/2013 02:49 AM, Ric Mason wrote: On 02/19/2013 03:16 AM, Seth Jennings wrote: On 02/16/2013 12:21 AM, Ric Mason wrote: On 02/14/2013 02:38 AM, Seth Jennings wrote: This patch adds a documentation file for zsmalloc at Documentation/vm

Re: [PATCHv5 2/8] zsmalloc: add documentation

2013-02-21 Thread Ric Mason
On 02/19/2013 03:16 AM, Seth Jennings wrote: On 02/16/2013 12:21 AM, Ric Mason wrote: On 02/14/2013 02:38 AM, Seth Jennings wrote: This patch adds a documentation file for zsmalloc at Documentation/vm/zsmalloc.txt Signed-off-by: Seth Jennings --- Documentation/vm/zsmalloc.txt | 68

Re: [patch] mm: mlock: document scary-looking stack expansion mlock chain

2013-02-20 Thread Ric Mason
On 02/01/2013 02:10 PM, Johannes Weiner wrote: The fact that mlock calls get_user_pages, and get_user_pages might call mlock when expanding a stack looks like a potential recursion. Why expand stack need call mlock? I can't find it in the codes, could you point out to me? However, mlock ma

Re: [patch] mm: shmem: use new radix tree iterator

2013-02-20 Thread Ric Mason
Hi Hugh, On 02/04/2013 10:01 AM, Hugh Dickins wrote: On Fri, 1 Feb 2013, Johannes Weiner wrote: In shmem_find_get_pages_and_swap, use the faster radix tree iterator construct from 78c1d78 "radix-tree: introduce bit-optimized iterator". Signed-off-by: Johannes Weiner Yes, that looks fine, and

Re: Questin about swap_slot free and invalidate page

2013-02-19 Thread Ric Mason
On 02/19/2013 11:27 PM, Dan Magenheimer wrote: From: Ric Mason [mailto:ric.mas...@gmail.com] Sent: Tuesday, February 19, 2013 5:12 AM To: Dan Magenheimer Cc: Minchan Kim; Hugh Dickins; Nitin Gupta; Seth Jennings; Konrad Rzeszutek Wilk; linux...@kvack.org; linux-kernel@vger.kernel.org; Andrew

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

2013-02-19 Thread Ric Mason
Hi Hugh, On 02/20/2013 02:56 AM, Hugh Dickins wrote: On Tue, 19 Feb 2013, Ric Mason wrote: There is a call of try_to_free_swap in function swap_writepage, if swap_writepage is call from shrink_page_list path, PageSwapCache(page) == trure, PageWriteback(page) maybe false, page_swapcount(page

Re: Questin about swap_slot free and invalidate page

2013-02-19 Thread Ric Mason
On 02/05/2013 05:28 AM, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Sent: Sunday, February 03, 2013 7:50 PM To: Hugh Dickins Cc: Nitin Gupta; Dan Magenheimer; Seth Jennings; Konrad Rzeszutek Wilk; linux...@kvack.org; linux- ker...@vger.kernel.org; Andrew Morton Subject:

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

2013-02-19 Thread Ric Mason
On 02/19/2013 02:06 AM, Hugh Dickins wrote: 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. Yes, unless the page i

Re: [PATCH v2] zsmalloc: Add Kconfig for enabling PTE method

2013-02-16 Thread Ric Mason
On 02/06/2013 10:17 AM, Minchan Kim wrote: Zsmalloc has two methods 1) copy-based and 2) pte-based to access allocations that span two pages. You can see history why we supported two approach from [1]. In summary, copy-based method is 3 times fater in x86 while pte-based is 6 times faster in ARM

Re: [PATCHv5 7/8] zswap: add swap page writeback support

2013-02-15 Thread Ric Mason
On 02/14/2013 02:38 AM, Seth Jennings wrote: This patch adds support for evicting swap pages that are currently compressed in zswap to the swap device. This functionality is very important and make zswap a true cache in that, once the cache is full or can't grow due to memory pressure, the oldes

Re: [PATCH] zsmalloc: Add Kconfig for enabling PTE method

2013-02-15 Thread Ric Mason
On 02/04/2013 08:23 AM, Minchan Kim wrote: Zsmalloc has two methods 1) copy-based and 2) pte based to access allocations that span two pages. You can see history why we supported two approach from [1]. But it was bad choice that adding hard coding to select architecture which want to use pte bas

Re: [PATCHv5 2/8] zsmalloc: add documentation

2013-02-15 Thread Ric Mason
On 02/14/2013 02:38 AM, Seth Jennings wrote: This patch adds a documentation file for zsmalloc at Documentation/vm/zsmalloc.txt Signed-off-by: Seth Jennings --- Documentation/vm/zsmalloc.txt | 68 + 1 file changed, 68 insertions(+) create mode 1006

Re: [PATCHv5 4/8] zswap: add to mm/

2013-02-15 Thread Ric Mason
On 02/14/2013 02:38 AM, Seth Jennings wrote: zswap is a thin compression backend for frontswap. It receives pages from frontswap and attempts to store them in a compressed memory pool, resulting in an effective partial memory reclaim and dramatically reduced swap device I/O. Additionally, in mos

Re: [PATCHv5 1/8] zsmalloc: add to mm/

2013-02-15 Thread Ric Mason
On 02/14/2013 02:38 AM, Seth Jennings wrote: = DO NOT MERGE, FOR REVIEW ONLY This patch introduces zsmalloc as new code, however, it already exists in drivers/staging. In order to build successfully, you must select EITHER to driver/staging version OR this version. Once zsmalloc is revie

Re: [PATCHv5 0/8] zswap: compressed swap caching

2013-02-15 Thread Ric Mason
On 02/14/2013 02:38 AM, Seth Jennings wrote: Lots of changes this time around. Hopefully I collected and acted on all the feedback. I apologize ahead of time if I missed something. Please let me know if I did. Changelog: v5: * zsmalloc patch converted from promotion to "new code" (for review

Re: [PATCH v7 4/4] zram: get rid of lockdep warning

2013-02-04 Thread Ric Mason
On Tue, 2013-02-05 at 15:06 +0900, Minchan Kim wrote: > On Mon, Feb 04, 2013 at 01:39:24AM -0600, Ric Mason wrote: > > On Mon, 2013-02-04 at 08:46 +0900, Minchan Kim wrote: > > > Lockdep complains about recursive deadlock of zram->init_lock. > > > [1] made it f

Re: [PATCH 02/15] mm: frontswap: lazy initialization to allow tmem backends to build/run as modules

2013-02-04 Thread Ric Mason
On Mon, 2013-02-04 at 13:53 +0800, Bob Liu wrote: > On Sun, Feb 3, 2013 at 3:07 PM, Ric Mason wrote: > > Hi Konrad, > > On Fri, 2013-02-01 at 15:22 -0500, Konrad Rzeszutek Wilk wrote: > >> From: Dan Magenheimer > >> > >> With the goal of allowing tmem

Re: [PATCH v2] Make frontswap+cleancache and its friend be modularized.

2013-02-04 Thread Ric Mason
On Mon, 2013-02-04 at 09:14 -0600, Seth Jennings wrote: > On 02/03/2013 02:52 AM, Ric Mason wrote: > > Hi Konrad, > > On Fri, 2013-02-01 at 15:22 -0500, Konrad Rzeszutek Wilk wrote: > > > > I have already enable frontswap,cleancache,zcache, > > FRONTSWAP [=y]

Re: [PATCH v7 4/4] zram: get rid of lockdep warning

2013-02-03 Thread Ric Mason
On Mon, 2013-02-04 at 08:46 +0900, Minchan Kim wrote: > Lockdep complains about recursive deadlock of zram->init_lock. > [1] made it false positive because we can't request IO to zram > before setting disksize. Anyway, we should shut lockdep up to > avoid many reporting from user. > > [1] : zram:

Re: [PATCH v7 2/4] zram: force disksize setting before using zram

2013-02-03 Thread Ric Mason
Hi Minchan, On Mon, 2013-02-04 at 08:46 +0900, Minchan Kim wrote: > Now zram document syas "set disksize is optional" > but partly it's wrong. When you try to use zram firstly after > booting, you must set disksize, otherwise zram can't work because > zram gendisk's size is 0. But once you do it, y

Re: [PATCH v2] Make frontswap+cleancache and its friend be modularized.

2013-02-03 Thread Ric Mason
Hi Konrad, On Fri, 2013-02-01 at 15:22 -0500, Konrad Rzeszutek Wilk wrote: I have already enable frontswap,cleancache,zcache, FRONTSWAP [=y] CLEANCACHE [=y] ZCACHE [=y] But all of knode under /sys/kernel/debug/frontswap and cleancache still zero, my swap device is enable, where I miss? > Par

Re: [PATCH 01/15] mm: cleancache: lazy initialization to allow tmem backends to build/run as modules

2013-02-03 Thread Ric Mason
Hi Konrad, On Fri, 2013-02-01 at 15:22 -0500, Konrad Rzeszutek Wilk wrote: > From: Dan Magenheimer > > With the goal of allowing tmem backends (zcache, ramster, Xen tmem) to be > built/loaded as modules rather than built-in and enabled by a boot parameter, Which boot parameter? I can't find it i

Re: [PATCH 02/15] mm: frontswap: lazy initialization to allow tmem backends to build/run as modules

2013-02-02 Thread Ric Mason
Hi Konrad, On Fri, 2013-02-01 at 15:22 -0500, Konrad Rzeszutek Wilk wrote: > From: Dan Magenheimer > > With the goal of allowing tmem backends (zcache, ramster, Xen tmem) to be > built/loaded as modules rather than built-in and enabled by a boot parameter, > this patch provides "lazy initializati

Re: [PATCH 0/11] ksm: NUMA trees and page migration

2013-01-30 Thread Ric Mason
On Tue, 2013-01-29 at 17:51 +0100, Andrea Arcangeli wrote: > Hi everyone, > > On Tue, Jan 29, 2013 at 04:26:13AM +0200, Izik Eidus wrote: > > On 01/29/2013 02:49 AM, Izik Eidus wrote: > > > On 01/29/2013 01:54 AM, Andrew Morton wrote: > > >> On Fri, 25 Jan 2013 17:53:10 -0800 (PST) > > >> Hugh Dic