Re: [PATCH v3 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node

2015-07-30 Thread Christoph Lameter
in slub.c that is similar. Doh, somehow I convinced myself that there's #else and alloc_pages() is only used for !CONFIG_NUMA so it doesn't matter. Here's a fixed version. Acked-by: Christoph Lameter c...@linux.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [PATCH v3 2/3] mm: unify checks in alloc_pages_node() and __alloc_pages_node()

2015-07-30 Thread Christoph Lameter
Acked-by: Christoph Lameter c...@linux.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node

2015-07-30 Thread Christoph Lameter
On Thu, 30 Jul 2015, Vlastimil Babka wrote: --- a/mm/slob.c +++ b/mm/slob.c void *page; -#ifdef CONFIG_NUMA - if (node != NUMA_NO_NODE) - page = alloc_pages_exact_node(node, gfp, order); - else -#endif - page = alloc_pages(gfp, order); + page =

Re: [PATCH v3 3/3] mm: use numa_mem_id() in alloc_pages_node()

2015-07-30 Thread Christoph Lameter
On Thu, 30 Jul 2015, Vlastimil Babka wrote: numa_mem_id() is able to handle allocation from CPUs on memory-less nodes, so it's a more robust fallback than the currently used numa_node_id(). Suggested-by: Christoph Lameter c...@linux.com Signed-off-by: Vlastimil Babka vba...@suse.cz Acked

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-23 Thread Christoph Lameter
On Wed, 22 Jul 2015, David Rientjes wrote: Eek, yeah, that does look bad. I'm not even sure the if (nid 0) nid = numa_node_id(); is correct; I think this should be comparing to NUMA_NO_NODE rather than all negative numbers, otherwise we silently ignore overflow and

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Christoph Lameter
On Tue, 21 Jul 2015, Vlastimil Babka wrote: The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be -1.

Re: [PATCH-v3 1/4] idr: Percpu ida

2013-08-21 Thread Christoph Lameter
On Fri, 16 Aug 2013, Nicholas A. Bellinger wrote: + spinlock_t lock; Remove the spinlock. + unsignednr_free; + unsignedfreelist[]; +}; + +static inline void move_tags(unsigned *dst, unsigned *dst_nr, +

Re: [PATCHv2] bitops: add _local bitops

2012-05-10 Thread Christoph Lameter
On Wed, 9 May 2012, Michael S. Tsirkin wrote: kvm needs to update some hypervisor variables atomically in a sense that the operation can't be interrupted in the middle. However the hypervisor always runs on the same CPU so it does not need any memory barrier or lock prefix. Add _local

Re: [PATCH] Code clean up for percpu_xxx() functions

2011-10-19 Thread Christoph Lameter
On Wed, 19 Oct 2011, Alex,Shi wrote: Thanks for comments! I initialized the patch as following accordingly, And cc to more maintainers for review. I checked all code except xen/kvm part, totally a idiot for them. Acked-by: Christoph Lameter c...@gentwo.org -- To unsubscribe from this list

Re: [PATCH 0/3] Unmapped page cache control (v5)

2011-04-03 Thread Christoph Lameter
On Sat, 2 Apr 2011, Dave Chinner wrote: Fundamentally, if you just switch off memory reclaim to avoid the latencies involved with direct memory reclaim, then all you'll get instead is ENOMEM because there's no memory available and none will be reclaimed. That's even more fatal for the system

Re: [PATCH 0/3] Unmapped page cache control (v5)

2011-04-03 Thread Christoph Lameter
On Sun, 3 Apr 2011, KOSAKI Motohiro wrote: 1) Some bios don't have such knob. btw, OK, yes, *I* can switch NUMA off completely because I don't have such bios. 2) bios level turning off makes some side effects, example, scheduler load balancing don't care numa anymore. Well then lets add a

Re: [PATCH 0/3] Unmapped page cache control (v5)

2011-04-01 Thread Christoph Lameter
On Fri, 1 Apr 2011, KOSAKI Motohiro wrote: On Thu, 31 Mar 2011, KOSAKI Motohiro wrote: 1) zone reclaim doesn't work if the system has multiple node and the workload is file cache oriented (eg file server, web server, mail server, et al). because zone recliam make some much

