Re: [PATCH] mm: Fixup the condition whether the page cache is free

2013-03-04 Thread Johannes Weiner
On Mon, Mar 04, 2013 at 09:54:26AM +0800, Li Haifeng wrote: When a page cache is to reclaim, we should to decide whether the page cache is free. IMO, the condition whether a page cache is free should be 3 in page frame reclaiming. The reason lists as below. When page is allocated, the

Re: kswapd craziness in 3.7

2012-11-29 Thread Johannes Weiner
On Thu, Nov 29, 2012 at 04:30:12PM +0100, Thorsten Leemhuis wrote: Mel Gorman wrote on 29.11.2012 00:54: On Wed, Nov 28, 2012 at 02:52:15PM -0800, Andrew Morton wrote: On Wed, 28 Nov 2012 10:13:59 + Mel Gorman mgor...@suse.de wrote: Based on the reports I've seen I expect the

Re: 3.7-rc6 soft lockup in kswapd0

2012-11-29 Thread Johannes Weiner
On Thu, Nov 29, 2012 at 09:54:14AM -0500, George Spelvin wrote: Mel Gorman mgor...@suse.de wrote: On Tue, Nov 27, 2012 at 04:25:14PM -0500, George Spelvin wrote: Well, it just made it to 24 hours, it did before. I'm going to wait a couple more days before declaring victory, but it looks

Re: kswapd craziness in 3.7

2012-11-30 Thread Johannes Weiner
to be suitable for compaction. Mel? Rik? --- From: Johannes Weiner han...@cmpxchg.org Subject: [patch] mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones When a zone meets its high watermark and is compactable in case of higher order allocations, it contributes

Re: kswapd craziness in 3.7

2012-12-03 Thread Johannes Weiner
caches (echo 3 /proc/sys/vm/drop_cache) (After that I've had over 1G free memory) Any chance you could retry with this patch on top? Thanks! --- From: Johannes Weiner han...@cmpxchg.org Subject: [patch] mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones When

Re: kswapd craziness in 3.7

2012-12-03 Thread Johannes Weiner
] --- From: Johannes Weiner han...@cmpxchg.org Subject: [patch] mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones When a zone meets its high watermark and is compactable in case of higher order allocations, it contributes to the percentage

Re: kswapd craziness in 3.7

2012-12-04 Thread Johannes Weiner
On Tue, Dec 04, 2012 at 10:15:09AM +0100, Jiri Slaby wrote: On 12/04/2012 10:05 AM, Zdenek Kabelac wrote: Dne 3.12.2012 20:18, Johannes Weiner napsal(a): Szia Zdenek, On Mon, Dec 03, 2012 at 04:23:15PM +0100, Zdenek Kabelac wrote: Ok, bad news - I've been hit by kswapd0 loop again

Re: kswapd craziness in 3.7

2012-12-04 Thread Johannes Weiner
On Tue, Dec 04, 2012 at 10:05:29AM +0100, Zdenek Kabelac wrote: Dne 3.12.2012 20:18, Johannes Weiner napsal(a): Szia Zdenek, On Mon, Dec 03, 2012 at 04:23:15PM +0100, Zdenek Kabelac wrote: Ok, bad news - I've been hit by kswapd0 loop again - my kernel git commit

Re: kswapd craziness in 3.7

2012-12-04 Thread Johannes Weiner
On Tue, Dec 04, 2012 at 05:22:38PM +0100, Jiri Slaby wrote: On 12/04/2012 05:11 PM, Johannes Weiner wrote: Any chance you could retry with this patch on top? It does not apply to -next :/. Should I try anything else? The COMPACTION_BUILD changed to IS_ENABLED(CONFIG_COMPACTION), below

Re: kswapd craziness in 3.7

2012-12-04 Thread Johannes Weiner
On Mon, Dec 03, 2012 at 02:42:08PM -0500, Johannes Weiner wrote: On Mon, Dec 03, 2012 at 09:30:12AM +0100, Thorsten Leemhuis wrote: John was able to reproduce the problem quickly with a kernel that contained the patch from your mail. For details see [stripped: all the glory details

Re: [PATCH] vmalloc: Remove alloc_map from vmap_block.

2013-02-07 Thread Johannes Weiner
On Fri, Feb 08, 2013 at 12:37:13PM +0900, Chanho Min wrote: I started looking for workloads to profile but then lost interest. The current code can theoretically end up walking through a lot of partially used blocks if a string of allocations never fit any of them. The number of these blocks

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-08 Thread Johannes Weiner
On Thu, Jan 03, 2013 at 06:54:18PM +0100, Michal Hocko wrote: Now that per-node-zone-priority iterator caches memory cgroups rather than their css ids we have to be careful and remove them from the iterator when they are on the way out otherwise they might hang for unbounded amount of time

Re: RFC: mincore: add a bit to indicate a page is dirty.

2013-02-11 Thread Johannes Weiner
On Mon, Feb 11, 2013 at 01:43:03PM +1030, Rusty Russell wrote: I am writing an app which really wants to know if a file is on the disk or not (ie. do I need to sync?). When the page is under writeback, it's not necessarily on disk yet, but you also don't need to sync. Which semantics make more

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-11 Thread Johannes Weiner
On Mon, Feb 11, 2013 at 04:16:49PM +0100, Michal Hocko wrote: On Fri 08-02-13 14:33:18, Johannes Weiner wrote: [...] for each in hierarchy: for each node: for each zone: for each reclaim priority: every time a cgroup is destroyed. I don't think such a hammer

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-11 Thread Johannes Weiner
On Mon, Feb 11, 2013 at 08:29:29PM +0100, Michal Hocko wrote: On Mon 11-02-13 12:56:19, Johannes Weiner wrote: On Mon, Feb 11, 2013 at 04:16:49PM +0100, Michal Hocko wrote: Maybe we could keep the counter per memcg but that would mean that we would need to go up the hierarchy as well. We

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-11 Thread Johannes Weiner
On Mon, Feb 11, 2013 at 10:27:56PM +0100, Michal Hocko wrote: On Mon 11-02-13 14:58:24, Johannes Weiner wrote: On Mon, Feb 11, 2013 at 08:29:29PM +0100, Michal Hocko wrote: On Mon 11-02-13 12:56:19, Johannes Weiner wrote: On Mon, Feb 11, 2013 at 04:16:49PM +0100, Michal Hocko wrote

Re: [PATCH] x86: mm: Check if PUD is large when validating a kernel address

2013-02-11 Thread Johannes Weiner
then it should also be included in -stable back as far as 3.0-stable. Cc: sta...@vger.kernel.org Signed-off-by: Mel Gorman mgor...@suse.de Acked-by: Johannes Weiner han...@cmpxchg.org Agreed also on the backporting to -stable as far as possible. -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-12 Thread Johannes Weiner
On Tue, Feb 12, 2013 at 10:54:19AM +0100, Michal Hocko wrote: On Mon 11-02-13 17:39:43, Johannes Weiner wrote: On Mon, Feb 11, 2013 at 10:27:56PM +0100, Michal Hocko wrote: On Mon 11-02-13 14:58:24, Johannes Weiner wrote: That way, if the dead count gives the go-ahead, you KNOW

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-12 Thread Johannes Weiner
Michal Hocko mho...@suse.cz wrote: On Tue 12-02-13 10:10:02, Johannes Weiner wrote: On Tue, Feb 12, 2013 at 10:54:19AM +0100, Michal Hocko wrote: On Mon 11-02-13 17:39:43, Johannes Weiner wrote: On Mon, Feb 11, 2013 at 10:27:56PM +0100, Michal Hocko wrote: On Mon 11-02-13 14:58:24

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-12 Thread Johannes Weiner
Michal Hocko mho...@suse.cz wrote: On Tue 12-02-13 17:13:32, Michal Hocko wrote: On Tue 12-02-13 16:43:30, Michal Hocko wrote: [...] The example was not complete: Wait a moment. But what prevents from the following race? rcu_read_lock() cgroup_next_descendant_pre

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-12 Thread Johannes Weiner
On Tue, Feb 12, 2013 at 08:10:51AM -0800, Paul E. McKenney wrote: On Tue, Feb 12, 2013 at 04:43:30PM +0100, Michal Hocko wrote: On Tue 12-02-13 10:10:02, Johannes Weiner wrote: On Tue, Feb 12, 2013 at 10:54:19AM +0100, Michal Hocko wrote: On Mon 11-02-13 17:39:43, Johannes Weiner wrote

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-12 Thread Johannes Weiner
On Tue, Feb 12, 2013 at 06:12:16PM +0100, Michal Hocko wrote: On Tue 12-02-13 11:41:03, Johannes Weiner wrote: Michal Hocko mho...@suse.cz wrote: On Tue 12-02-13 17:13:32, Michal Hocko wrote: On Tue 12-02-13 16:43:30, Michal Hocko wrote: [...] The example was not complete

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-12 Thread Johannes Weiner
On Tue, Feb 12, 2013 at 10:31:48AM -0800, Paul E. McKenney wrote: On Tue, Feb 12, 2013 at 12:25:26PM -0500, Johannes Weiner wrote: On Tue, Feb 12, 2013 at 08:10:51AM -0800, Paul E. McKenney wrote: On Tue, Feb 12, 2013 at 04:43:30PM +0100, Michal Hocko wrote: On Tue 12-02-13 10:10:02

Re: [PATCH 1/3] memcg: move mem_cgroup_soft_limit_tree_init to mem_cgroup_init

2013-02-05 Thread Johannes Weiner
code). Signed-off-by: Michal Hocko mho...@suse.cz Acked-by: Johannes Weiner han...@cmpxchg.org -- 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

Re: [PATCH 2/3] memcg: move memcg_stock initialization to mem_cgroup_init

2013-02-05 Thread Johannes Weiner
with other controller specific parts. This patch wrappes the current memcg_stock initialization code into a helper calls it from the controller subsystem initialization code. Signed-off-by: Michal Hocko mho...@suse.cz Acked-by: Johannes Weiner han...@cmpxchg.org -- To unsubscribe from