Re: [PATCH 0/3] Unmapped page cache control (v5)

2011-03-31 Thread Christoph Lameter
On Thu, 31 Mar 2011, KOSAKI Motohiro wrote: 1) zone reclaim doesn't work if the system has multiple node and the workload is file cache oriented (eg file server, web server, mail server, et al). because zone recliam make some much free pages than zone-pages_min and then new page

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread Christoph Lameter
On Fri, 28 Jan 2011, KAMEZAWA Hiroyuki wrote: I see it as a tradeoff of when to check? add_to_page_cache or when we are want more free memory (due to allocation). It is OK to wakeup kswapd while allocating memory, somehow for this purpose (global page cache), add_to_page_cache or

Re: [PATCH 1/3] Move zone_reclaim() outside of CONFIG_NUMA (v4)

2011-01-26 Thread Christoph Lameter
Reviewed-by: Christoph Lameter c...@linux.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [REPOST] [PATCH 3/3] Provide control over unmapped pages (v3)

2011-01-21 Thread Christoph Lameter
On Fri, 21 Jan 2011, Balbir Singh wrote: * Christoph Lameter c...@linux.com [2011-01-20 09:00:09]: On Thu, 20 Jan 2011, Balbir Singh wrote: + unmapped_page_control + [KNL] Available if CONFIG_UNMAPPED_PAGECACHE_CONTROL + is enabled. It controls

Re: [REPOST] [PATCH 1/3] Move zone_reclaim() outside of CONFIG_NUMA (v3)

2011-01-20 Thread Christoph Lameter
On Thu, 20 Jan 2011, Balbir Singh wrote: --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -253,11 +253,11 @@ extern int vm_swappiness; extern int remove_mapping(struct address_space *mapping, struct page *page); extern long vm_total_pages; +extern int sysctl_min_unmapped_ratio;

Re: [REPOST] [PATCH 2/3] Refactor zone_reclaim code (v3)

2011-01-20 Thread Christoph Lameter
Reviewed-by: Christoph Lameter c...@linux.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [REPOST] [PATCH 3/3] Provide control over unmapped pages (v3)

2011-01-20 Thread Christoph Lameter
On Thu, 20 Jan 2011, Balbir Singh wrote: + unmapped_page_control + [KNL] Available if CONFIG_UNMAPPED_PAGECACHE_CONTROL + is enabled. It controls the amount of unmapped memory + that is present in the system. This boot option

Re: BUG: sleeping function called from invalid context at mm/slub.c:793

2011-01-11 Thread Christoph Lameter
Reviewed-by: Christoph Lameter c...@linux.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: BUG: sleeping function called from invalid context at mm/slub.c:793

2011-01-10 Thread Christoph Lameter
On Mon, 10 Jan 2011, Kirill A. Shutemov wrote: Every time I run qemu with KVM enabled I get this in dmesg: [ 182.878328] BUG: sleeping function called from invalid context at mm/slub.c:793 [ 182.878339] in_atomic(): 1, irqs_disabled(): 0, pid: 4992, name: qemu [ 182.878355] Pid: 4992,

Re: [PATCH 3/3] Provide control over unmapped pages

2010-12-01 Thread Christoph Lameter
reclaim ratio. But yes it should be justified and defined. Reviewed-by: Christoph Lameter c...@linux.com So you're OK with shoving all this flotsam into 100,000,000 cellphones? This was a pretty outrageous patchset! This is a feature that has been requested over and over for years. Using

Re: [PATCH 1/3] Move zone_reclaim() outside of CONFIG_NUMA

2010-11-30 Thread Christoph Lameter
Reviewed-by: Christoph Lameter c...@linux.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/3] Refactor zone_reclaim

2010-11-30 Thread Christoph Lameter
Reviewed-by: Christoph Lameter c...@linux.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC][PATCH 1/3] Linux/Guest unmapped page cache control

2010-11-03 Thread Christoph Lameter
On Fri, 29 Oct 2010, Balbir Singh wrote: A lot of the code is borrowed from zone_reclaim_mode logic for __zone_reclaim(). One might argue that the with ballooning and KSM this feature is not very useful, but even with ballooning, Interesting use of zone reclaim. I am having a difficult time