Re: [PATCH 3/3] memcg: cleanup mem_cgroup_init comment

2013-02-05 Thread Johannes Weiner
-by: Michal Hocko mho...@suse.cz It seems a little strange to document that the subsystem init function should be used for initializing the subsystem. But your new comment is better than the old comment :-) Acked-by: Johannes Weiner han...@cmpxchg.org -- To unsubscribe from this list: send the line

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

2013-02-05 Thread Johannes Weiner
On Sat, Feb 02, 2013 at 12:25:44PM +0400, Konstantin Khlebnikov wrote: 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 Weinerhan...@cmpxchg.org Hmm, ACK

Re: [PATCH 0/3] mm: rename confusing function names

2013-02-05 Thread Johannes Weiner
On Wed, Feb 06, 2013 at 01:09:55AM +0800, Zhang Yanfei wrote: Function nr_free_zone_pages, nr_free_buffer_pages and nr_free_pagecache_pages are horribly badly named, they count present_pages - pages_high within zones instead of free pages, so why not rename them to reasonable names, not

Re: [PATCH] vmalloc: Remove alloc_map from vmap_block.

2013-02-07 Thread Johannes Weiner
Hi Chanho, On Thu, Feb 07, 2013 at 11:27:54AM +0900, Chanho Min wrote: There is no reason to maintain alloc_map in the vmap_block. The use of alloc_map may require heavy bitmap operation sometimes. In the worst-case, We need 1024 for-loops to find 1 free bit and thus cause overhead.

Re: [PATCH] mmotm: memcgvmscan-do-not-break-out-targeted-reclaim-without-reclaimed-pages.patch fix

2013-01-30 Thread Johannes Weiner
On Tue, Jan 29, 2013 at 09:51:04AM +0100, Michal Hocko wrote: Ying has noticed me (via private email) that the patch is bogus because the break out condition is incorrect. She said she would post a fix but she's been probably too busy. If she doesn't oppose, could you add the follow up fix,

[patch] fs: inode: fix icache pruning locked inode spin protection

2013-01-31 Thread Johannes Weiner
Inodes are added to the head of the superblock LRU list and reclaimed from the tail. If trylocking an inode during reclaim fails, it has to be moved to the head of the list, not the tail, to prevent spinning on it. Signed-off-by: Johannes Weiner han...@cmpxchg.org --- fs/inode.c | 4 ++-- 1

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

2013-01-31 Thread Johannes Weiner
: the stack expansion mlocks only the newly expanded range and so will not result in recursive expansion. Reported-by: Al Viro v...@zeniv.linux.org.uk Signed-off-by: Johannes Weiner han...@cmpxchg.org --- mm/mlock.c | 4 1 file changed, 4 insertions(+) diff --git a/mm/mlock.c b/mm/mlock.c

[patch] mm: refactor inactive_file_is_low() to use get_lru_size()

2013-01-31 Thread Johannes Weiner
situations. Get rid of inactive_file_is_low_global() and mem_cgroup_inactive_file_is_low() by using get_lru_size() and compare the numbers in common code. Signed-off-by: Johannes Weiner han...@cmpxchg.org --- include/linux/memcontrol.h | 7 --- mm/memcontrol.c| 11 --- mm/vmscan.c

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

2013-01-31 Thread Johannes Weiner
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 han...@cmpxchg.org --- mm/shmem.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git

Re: [PATCH] add extra free kbytes tunable

2013-02-26 Thread Johannes Weiner
On Tue, Feb 26, 2013 at 10:47:31AM +, Mel Gorman wrote: On Fri, Feb 22, 2013 at 12:56:34PM -0500, Johannes Weiner wrote: SNIP : We have a server workload wherein machines with 100G+ of free memory : (used by page cache), scattered but frequent random io reads from 12

[patch 1/2] mm: fincore()

2013-02-14 Thread Johannes Weiner
On Mon, Feb 11, 2013 at 02:12:39PM -0800, Andrew Morton wrote: Also, having to mmap the file to be able to query pagecache state is a hack. Whatever happened to the fincore() patch? I don't know, but how about this one: --- From: Johannes Weiner han...@cmpxchg.org Subject: [patch 1/2] mm

[patch 2/2] x86-64: hook up fincore() syscall

2013-02-14 Thread Johannes Weiner
Signed-off-by: Johannes Weiner han...@cmpxchg.org --- arch/x86/syscalls/syscall_64.tbl | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl index 38ae65d..c9ac047 100644 --- a/arch/x86/syscalls/syscall_64.tbl +++ b/arch/x86

Re: [patch 1/2] mm: fincore()

2013-02-15 Thread Johannes Weiner
On Fri, Feb 15, 2013 at 01:14:51PM -0800, Andrew Morton wrote: On Fri, 15 Feb 2013 01:34:50 -0500 Johannes Weiner han...@cmpxchg.org wrote: On Mon, Feb 11, 2013 at 02:12:39PM -0800, Andrew Morton wrote: Also, having to mmap the file to be able to query pagecache state is a hack

Re: [patch 1/2] mm: fincore()

2013-02-15 Thread Johannes Weiner
On Fri, Feb 15, 2013 at 01:27:38PM -0800, Andrew Morton wrote: On Fri, 15 Feb 2013 01:34:50 -0500 Johannes Weiner han...@cmpxchg.org wrote: + * The status is returned in a vector of bytes. The least significant + * bit of each byte is 1 if the referenced page is in memory, otherwise

Re: [patch 1/2] mm: fincore()

2013-02-17 Thread Johannes Weiner
On Sat, Feb 16, 2013 at 02:53:43PM +1030, Rusty Russell wrote: Andrew Morton a...@linux-foundation.org writes: On Fri, 15 Feb 2013 18:13:04 -0500 Johannes Weiner han...@cmpxchg.org wrote: I dunno. The byte vector might not be optimal but its worst cases seem more attractive, is just

Re: [PATCH 5/7] mm,ksm: swapoff might need to copy

2013-02-21 Thread Johannes Weiner
being used there: rework it with page != swapcache. Signed-off-by: Hugh Dickins hu...@google.com Acked-by: Johannes Weiner han...@cmpxchg.org -- 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

Re: [PATCH] add extra free kbytes tunable

2013-02-22 Thread Johannes Weiner
On Tue, Feb 19, 2013 at 09:19:27PM -0800, dormando wrote: The problem is that adding this tunable will constrain future VM implementations. We will forever need to at least retain the pseudo-file. We will also need to make some effort to retain its behaviour. It would of course be

Re: [PATCH 1/4] mm: fix invalidate_complete_page2 lock ordering

2012-09-19 Thread Johannes Weiner
...@google.com Cc: Mel Gorman m...@csn.ul.ie Cc: Rik van Riel r...@redhat.com Cc: Johannes Weiner han...@cmpxchg.org Cc: Michel Lespinasse wal...@google.com Cc: Ying Han ying...@google.com Cc: sta...@vger.kernel.org Acked-by: Johannes Weiner han...@cmpxchg.org -- To unsubscribe from this list: send

Re: [PATCH 2/4] mm: remove vma arg from page_evictable

2012-09-19 Thread Johannes Weiner
page_evictable() itself! They're dealing with a freshly allocated anonymous page, which has no mapping and cannot be mlocked yet. Signed-off-by: Hugh Dickins hu...@google.com Cc: Mel Gorman m...@csn.ul.ie Cc: Rik van Riel r...@redhat.com Cc: Johannes Weiner han...@cmpxchg.org Cc: Michel

Re: [PATCH 3/4] mm: clear_page_mlock in page_remove_rmap

2012-09-19 Thread Johannes Weiner
On Tue, Sep 18, 2012 at 08:55:21PM -0700, Hugh Dickins wrote: We had thought that pages could no longer get freed while still marked as mlocked; but Johannes Weiner posted this program to demonstrate that truncating an mlocked private file mapping containing COWed pages is still mishandled

Re: [PATCH 4/4] mm: remove free_page_mlock

2012-09-19 Thread Johannes Weiner
Cc: Mel Gorman m...@csn.ul.ie Cc: Rik van Riel r...@redhat.com Cc: Johannes Weiner han...@cmpxchg.org Cc: Michel Lespinasse wal...@google.com Cc: Ying Han ying...@google.com Acked-by: Johannes Weiner han...@cmpxchg.org -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH] mm: fix NR_ISOLATED_[ANON|FILE] mismatch

2012-09-19 Thread Johannes Weiner
On Wed, Sep 19, 2012 at 01:04:56PM -0400, KOSAKI Motohiro wrote: On Wed, Sep 19, 2012 at 3:45 AM, Minchan Kim minc...@kernel.org wrote: When I looked at zone stat mismatch problem, I found migrate_to_node doesn't decrease NR_ISOLATED_[ANON|FILE] if check_range fails. This is a bit

Re: [PATCH] mm: fix NR_ISOLATED_[ANON|FILE] mismatch

2012-09-20 Thread Johannes Weiner
usecase which might pass to MPOL_MF_STRICT. Cc: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com Cc: Mel Gorman mgor...@suse.de Cc: Christoph Lameter c...@linux.com Cc: David Rientjes rient...@google.com Cc: Vasiliy Kulikov sego...@gmail.com Suggested-by: Johannes Weiner han...@cmpxchg.org Signed

Re: [PATCH 3/4] mm: clear_page_mlock in page_remove_rmap

2012-09-20 Thread Johannes Weiner
On Wed, Sep 19, 2012 at 02:52:53PM -0700, Hugh Dickins wrote: On Wed, 19 Sep 2012, Johannes Weiner wrote: On Tue, Sep 18, 2012 at 08:55:21PM -0700, Hugh Dickins wrote: --- 3.6-rc6.orig/mm/memory.c 2012-09-18 15:38:08.0 -0700 +++ 3.6-rc6/mm/memory.c 2012-09-18 17:51

Re: [PATCH] mm: fix NR_ISOLATED_[ANON|FILE] mismatch