Re: [RFC][PATCH 1/3] Linux/Guest unmapped page cache control

2010-11-03 Thread Christoph Lameter
On Wed, 3 Nov 2010, Balbir Singh wrote: +#define UNMAPPED_PAGE_RATIO 16 Maybe come up with a scheme that allows better configuration of the mininum? I think in some setting we may want an absolute limit and in other a fraction of something (total zone size or working set?) Are you

Re: [PATCH 1/2] Add vzalloc shortcut

2010-10-18 Thread Christoph Lameter
On Sat, 16 Oct 2010, Dave Young wrote: Add vzalloc for convinience of vmalloc-then-memset-zero case Reviewed-by: Christoph Lameter c...@linux.com Wish we would also have vzalloc_node() but I guess that can wait. -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [PATCH v5 03/12] Add async PF initialization to PV guest.

2010-08-23 Thread Christoph Lameter
On Mon, 23 Aug 2010, Gleb Natapov wrote: The guest will have to align this on a 64 byte boundary, should this be marked __aligned(64) here? I do __aligned(64) when I declare variable of that type: static DEFINE_PER_CPU(struct kvm_vcpu_pv_apf_data, apf_reason) __aligned(64); 64 byte

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-30 Thread Christoph Lameter
Ok so there is some variance in tests as usual due to cacheline placement. But it seems that overall we are looking at a 1-2% regression. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-24 Thread Christoph Lameter
On Tue, 24 Nov 2009, Gleb Natapov wrote: On Mon, Nov 23, 2009 at 11:30:02AM -0600, Christoph Lameter wrote: This adds significant overhead for the !PREEMPT case adding lots of code in critical paths all over the place. I want to measure it. Can you suggest benchmarks to try? AIM9 (reaim9

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-23 Thread Christoph Lameter
This adds significant overhead for the !PREEMPT case adding lots of code in critical paths all over the place. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-12 Thread Christoph Lameter
On Wed, 12 Nov 2008, Andrea Arcangeli wrote: On Tue, Nov 11, 2008 at 09:10:45PM -0600, Christoph Lameter wrote: get_user_pages() cannot get to it since the pagetables have already been modified. If get_user_pages runs then the fault handling will occur which will block the thread until

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-12 Thread Christoph Lameter
On Wed, 12 Nov 2008, Lee Schermerhorn wrote: Might want/need to check for migration entry in do_swap_page() and loop back to migration_entry_wait() call when the changed pte is detected rather than returning an error to the caller. Does that sound reasonable? The reference count freezing

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Tue, 11 Nov 2008, Izik Eidus wrote: yes but it replace it with kernel allocated page. page migration already kinda does that. Is there common ground? page migration as far as i saw cant migrate anonymous page into kernel page. if you want we can change page_migration to do that, but

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Tue, 11 Nov 2008, Andrea Arcangeli wrote: btw, page_migration likely is buggy w.r.t. o_direct too (and now unfixable with gup_fast until the 2.4 brlock is added around it or similar) if it does the same thing but without any page_mapcount vs page_count check. Details please?

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Tue, 11 Nov 2008, Izik Eidus wrote: What do you mean by kernel page? The kernel can allocate a page and then point a user space pte to it. That is how page migration works. i mean filebacked page (!AnonPage()) ok. ksm need the pte inside the vma to point from anonymous page into

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Tue, 11 Nov 2008, Avi Kivity wrote: Christoph Lameter wrote: page migration requires the page to be on the LRU. That could be changed if you have a different means of isolating a page from its page tables. Isn't rmap the means of isolating a page from its page tables? I guess I'm

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Wed, 12 Nov 2008, Andrea Arcangeli wrote: O_DIRECT does not take a refcount on the page in order to prevent this? It definitely does, it's also the only thing it does. Then page migration will not occur because there is an unresolved reference. The whole point is that O_DIRECT can start

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Wed, 12 Nov 2008, Andrea Arcangeli wrote: So are you checking if there's an unresolved reference only in the very place I just quoted in the previous email? If answer is yes: what should prevent get_user_pages from running in parallel from another thread? get_user_pages will trigger a