2012-09-20 Thread Johannes Weiner
On Fri, Sep 21, 2012 at 08:24:08AM +0900, Minchan Kim wrote: On Thu, Sep 20, 2012 at 11:41:11AM -0400, Johannes Weiner wrote: On Thu, Sep 20, 2012 at 08:51:56AM +0900, Minchan Kim wrote: From: Minchan Kim minc...@kernel.org Date: Thu, 20 Sep 2012 08:39:52 +0900 Subject: [PATCH] mm

Re: [PATCH 5/4] mm: remove unevictable_pgs_mlockfreed

2012-09-21 Thread Johannes Weiner
if that turns out to be wrong. Signed-off-by: Hugh Dickins hu...@google.com Cc: Mel Gorman m...@csn.ul.ie Cc: Rik van Riel r...@redhat.com Cc: Johannes Weiner han...@cmpxchg.org Cc: Michel Lespinasse wal...@google.com Cc: Ying Han ying...@google.com Acked-by: Johannes Weiner han...@cmpxchg.org

Re: [PATCH] memory cgroup: update root memory cgroup when node is onlined

2012-09-13 Thread Johannes Weiner
Hi, On Thu, Sep 13, 2012 at 03:14:28PM +0800, Wen Congyang wrote: root_mem_cgroup-info.nodeinfo is initialized when the system boots. But NODE_DATA(nid) is null if the node is not onlined, so root_mem_cgroup-info.nodeinfo[nid]-zoneinfo[zone].lruvec.zone contains an invalid pointer. If we use

Re: [PATCH -mm] enable CONFIG_COMPACTION by default

2012-09-13 Thread Johannes Weiner
-by: Johannes Weiner han...@cmpxchg.org -- 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] memory cgroup: update root memory cgroup when node is onlined

2012-09-14 Thread Johannes Weiner
On Thu, Sep 13, 2012 at 06:36:34PM -0700, Hugh Dickins wrote: On Thu, 13 Sep 2012, Johannes Weiner wrote: On Thu, Sep 13, 2012 at 03:14:28PM +0800, Wen Congyang wrote: root_mem_cgroup-info.nodeinfo is initialized when the system boots. But NODE_DATA(nid) is null if the node is not onlined

Re: linux-next: manual merge of the akpm tree with the tip tree

2012-07-25 Thread Johannes Weiner
On Wed, Jul 25, 2012 at 11:57:13AM -0700, Andrew Morton wrote: On Wed, 25 Jul 2012 09:35:03 +0200 Johannes Weiner han...@cmpxchg.org wrote: As this is unlikely to reappear in this merge window, the conflict resolution is quite simple. All that's needed is remove the 3 hunks from my

Re: /dev/kmem BUG on mmap

2012-07-30 Thread Johannes Weiner
On Mon, Jul 30, 2012 at 12:28:35AM +0200, Sasha Levin wrote: Hi all, I was poking around /dev/kmem related code, and noticed the following in mmap_kmem(): /* Turn a kernel-virtual address into a physical page frame */ pfn = __pa((u64)vma-vm_pgoff PAGE_SHIFT) PAGE_SHIFT;

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Johannes Weiner
On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: On Thu, 2 Aug 2012, Glauber Costa wrote: diff --git a/mm/slub.c b/mm/slub.c index e517d43..9ca4e20 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3453,7 +3453,7 @@ void kfree(const void *x) if

Re: [PATCH] slub: use free_page instead of put_page for freeing kmalloc allocation

2012-08-02 Thread Johannes Weiner
On Thu, Aug 02, 2012 at 08:51:31PM +0400, Glauber Costa wrote: On 08/02/2012 08:42 PM, Johannes Weiner wrote: On Thu, Aug 02, 2012 at 09:06:41AM -0500, Christoph Lameter wrote: On Thu, 2 Aug 2012, Glauber Costa wrote: diff --git a/mm/slub.c b/mm/slub.c index e517d43..9ca4e20 100644

[RFC] Sectionized printk data

2008-02-04 Thread Johannes Weiner
function and then moves the data automatically when it is a literal, but I couldn't find mechanisms that allow this. Anyone of you got an idea? What do you think in general? Hannes --- From: Johannes Weiner [EMAIL PROTECTED] Sectionized printk wrappers Introduce printk wrappers

Re: [RFC] Sectionized printk data

2008-02-04 Thread Johannes Weiner
Hi Sam, Sam Ravnborg [EMAIL PROTECTED] writes: On Mon, Feb 04, 2008 at 04:48:34PM +0100, Johannes Weiner wrote: Hi, current approaches to have printk format strings in the corresponding data section to the function they appear in look like the following (at least what I have seen so far

Re: Are Section mismatches out of control?

2008-02-01 Thread Johannes Weiner
Hi, Andrew Morton [EMAIL PROTECTED] writes: Question is: why do people keep adding new ones when they are so easy to detect and fix? Asnwer: because neither they nor their patch integrators are doing adequate compilation testing. How about adding an Untested-by tag for psychological

Re: [PATCH] [4/31] Add pte_pgprot on i386

2008-01-15 Thread Johannes Weiner
Hi, Andi Kleen [EMAIL PROTECTED] writes: [...] --- linux.orig/include/asm-x86/pgtable-2level.h +++ linux/include/asm-x86/pgtable-2level.h @@ -75,6 +75,8 @@ static inline int pte_exec_kernel(pte_t #define pgoff_to_pte(off) \ ((pte_t) { .pte_low = (((off) 0x1f) 1) + (((off) 5) 8)

[PATCH] thinkpad_acpi: Define _sta() only when there are callsites

2008-01-16 Thread Johannes Weiner
With configs where neither the dock nor the bay subdriver is enabled, _sta() is defined but never used. Define it conditionally. Signed-off-by: Johannes Weiner [EMAIL PROTECTED] --- drivers/misc/thinkpad_acpi.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers

thinkpad_acpi: define _sta only when needed

2008-01-16 Thread Johannes Weiner
Define _sta() helper conditionally; also remove its prototype from the internal header and also some other unneeded ones. This function is only needed when the bay or the dock subdriver is enabled. Otherwise, gcc complains about an unused static function. -- To unsubscribe from this list: send

[PATCH] thinkpad_acpi: Remove superfluous prototypes from internal header

2008-01-16 Thread Johannes Weiner
The helper functions are defined at the top of the C file so they are known within the definition of the callsites below anyway. Signed-off-by: Johannes Weiner [EMAIL PROTECTED] --- drivers/misc/thinkpad_acpi.h | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git

Re: [patch for 2.6.24? 1/1] cpufreq: Initialise default governor before use

2008-01-16 Thread Johannes Weiner
Hi, Ingo Molnar [EMAIL PROTECTED] writes: * [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: +#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE +fs_initcall(cpufreq_gov_dbs_init); +#else module_init(cpufreq_gov_dbs_init); +#endif silly question: why not unconditional fs_initcall() ? Would

Why is the kfree() argument const?

2008-01-16 Thread Johannes Weiner
Hi, is there any reason why kfree() takes a const pointer just to degrade it with the call to slab_free()/__cache_free() again? The promise that the pointee is not modified is just bogus in this case, anyway, isn't it? Hannes -- To unsubscribe from this list: send the line unsubscribe

Re: thinkpad_acpi: define _sta only when needed

2008-01-16 Thread Johannes Weiner
Hi Henrique, Henrique de Moraes Holschuh [EMAIL PROTECTED] writes: On Wed, 16 Jan 2008, Johannes Weiner wrote: Define _sta() helper conditionally; also remove its prototype from the internal header and also some other unneeded ones. This function is only needed when the bay or the dock

Re: Why is the kfree() argument const?

2008-01-16 Thread Johannes Weiner
Hi, Linus Torvalds [EMAIL PROTECTED] writes: [...] const is a pointer type issue, and is meant to make certain mis-uses more visible at compile time. It has *no* other meaning, and anybody who thinks it has is just setting himself up for problems. [...] - From a very obvious and very

Re: Why is the kfree() argument const?

2008-01-16 Thread Johannes Weiner
Hi, Christoph Lameter [EMAIL PROTECTED] writes: On Wed, 16 Jan 2008, Johannes Weiner wrote: So if I got it right and you actually modify the memory you only got a const pointer to, you reach a level where you _have to_ break this policy and cast to a non-const pointer, as it is currently

Re: Why is the kfree() argument const?

2008-01-16 Thread Johannes Weiner
Hi, Christoph Lameter [EMAIL PROTECTED] writes: On Wed, 16 Jan 2008, Johannes Weiner wrote: So if I got it right and you actually modify the memory you only got a const pointer to, you reach a level where you _have to_ break this policy and cast to a non-const pointer, as it is currently

42c9c06bec x86: ACPI: use ioremap_early() instead of __va()/__pa()

2008-01-18 Thread Johannes Weiner
Hi Ingo, with the commit 42c9c06bec2f48002d5b6573c8700461120070a9 x86: ACPI: use ioremap_early() instead of __va()/__pa() you made __acpi_map_table(), which is non-__init, call early_ioremap() which is __init on 64bit (init_64.c) but non-__init on 32bit (ioremap_32.c). This

Re: [PATCH] Update emacs indentation instructions.

2008-01-19 Thread Johannes Weiner
Hi, David Brown [EMAIL PROTECTED] writes: +Fortunately, modern versions of GNU emacs support different indentation +styles. If you want to use the Linux kernel style for all C code, place +the following in your .emacs file: + +(setq c-default-style linux) This variable is not defined when

Re: [PATCH 2/6] typesafe: kthread_create and kthread_run

2008-01-20 Thread Johannes Weiner
Hi, Bert Wesarg [EMAIL PROTECTED] writes: On Jan 20, 2008 12:25 PM, Jan Engelhardt [EMAIL PROTECTED] wrote: On Jan 20 2008 20:48, Rusty Russell wrote: + */ +#define kthread_create(threadfn, data, namefmt...) ({ \ + int (*_threadfn)(typeof(data)) = (threadfn);\ +

Re: echo mem /sys/power/state

2008-01-20 Thread Johannes Weiner
Hi, Pavel Machek [EMAIL PROTECTED] writes: diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 29cf145..d830ed2 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -78,7 +78,7 @@ static inline int is_intr(u8 rtc_intr)

Re: [patch 04/23] dentries: Extract common code to remove dentry from lru

2007-11-07 Thread Johannes Weiner
Hi Christoph, On Tue, Nov 06, 2007 at 05:11:34PM -0800, Christoph Lameter wrote: @@ -613,11 +606,7 @@ static void shrink_dcache_for_umount_sub spin_lock(dcache_lock); list_for_each_entry(loop, dentry-d_subdirs,

Re: [patch 07/23] SLUB: Add defrag_ratio field and sysfs support.

2007-11-07 Thread Johannes Weiner
Hi Christoph, On Tue, Nov 06, 2007 at 05:11:37PM -0800, Christoph Lameter wrote: --- linux-2.6.orig/include/linux/slub_def.h 2007-11-06 12:36:28.0 -0800 +++ linux-2.6/include/linux/slub_def.h2007-11-06 12:37:44.0 -0800 @@ -53,6 +53,13 @@ struct kmem_cache {

Re: [patch 12/23] SLUB: Trigger defragmentation from memory reclaim

2007-11-07 Thread Johannes Weiner
Hi Christoph, On Tue, Nov 06, 2007 at 05:11:42PM -0800, Christoph Lameter wrote: Index: linux-2.6/include/linux/slab.h === --- linux-2.6.orig/include/linux/slab.h 2007-11-06 12:37:51.0 -0800 +++

Re: 2.6.24-rc1: OOPS at acpi_battery_update

2007-11-08 Thread Johannes Weiner
Hi, is there any reason, why acpi_battery_get_property() should call acpi_battery_update() at all? Hannes - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: 2.6.24-rc1: OOPS at acpi_battery_update

2007-11-08 Thread Johannes Weiner
Hi, On Thu, Nov 08, 2007 at 07:11:53PM +0300, Alexey Starikovskiy wrote: Rafael J. Wysocki wrote: On Thursday, 8 of November 2007, Johannes Weiner wrote: Hi, is there any reason, why acpi_battery_get_property() should call acpi_battery_update() at all? Alex? If someone wants to read

Re: 2.6.24-rc1: OOPS at acpi_battery_update

2007-11-08 Thread Johannes Weiner
Hi Alex, On Thu, Nov 08, 2007 at 07:35:23PM +0300, Alexey Starikovskiy wrote: Rafael J. Wysocki wrote: On Thursday, 8 of November 2007, Johannes Weiner wrote: Hi, is there any reason, why acpi_battery_get_property() should call acpi_battery_update() at all? Alex? Do you mean why should

Re: [PATCH 6/7] memcg: add per cgroup writeback pages accounting

2012-07-08 Thread Johannes Weiner
On Sun, Jul 08, 2012 at 10:44:59PM +0800, Fengguang Wu wrote: On Tue, Jul 03, 2012 at 03:31:26PM +0900, KAMEZAWA Hiroyuki wrote: (2012/06/28 20:05), Sha Zhengju wrote: From: Sha Zhengju handai@taobao.com Similar to dirty page, we add per cgroup writeback pages accounting. The

Re: [patch 04/11] mm: memcg: push down PageSwapCache check into uncharge entry functions

2012-07-09 Thread Johannes Weiner
On Mon, Jul 09, 2012 at 11:42:12AM +0900, Kamezawa Hiroyuki wrote: (2012/07/05 9:44), Johannes Weiner wrote: @@ -3278,10 +3283,11 @@ void mem_cgroup_end_migration(struct mem_cgroup *memcg, unused = oldpage; } anon = PageAnon(used); - __mem_cgroup_uncharge_common

Re: [PATCH 2/3] shmem: fix negative rss in memcg memory.stat

2012-07-10 Thread Johannes Weiner
, nor while locked. So it's not an error, and these residual pages are easily freed once pressure demands.] Signed-off-by: Hugh Dickins hu...@google.com Cc: Johannes Weiner han...@cmpxchg.org Cc: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Cc: Michal Hocko mho...@suse.cz Acked-by: Johannes

Re: [PATCH 3/3] shmem: cleanup shmem_add_to_page_cache

2012-07-10 Thread Johannes Weiner
Cc: Johannes Weiner han...@cmpxchg.org Cc: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Cc: Michal Hocko mho...@suse.cz Acked-by: Johannes Weiner han...@cmpxchg.org I'm rebasing my (un)charge series on top of these, thanks. It only annihilates 3/11 and leaves the rest alone--line numbers

[patch 1/2] mm: sparse: fix section usemap placement calculation

2012-07-10 Thread Johannes Weiner
width before use. Signed-off-by: Yinghai Lu ying...@kernel.org Signed-off-by: Johannes Weiner han...@cmpxchg.org --- mm/sparse.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/sparse.c b/mm/sparse.c index 6a4bf91..e861397 100644 --- a/mm/sparse.c +++ b/mm/sparse.c

[patch 2/2] mm: sparse: fix usemap allocation above node descriptor section

2012-07-10 Thread Johannes Weiner
-off-by: Johannes Weiner han...@cmpxchg.org Cc: sta...@kernel.org [3.3, 3.4] --- include/linux/bootmem.h |5 + mm/bootmem.c|2 +- mm/nobootmem.c |2 +- mm/sparse.c | 18 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff

Re: mmotm 2012-07-10-16-59 uploaded

2012-07-11 Thread Johannes Weiner
On Tue, Jul 10, 2012 at 05:01:47PM -0700, a...@linux-foundation.org wrote: The mm-of-the-moment snapshot 2012-07-10-16-59 has been uploaded to http://www.ozlabs.org/~akpm/mmotm/ The automatic git import is going again, too, and can be found at

[patch 00/10] mm: memcg: charge/uncharge improvements v2

2012-07-11 Thread Johannes Weiner
Hi, second version of tiny charge/uncharge improvements, with incorporated feedback and acks added (thanks guys). changes: o fixed the 03/10 PageSwapCache check in end_migration(), spotted by Kame o dropped the v1 03/11 shmem patch in favor of Hugh's cleanup o included default group charging

[patch 08/10] mm: memcg: split swapin charge function into private and public part

2012-07-11 Thread Johannes Weiner
around checks that are only required when swapping in anon pages. Signed-off-by: Johannes Weiner han...@cmpxchg.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Michal Hocko mho...@suse.cz --- mm/memcontrol.c | 24 +++- 1 files changed, 15 insertions

[patch 10/10] mm: memcg: only check anon swapin page charges for swap cache

2012-07-11 Thread Johannes Weiner
condition' added a stable PageSwapCache check under the page lock in the do_swap_page() before calling the memory controller, so it's unuse_pte()'s pte_same() that may fail. Signed-off-by: Johannes Weiner han...@cmpxchg.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Michal

[patch 09/10] mm: memcg: only check swap cache pages for repeated charging

2012-07-11 Thread Johannes Weiner
and commit_charge are called under the same page lock section, the PageCgroupUsed() check might as well happen before the counter charging, let alone reclaim. Signed-off-by: Johannes Weiner han...@cmpxchg.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Michal Hocko mho...@suse.cz

[patch 02/10] mm: swapfile: clean up unuse_pte race handling

2012-07-11 Thread Johannes Weiner
-by: Johannes Weiner han...@cmpxchg.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Michal Hocko mho...@suse.cz --- mm/swapfile.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 64408be..75881ca 100644 --- a/mm

[patch 03/10] mm: memcg: push down PageSwapCache check into uncharge entry functions

2012-07-11 Thread Johannes Weiner
Not all uncharge paths need to check if the page is swapcache, some of them can know for sure. Push down the check into all callsites of uncharge_common() so that the patch that removes some of them is more obvious. Signed-off-by: Johannes Weiner han...@cmpxchg.org Acked-by: Michal Hocko mho

[patch 01/10] mm: memcg: fix compaction/migration failing due to memcg limits

2012-07-11 Thread Johannes Weiner
that was going to be replaced. The replacement page will still show up temporarily in the rss/cache statistics, this can be fixed in a later patch as it's less urgent. Reported-by: David Rientjes rient...@google.com Signed-off-by: Johannes Weiner han...@cmpxchg.org Acked-by: KAMEZAWA Hiroyuki

[patch 07/10] mm: memcg: remove needless !mm fixup to init_mm when charging

2012-07-11 Thread Johannes Weiner
. Clarify that the root memcg is charged in this case. Signed-off-by: Johannes Weiner han...@cmpxchg.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Michal Hocko mho...@suse.cz --- mm/memcontrol.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/mm

[patch 06/10] mm: memcg: remove unneeded shmem charge type

2012-07-11 Thread Johannes Weiner
shmem page charges have not needed a separate charge type to tell them from regular file pages since 08e552c 'memcg: synchronized LRU'. Signed-off-by: Johannes Weiner han...@cmpxchg.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Michal Hocko mho...@suse.cz --- mm

[patch 04/10] mm: memcg: only check for PageSwapCache when uncharging anon

2012-07-11 Thread Johannes Weiner
Only anon pages that are uncharged at the time of the last page table mapping vanishing may be in swapcache. When shmem pages, file pages, swap-freed anon pages, or just migrated pages are uncharged, they are known for sure to be not in swapcache. Signed-off-by: Johannes Weiner han

[patch 05/10] mm: memcg: move swapin charge functions above callsites

2012-07-11 Thread Johannes Weiner
Charging cache pages may require swapin in the shmem case. Save the forward declaration and just move the swapin functions above the cache charging functions. Signed-off-by: Johannes Weiner han...@cmpxchg.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Michal Hocko mho

Re: [patch 01/10] mm: memcg: fix compaction/migration failing due to memcg limits

2012-07-12 Thread Johannes Weiner
On Thu, Jul 12, 2012 at 04:54:07PM +0800, Wanpeng Li wrote: On Wed, Jul 11, 2012 at 07:02:13PM +0200, Johannes Weiner wrote: Compaction (and page migration in general) can currently be hindered through pages being owned by memory cgroups that are at their limits and unreclaimable

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