Re: [PATCH v3 1/6] mm/migrate: add comment about permanent failure path

2013-12-16 Thread Rafael Aquini
++; break; } Acked-by: Rafael Aquini aqu...@redhat.com -- 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

Re: [PATCH v2 3/7] mm/mempolicy: correct putback method for isolate pages if failed

2013-12-09 Thread Rafael Aquini
ind(unsigned long start, unsigned long > len, > if (nr_failed && (flags & MPOL_MF_STRICT)) > err = -EIO; > } else > - putback_lru_pages(); > + putback_movable_pages(); > > up_write(>mmap_sem);

Re: [PATCH v2 3/7] mm/mempolicy: correct putback method for isolate pages if failed

2013-12-09 Thread Rafael Aquini
-by: Rafael Aquini aqu...@redhat.com -- 1.7.9.5 -- 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: [QUESTION] balloon page isolation needs LRU lock?

2013-12-06 Thread Rafael Aquini
On Fri, Dec 06, 2013 at 05:53:31PM +0900, Joonsoo Kim wrote: > Hello, Rafael. > > I looked at some compaction code and found that some oddity about > balloon compaction. In isolate_migratepages_range(), if we meet > !PageLRU(), we check whether this page is for balloon compaction. > In this case,

Re: [QUESTION] balloon page isolation needs LRU lock?

2013-12-06 Thread Rafael Aquini
On Fri, Dec 06, 2013 at 05:53:31PM +0900, Joonsoo Kim wrote: Hello, Rafael. I looked at some compaction code and found that some oddity about balloon compaction. In isolate_migratepages_range(), if we meet !PageLRU(), we check whether this page is for balloon compaction. In this case, code

Re: [PATCH] mm: hugetlb: initialize PG_reserved for tail pages of gigantig compound pages

2013-10-10 Thread Rafael Aquini
cts the gigantic compound page initialization so that > we can retain the optimization in > 11feeb498086a3a5907b8148bdf1786a9b18fc55. The cacheline was already > modified in order to set PG_tail so this won't affect the boot time of > large memory systems. > > Reported-by: andy123

Re: [PATCH] mm: hugetlb: initialize PG_reserved for tail pages of gigantig compound pages

2013-10-10 Thread Rafael Aquini
-by: Rafael Aquini aqu...@redhat.com mm/hugetlb.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index b49579c..315450e 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -695,8 +695,24 @@ static void prep_compound_gigantic_page

Re: [PATCH v8 5/9] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2013-10-08 Thread Rafael Aquini
On Tue, Oct 08, 2013 at 01:34:55PM -0700, Tim Chen wrote: > On Tue, 2013-10-08 at 16:51 -0300, Rafael Aquini wrote: > > On Wed, Oct 02, 2013 at 03:38:32PM -0700, Tim Chen wrote: > > > We will need the MCS lock code for doing optimistic spinning for rwsem. > > > Extractin

Re: [PATCH v8 5/9] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2013-10-08 Thread Rafael Aquini
On Wed, Oct 02, 2013 at 03:38:32PM -0700, Tim Chen wrote: > We will need the MCS lock code for doing optimistic spinning for rwsem. > Extracting the MCS code from mutex.c and put into its own file allow us > to reuse this code easily for rwsem. > > Reviewed-by: Ingo Molnar > Reviewed-by: Peter

Re: [PATCH v8 5/9] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2013-10-08 Thread Rafael Aquini
On Wed, Oct 02, 2013 at 03:38:32PM -0700, Tim Chen wrote: We will need the MCS lock code for doing optimistic spinning for rwsem. Extracting the MCS code from mutex.c and put into its own file allow us to reuse this code easily for rwsem. Reviewed-by: Ingo Molnar mi...@elte.hu Reviewed-by:

Re: [PATCH v8 5/9] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2013-10-08 Thread Rafael Aquini
On Tue, Oct 08, 2013 at 01:34:55PM -0700, Tim Chen wrote: On Tue, 2013-10-08 at 16:51 -0300, Rafael Aquini wrote: On Wed, Oct 02, 2013 at 03:38:32PM -0700, Tim Chen wrote: We will need the MCS lock code for doing optimistic spinning for rwsem. Extracting the MCS code from mutex.c and put

[PATCH] mm: avoid reinserting isolated balloon pages into LRU lists

2013-09-25 Thread Rafael Aquini
Signed-off-by: Rafael Aquini --- include/linux/balloon_compaction.h | 25 + mm/migrate.c | 2 +- mm/vmscan.c| 4 +++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/include/linux/balloon_compaction.h b/inc

[PATCH] mm: avoid reinserting isolated balloon pages into LRU lists

2013-09-25 Thread Rafael Aquini
...@redhat.com Signed-off-by: Rafael Aquini aqu...@redhat.com --- include/linux/balloon_compaction.h | 25 + mm/migrate.c | 2 +- mm/vmscan.c| 4 +++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/include/linux

Re: [PATCH v2] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-06 Thread Rafael Aquini
uest. > > I didn't get this in practice, I found it by code review. On the other > hand, such an invalid virtio request will cause errors in QEMU and > fill_balloon() also performs the same check implemented by this commit. > > Signed-off-by: Luiz Capitulino > Acked-b

Re: [PATCH v2] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-06 Thread Rafael Aquini
this in practice, I found it by code review. On the other hand, such an invalid virtio request will cause errors in QEMU and fill_balloon() also performs the same check implemented by this commit. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Acked-by: Rafael Aquini aqu...@redhat.com

Re: [PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Rafael Aquini
On Wed, Jun 05, 2013 at 07:08:44PM -0400, Luiz Capitulino wrote: > On Wed, 5 Jun 2013 18:24:49 -0300 > Rafael Aquini wrote: > > > On Wed, Jun 05, 2013 at 05:10:31PM -0400, Luiz Capitulino wrote: > > > The balloon_page_dequeue() function can return NULL. If it does for &g

Re: [PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Rafael Aquini
s sane and replicates the check done at fill_balloon(). I think we also could use this P.S. as a commentary to let others aware of this scenario. Thanks Luiz! Acked-by: Rafael Aquini > PPS: Very lightly tested > > drivers/virtio/virtio_balloon.c | 3 ++- > 1 file changed, 2 insert

Re: [PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Rafael Aquini
the check done at fill_balloon(). I think we also could use this P.S. as a commentary to let others aware of this scenario. Thanks Luiz! Acked-by: Rafael Aquini aqu...@redhat.com PPS: Very lightly tested drivers/virtio/virtio_balloon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

Re: [PATCH] virtio_balloon: leak_balloon(): only tell host if we got pages deflated

2013-06-05 Thread Rafael Aquini
On Wed, Jun 05, 2013 at 07:08:44PM -0400, Luiz Capitulino wrote: On Wed, 5 Jun 2013 18:24:49 -0300 Rafael Aquini aqu...@redhat.com wrote: On Wed, Jun 05, 2013 at 05:10:31PM -0400, Luiz Capitulino wrote: The balloon_page_dequeue() function can return NULL. If it does for the first page

[PATCH v2] swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O completion

2013-05-30 Thread Rafael Aquini
read_swap_cache_async() is busy looping and !CONFIG_PREEMPT. This patch introduces a cond_resched() call to make the aforementioned read_swap_cache_async() busy loop condition to bail out when necessary, thus avoiding the subtle race window. Signed-off-by: Rafael Aquini Acked-by: Johannes Weiner Acked

Re: [PATCH] swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O compeletion

2013-05-30 Thread Rafael Aquini
On Thu, May 30, 2013 at 03:55:39PM -0400, Johannes Weiner wrote: > On Thu, May 30, 2013 at 03:05:00PM -0300, Rafael Aquini wrote: > > read_swap_cache_async() can race against get_swap_page(), and stumble across > > a SWAP_HAS_CACHE entry in the swap map whose page

[PATCH] swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O compeletion

2013-05-30 Thread Rafael Aquini
read_swap_cache_async() is busy looping and !CONFIG_PREEMPT. This patch introduces a cond_resched() call to make the aforementioned read_swap_cache_async() busy loop condition to bail out when necessary, thus avoiding the subtle race window. Signed-off-by: Rafael Aquini --- mm/swap_state.c | 14

[PATCH] swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O compeletion

2013-05-30 Thread Rafael Aquini
read_swap_cache_async() is busy looping and !CONFIG_PREEMPT. This patch introduces a cond_resched() call to make the aforementioned read_swap_cache_async() busy loop condition to bail out when necessary, thus avoiding the subtle race window. Signed-off-by: Rafael Aquini aqu...@redhat.com --- mm/swap_state.c

Re: [PATCH] swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O compeletion

2013-05-30 Thread Rafael Aquini
On Thu, May 30, 2013 at 03:55:39PM -0400, Johannes Weiner wrote: On Thu, May 30, 2013 at 03:05:00PM -0300, Rafael Aquini wrote: read_swap_cache_async() can race against get_swap_page(), and stumble across a SWAP_HAS_CACHE entry in the swap map whose page wasn't brought into the swapcache

[PATCH v2] swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O completion

2013-05-30 Thread Rafael Aquini
read_swap_cache_async() is busy looping and !CONFIG_PREEMPT. This patch introduces a cond_resched() call to make the aforementioned read_swap_cache_async() busy loop condition to bail out when necessary, thus avoiding the subtle race window. Signed-off-by: Rafael Aquini aqu...@redhat.com Acked-by: Johannes

Re: [Patch v2] skbuff: Hide GFP_ATOMIC page allocation failures for dropped packets

2013-05-28 Thread Rafael Aquini
On Tue, May 28, 2013 at 09:29:37AM -0700, Eric Dumazet wrote: > On Tue, 2013-05-28 at 13:15 -0300, Rafael Aquini wrote: > > > The real problem seems to be that more and more the network stack (drivers, > > perhaps) > > is relying on chunks of contiguous page-blocks with

Re: [Patch v2] skbuff: Hide GFP_ATOMIC page allocation failures for dropped packets

2013-05-28 Thread Rafael Aquini
On Tue, May 28, 2013 at 09:00:45AM -0700, Ben Greear wrote: > On 05/27/2013 03:41 PM, Francois Romieu wrote: > >atom...@redhat.com : > >[...] > >>Failed GFP_ATOMIC allocations by the network stack result in dropped > >>packets, which will be received on a subsequent retransmit, and an >

Re: [Patch v2] skbuff: Hide GFP_ATOMIC page allocation failures for dropped packets

2013-05-28 Thread Rafael Aquini
On Tue, May 28, 2013 at 09:00:45AM -0700, Ben Greear wrote: On 05/27/2013 03:41 PM, Francois Romieu wrote: atom...@redhat.com atom...@redhat.com : [...] Failed GFP_ATOMIC allocations by the network stack result in dropped packets, which will be received on a subsequent retransmit, and an

Re: [Patch v2] skbuff: Hide GFP_ATOMIC page allocation failures for dropped packets

2013-05-28 Thread Rafael Aquini
On Tue, May 28, 2013 at 09:29:37AM -0700, Eric Dumazet wrote: On Tue, 2013-05-28 at 13:15 -0300, Rafael Aquini wrote: The real problem seems to be that more and more the network stack (drivers, perhaps) is relying on chunks of contiguous page-blocks without a fallback mechanism

Re: [Patch v2] skbuff: Hide GFP_ATOMIC page allocation failures for dropped packets

2013-05-27 Thread Rafael Aquini
ktraces, and let retransmits handle > dropped packets quietly. > > Signed-off-by: Aaron Tomlin > --- Acked-by: Rafael Aquini > net/core/skbuff.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c >

Re: [Patch v2] skbuff: Hide GFP_ATOMIC page allocation failures for dropped packets

2013-05-27 Thread Rafael Aquini
dropped packets quietly. Signed-off-by: Aaron Tomlin atom...@redhat.com --- Acked-by: Rafael Aquini aqu...@redhat.com net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index af9185d..84aa870 100644 --- a/net/core

Re: [PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_PAGES

2013-05-26 Thread Rafael Aquini
On Sun, May 26, 2013 at 10:55:32AM -0400, KOSAKI Motohiro wrote: > On Sun, May 26, 2013 at 9:52 AM, Rafael Aquini wrote: > > On Sun, May 26, 2013 at 07:44:56AM -0400, KOSAKI Motohiro wrote: > >> > + /* > >> > +* By fl

Re: [PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_PAGES

2013-05-26 Thread Rafael Aquini
On Sun, May 26, 2013 at 07:44:56AM -0400, KOSAKI Motohiro wrote: > > + /* > > +* By flagging sys_swapon, a sysadmin can tell us to > > +* either do sinle-time area discards only, or to > > just > > +*

Re: [PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_PAGES

2013-05-26 Thread Rafael Aquini
On Sun, May 26, 2013 at 07:44:56AM -0400, KOSAKI Motohiro wrote: + /* +* By flagging sys_swapon, a sysadmin can tell us to +* either do sinle-time area discards only, or to just +* perform

Re: [PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_PAGES

2013-05-26 Thread Rafael Aquini
On Sun, May 26, 2013 at 10:55:32AM -0400, KOSAKI Motohiro wrote: On Sun, May 26, 2013 at 9:52 AM, Rafael Aquini aqu...@redhat.com wrote: On Sun, May 26, 2013 at 07:44:56AM -0400, KOSAKI Motohiro wrote: + /* +* By flagging sys_swapon

[PATCH 02/02] swapon: allow a more flexible swap discard policy

2013-05-25 Thread Rafael Aquini
fore they are reused. If no policy is selected both discard types are enabled. (default) Signed-off-by: Rafael Aquini --- sys-utils/swapon.8 | 24 +-- sys-utils/swapon.c | 70 ++ 2 files changed, 77 insertions(+), 17 deletions(-) diff --gi

[PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_PAGES

2013-05-25 Thread Rafael Aquini
. Signed-off-by: Rafael Aquini --- include/linux/swap.h | 13 + mm/swapfile.c| 55 +++- 2 files changed, 59 insertions(+), 9 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 1701ce4..33fa21f 100644

[PATCH 00/02] swap: allowing a more flexible DISCARD policy V2

2013-05-25 Thread Rafael Aquini
Considering the use cases where the swap device supports discard: a) and can do it quickly; b) but it's slow to do in small granularities (or concurrent with other I/O); c) but the implementation is so horrendous that you don't even want to send one down; And assuming that the sysadmin

[PATCH 00/02] swap: allowing a more flexible DISCARD policy V2

2013-05-25 Thread Rafael Aquini
Considering the use cases where the swap device supports discard: a) and can do it quickly; b) but it's slow to do in small granularities (or concurrent with other I/O); c) but the implementation is so horrendous that you don't even want to send one down; And assuming that the sysadmin

[PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_PAGES

2013-05-25 Thread Rafael Aquini
. Signed-off-by: Rafael Aquini aqu...@redhat.com --- include/linux/swap.h | 13 + mm/swapfile.c| 55 +++- 2 files changed, 59 insertions(+), 9 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 1701ce4

[PATCH 02/02] swapon: allow a more flexible swap discard policy

2013-05-25 Thread Rafael Aquini
is selected both discard types are enabled. (default) Signed-off-by: Rafael Aquini aqu...@redhat.com --- sys-utils/swapon.8 | 24 +-- sys-utils/swapon.c | 70 ++ 2 files changed, 77 insertions(+), 17 deletions(-) diff --git a/sys

Re: [RFC PATCH 02/02] swapon: add "cluster-discard" support

2013-05-21 Thread Rafael Aquini
Karel, Motohiro, Thanks a lot for your time reviewing this patch and providing me with valuable feedback. On Tue, May 21, 2013 at 04:17:04PM -0400, KOSAKI Motohiro wrote: > (5/21/13 6:26 AM), Karel Zak wrote: > > On Mon, May 20, 2013 at 09:02:43PM -0400, KOSAKI Motohiro wrote: > >>> - if

Re: [RFC PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_CLUSTER

2013-05-21 Thread Rafael Aquini
Howdy Kosaki-san, Thanks for your time over this one :) On Mon, May 20, 2013 at 08:55:33PM -0400, KOSAKI Motohiro wrote: > (5/20/13 8:04 PM), Rafael Aquini wrote: > > Intruduce a new flag to make page-cluster fine-grained discards while > > swapping > > conditional, as t

Re: [RFC PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_CLUSTER

2013-05-21 Thread Rafael Aquini
Howdy Kosaki-san, Thanks for your time over this one :) On Mon, May 20, 2013 at 08:55:33PM -0400, KOSAKI Motohiro wrote: (5/20/13 8:04 PM), Rafael Aquini wrote: Intruduce a new flag to make page-cluster fine-grained discards while swapping conditional, as they can be considered

Re: [RFC PATCH 02/02] swapon: add cluster-discard support

2013-05-21 Thread Rafael Aquini
Karel, Motohiro, Thanks a lot for your time reviewing this patch and providing me with valuable feedback. On Tue, May 21, 2013 at 04:17:04PM -0400, KOSAKI Motohiro wrote: (5/21/13 6:26 AM), Karel Zak wrote: On Mon, May 20, 2013 at 09:02:43PM -0400, KOSAKI Motohiro wrote: - if (fl_discard)

[RFC PATCH 02/02] swapon: add "cluster-discard" support

2013-05-20 Thread Rafael Aquini
will only be used to flag sys_swapon() batched discards will be issued at swapon(8) time. Signed-off-by: Rafael Aquini --- sys-utils/swapon.8 | 19 --- sys-utils/swapon.c | 34 ++ 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/sys

[RFC PATCH 00/02] swap: allowing a more flexible DISCARD policy

2013-05-20 Thread Rafael Aquini
Howdy folks, While working on a backport for the following changes: 3399446 swap: discard while swapping only if SWAP_FLAG_DISCARD 052b198 swap: don't do discard if no discard option added We found ourselves around an interesting discussion on how limiting the behavior with regard to

[RFC PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_CLUSTER

2013-05-20 Thread Rafael Aquini
Intruduce a new flag to make page-cluster fine-grained discards while swapping conditional, as they can be considered detrimental to some setups. However, keep allowing batched discards at sys_swapon() time, when enabled by the system administrator. Signed-off-by: Rafael Aquini --- include

[RFC PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_CLUSTER

2013-05-20 Thread Rafael Aquini
Intruduce a new flag to make page-cluster fine-grained discards while swapping conditional, as they can be considered detrimental to some setups. However, keep allowing batched discards at sys_swapon() time, when enabled by the system administrator. Signed-off-by: Rafael Aquini aqu...@redhat.com

[RFC PATCH 00/02] swap: allowing a more flexible DISCARD policy

2013-05-20 Thread Rafael Aquini
Howdy folks, While working on a backport for the following changes: 3399446 swap: discard while swapping only if SWAP_FLAG_DISCARD 052b198 swap: don't do discard if no discard option added We found ourselves around an interesting discussion on how limiting the behavior with regard to

[RFC PATCH 02/02] swapon: add cluster-discard support

2013-05-20 Thread Rafael Aquini
will only be used to flag sys_swapon() batched discards will be issued at swapon(8) time. Signed-off-by: Rafael Aquini aqu...@redhat.com --- sys-utils/swapon.8 | 19 --- sys-utils/swapon.c | 34 ++ 2 files changed, 42 insertions(+), 11 deletions

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Rafael Aquini
On Fri, May 10, 2013 at 09:20:46AM -0400, Luiz Capitulino wrote: > On Thu, 9 May 2013 18:15:19 -0300 > Rafael Aquini wrote: > > > Since your shrinker > > doesn't change the balloon target size, > > Which target size are you referring to? The one in the host (member n

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-13 Thread Rafael Aquini
On Fri, May 10, 2013 at 09:20:46AM -0400, Luiz Capitulino wrote: On Thu, 9 May 2013 18:15:19 -0300 Rafael Aquini aqu...@redhat.com wrote: Since your shrinker doesn't change the balloon target size, Which target size are you referring to? The one in the host (member num_pages

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-09 Thread Rafael Aquini
On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: > Automatic ballooning consists of dynamically adjusting the guest's > balloon according to memory pressure in the host and in the guest. > > This commit implements the guest side of automatic balloning, which > basically consists

Re: [RFC 1/2] virtio_balloon: move balloon_lock mutex to callers

2013-05-09 Thread Rafael Aquini
On Thu, May 09, 2013 at 10:53:48AM -0400, Luiz Capitulino wrote: > This commit moves the balloon_lock mutex out of the fill_balloon() > and leak_balloon() functions to their callers. > > The reason for this change is that the next commit will introduce > a shrinker callback for the balloon

Re: [RFC 1/2] virtio_balloon: move balloon_lock mutex to callers

2013-05-09 Thread Rafael Aquini
On Thu, May 09, 2013 at 10:53:48AM -0400, Luiz Capitulino wrote: This commit moves the balloon_lock mutex out of the fill_balloon() and leak_balloon() functions to their callers. The reason for this change is that the next commit will introduce a shrinker callback for the balloon driver,

Re: [RFC 2/2] virtio_balloon: auto-ballooning support

2013-05-09 Thread Rafael Aquini
On Thu, May 09, 2013 at 10:53:49AM -0400, Luiz Capitulino wrote: Automatic ballooning consists of dynamically adjusting the guest's balloon according to memory pressure in the host and in the guest. This commit implements the guest side of automatic balloning, which basically consists of

Re: [Patch v2] mm: slab: Verify the nodeid passed to ____cache_alloc_node

2013-04-23 Thread Rafael Aquini
purpose of this patch is to assert > if this condition is true to aid debugging efforts rather > than some random NULL pointer dereference or page fault. > > Signed-off-by: Aaron Tomlin > Reviewed-by: Rik van Riel > Acked-by: Rafael Aquini > > slab.c |1 + >

Re: [Patch v2] mm: slab: Verify the nodeid passed to ____cache_alloc_node

2013-04-23 Thread Rafael Aquini
debugging efforts rather than some random NULL pointer dereference or page fault. Signed-off-by: Aaron Tomlin atom...@redhat.com Reviewed-by: Rik van Riel r...@redhat.com Acked-by: Rafael Aquini aqu...@redhat.com slab.c |1 + 1 file changed, 1 insertion(+) diff --git a/mm/slab.c

Re: [PATCH 4/5] x86,smp: keep spinlock delay values per hashed spinlock address

2013-01-09 Thread Rafael Aquini
the lock was released. > > We might try to use a hash on lock address, and an array of 16 different > delays so that different spinlocks have a chance of not sharing the same > delay. > > With following patch, I get 982 Mbits/s with same bench, so an increase > of 45 % inst

Re: [PATCH 3/5] x86,smp: auto tune spinlock backoff delay factor

2013-01-09 Thread Rafael Aquini
ts contention on a lock. Likewise, a smaller > delay factor works well when a lock is lightly contended. > > Making the code auto-tune the delay factor results in a system > that performs well with both light and heavy lock contention. > > Signed-off-by: Rik van Riel > --- > v3

Re: [PATCH 2/5] x86,smp: proportional backoff for ticket spinlocks

2013-01-09 Thread Rafael Aquini
0 is likely to be wrong for many setups, and > this patch is mostly to illustrate the concept of proportional > backup. The next patch automatically tunes the delay value. > > Signed-off-by: Rik van Riel > Signed-off-by: Michel Lespinasse > --- Acked-by: Rafael Aquini > arc

Re: [PATCH 0/5] x86,smp: make ticket spinlock proportional backoff w/ auto tuning

2013-01-09 Thread Rafael Aquini
On Wed, Jan 09, 2013 at 06:20:35PM +0530, Raghavendra K T wrote: > I ran kernbench on 32 core (mx3850) machine with 3.8-rc2 base. > x base_3.8rc2 > + rik_backoff > N Min MaxMedian AvgStddev > x 8 222.977231.16 227.735

Re: [PATCH 0/5] x86,smp: make ticket spinlock proportional backoff w/ auto tuning

2013-01-09 Thread Rafael Aquini
On Wed, Jan 09, 2013 at 06:20:35PM +0530, Raghavendra K T wrote: I ran kernbench on 32 core (mx3850) machine with 3.8-rc2 base. x base_3.8rc2 + rik_backoff N Min MaxMedian AvgStddev x 8 222.977231.16 227.735 227.388

Re: [PATCH 2/5] x86,smp: proportional backoff for ticket spinlocks

2013-01-09 Thread Rafael Aquini
is mostly to illustrate the concept of proportional backup. The next patch automatically tunes the delay value. Signed-off-by: Rik van Riel r...@redhat.com Signed-off-by: Michel Lespinasse wal...@google.com --- Acked-by: Rafael Aquini aqu...@redhat.com arch/x86/kernel/smp.c | 23

Re: [PATCH 3/5] x86,smp: auto tune spinlock backoff delay factor

2013-01-09 Thread Rafael Aquini
factor results in a system that performs well with both light and heavy lock contention. Signed-off-by: Rik van Riel r...@redhat.com --- v3: use fixed-point math for the delay calculations, suggested by Michel Lespinasse Acked-by: Rafael Aquini aqu...@redhat.com arch/x86/kernel/smp.c

Re: [PATCH 4/5] x86,smp: keep spinlock delay values per hashed spinlock address

2013-01-09 Thread Rafael Aquini
-by: Rafael Aquini aqu...@redhat.com arch/x86/kernel/smp.c | 22 +++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 05f828b..1877890 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c @@ -23,6

Re: [RFC PATCH 3/3] x86,smp: auto tune spinlock backoff delay factor

2012-12-23 Thread Rafael Aquini
On Fri, Dec 21, 2012 at 10:58:48PM -0500, Rik van Riel wrote: > On 12/21/2012 10:49 PM, Steven Rostedt wrote: > >On Fri, Dec 21, 2012 at 09:51:35PM -0500, Rik van Riel wrote: > > >>However, since spinlock contention should not be the > >>usual state, and all a scalable lock does is make sure >

Re: [RFC PATCH 2/3] x86,smp: proportional backoff for ticket spinlocks

2012-12-23 Thread Rafael Aquini
cases of a data structure with > embedded spinlock, the lock holder has a better chance of > making progress. > > Signed-off-by: Rik van Riel > --- Reviewed-by: Rafael Aquini > arch/x86/kernel/smp.c |6 -- > 1 files changed, 4 insertions(+), 2 deletions(-) >

Re: [RFC PATCH 1/3] x86,smp: move waiting on contended lock out of line

2012-12-23 Thread Rafael Aquini
gt; kernel text appreciably. > > Signed-off-by: Rik van Riel > --- Reviewed-by: Rafael Aquini > arch/x86/include/asm/spinlock.h | 13 +++-- > arch/x86/kernel/smp.c | 14 ++ > 2 files changed, 21 insertions(+), 6 deletions(-) > > diff --git a

Re: [RFC PATCH 1/3] x86,smp: move waiting on contended lock out of line

2012-12-23 Thread Rafael Aquini
. Signed-off-by: Rik van Riel r...@redhat.com --- Reviewed-by: Rafael Aquini aqu...@redhat.com arch/x86/include/asm/spinlock.h | 13 +++-- arch/x86/kernel/smp.c | 14 ++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm

Re: [RFC PATCH 2/3] x86,smp: proportional backoff for ticket spinlocks

2012-12-23 Thread Rafael Aquini
structure with embedded spinlock, the lock holder has a better chance of making progress. Signed-off-by: Rik van Riel r...@redhat.com --- Reviewed-by: Rafael Aquini aqu...@redhat.com arch/x86/kernel/smp.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86

Re: [RFC PATCH 3/3] x86,smp: auto tune spinlock backoff delay factor

2012-12-23 Thread Rafael Aquini
On Fri, Dec 21, 2012 at 10:58:48PM -0500, Rik van Riel wrote: On 12/21/2012 10:49 PM, Steven Rostedt wrote: On Fri, Dec 21, 2012 at 09:51:35PM -0500, Rik van Riel wrote: However, since spinlock contention should not be the usual state, and all a scalable lock does is make sure that N+1 CPUs

Re: [RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-19 Thread Rafael Aquini
On Tue, Dec 18, 2012 at 06:17:29PM -0200, Luiz Capitulino wrote: > Today, the balloon_lock mutex is taken and released by fill_balloon() > and leak_balloon() when both functions are entered and when they > return. > > This commit moves the locking to the caller instead, which is > the balloon()

Re: [RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-19 Thread Rafael Aquini
On Tue, Dec 18, 2012 at 06:17:29PM -0200, Luiz Capitulino wrote: Today, the balloon_lock mutex is taken and released by fill_balloon() and leak_balloon() when both functions are entered and when they return. This commit moves the locking to the caller instead, which is the balloon() thread.

Re: [PATCH] mm: fix balloon_page_movable() page->flags check

2012-11-27 Thread Rafael Aquini
On Tue, Nov 27, 2012 at 05:15:44PM -0800, Andrew Morton wrote: > On Tue, 27 Nov 2012 22:34:10 -0200 Rafael Aquini wrote: > > > Do you want me to resubmit this patch with the changes you suggested? > > oh, I think I can reach that far. How's this look? > It looks great

Re: [PATCH] mm: fix balloon_page_movable() page->flags check

2012-11-27 Thread Rafael Aquini
On Tue, Nov 27, 2012 at 03:52:01PM -0800, Andrew Morton wrote: > On Tue, 27 Nov 2012 21:31:10 -0200 > Rafael Aquini wrote: > > > This patch fixes the following crash by fixing and enhancing the way > > page->flags are tested to identify a ballooned page. > >

Re: [PATCH] mm: fix balloon_page_movable() page->flags check

2012-11-27 Thread Rafael Aquini
On Tue, Nov 27, 2012 at 09:31:10PM -0200, Rafael Aquini wrote: > This patch fixes the following crash by fixing and enhancing the way > page->flags are tested to identify a ballooned page. > > ---8<--- > BUG: unable to handle kernel NULL pointer dereference at

[PATCH] mm: fix balloon_page_movable() page->flags check

2012-11-27 Thread Rafael Aquini
as taking place because balloon_page_movable() page->flags tests were incomplete and we ended up inadvertently poking at private pages. Reported-by: Sasha Levin Signed-off-by: Rafael Aquini --- include/linux/balloon_compaction.h | 21 +++-- 1 file changed, 19 insertions(+),

Re: [PATCH v11 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-27 Thread Rafael Aquini
On Tue, Nov 20, 2012 at 03:33:24PM -0800, Andrew Morton wrote: > On Fri, 9 Nov 2012 12:16:02 + > Mel Gorman wrote: > > > On Wed, Nov 07, 2012 at 01:05:51AM -0200, Rafael Aquini wrote: > > > Memory fragmentation introduced by ballooning might reduce significantly

Re: [PATCH v11 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-27 Thread Rafael Aquini
On Tue, Nov 20, 2012 at 03:33:24PM -0800, Andrew Morton wrote: On Fri, 9 Nov 2012 12:16:02 + Mel Gorman m...@csn.ul.ie wrote: On Wed, Nov 07, 2012 at 01:05:51AM -0200, Rafael Aquini wrote: Memory fragmentation introduced by ballooning might reduce significantly the number of 2MB

[PATCH] mm: fix balloon_page_movable() page-flags check

2012-11-27 Thread Rafael Aquini
was taking place because balloon_page_movable() page-flags tests were incomplete and we ended up inadvertently poking at private pages. Reported-by: Sasha Levin levinsasha...@gmail.com Signed-off-by: Rafael Aquini aqu...@redhat.com --- include/linux/balloon_compaction.h | 21

Re: [PATCH] mm: fix balloon_page_movable() page-flags check

2012-11-27 Thread Rafael Aquini
On Tue, Nov 27, 2012 at 09:31:10PM -0200, Rafael Aquini wrote: This patch fixes the following crash by fixing and enhancing the way page-flags are tested to identify a ballooned page. ---8--- BUG: unable to handle kernel NULL pointer dereference at 0194 IP: [8122b354

Re: [PATCH] mm: fix balloon_page_movable() page-flags check

2012-11-27 Thread Rafael Aquini
On Tue, Nov 27, 2012 at 03:52:01PM -0800, Andrew Morton wrote: On Tue, 27 Nov 2012 21:31:10 -0200 Rafael Aquini aqu...@redhat.com wrote: This patch fixes the following crash by fixing and enhancing the way page-flags are tested to identify a ballooned page. ---8--- BUG: unable

Re: [PATCH] mm: fix balloon_page_movable() page-flags check

2012-11-27 Thread Rafael Aquini
On Tue, Nov 27, 2012 at 05:15:44PM -0800, Andrew Morton wrote: On Tue, 27 Nov 2012 22:34:10 -0200 Rafael Aquini aqu...@redhat.com wrote: Do you want me to resubmit this patch with the changes you suggested? oh, I think I can reach that far. How's this look? It looks great to me. Just

Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-22 Thread Rafael Aquini
On Thu, Nov 22, 2012 at 09:19:15AM -0500, Sasha Levin wrote: > And managed to reproduce it only once through last night, here is the dump I > got > before the oops: > > [ 2760.356820] page:ead00e00 count:1 mapcount:-2147287036 > mapping:04f4 index:0xd00e0003 > [

Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-22 Thread Rafael Aquini
On Tue, Nov 20, 2012 at 08:18:04PM -0500, Sasha Levin wrote: > On 11/20/2012 09:14 AM, Rafael Aquini wrote: > > On Sun, Nov 18, 2012 at 09:59:47AM -0500, Sasha Levin wrote: > >> On Sat, Nov 17, 2012 at 4:54 PM, Rafael Aquini wrote: > >>> On Sat, Nov 17, 2012 at 01:01

Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-22 Thread Rafael Aquini
On Tue, Nov 20, 2012 at 08:18:04PM -0500, Sasha Levin wrote: On 11/20/2012 09:14 AM, Rafael Aquini wrote: On Sun, Nov 18, 2012 at 09:59:47AM -0500, Sasha Levin wrote: On Sat, Nov 17, 2012 at 4:54 PM, Rafael Aquini aqu...@redhat.com wrote: On Sat, Nov 17, 2012 at 01:01:30PM -0500, Sasha

Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-22 Thread Rafael Aquini
On Thu, Nov 22, 2012 at 09:19:15AM -0500, Sasha Levin wrote: And managed to reproduce it only once through last night, here is the dump I got before the oops: [ 2760.356820] page:ead00e00 count:1 mapcount:-2147287036 mapping:04f4 index:0xd00e0003 [ 2760.362354]

Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-20 Thread Rafael Aquini
On Sun, Nov 18, 2012 at 09:59:47AM -0500, Sasha Levin wrote: > On Sat, Nov 17, 2012 at 4:54 PM, Rafael Aquini wrote: > > On Sat, Nov 17, 2012 at 01:01:30PM -0500, Sasha Levin wrote: > >> > >> I'm getting the following while fuzzing using trinity inside a KVM tools

Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-20 Thread Rafael Aquini
On Sun, Nov 18, 2012 at 09:59:47AM -0500, Sasha Levin wrote: On Sat, Nov 17, 2012 at 4:54 PM, Rafael Aquini aqu...@redhat.com wrote: On Sat, Nov 17, 2012 at 01:01:30PM -0500, Sasha Levin wrote: I'm getting the following while fuzzing using trinity inside a KVM tools guest, on latest

Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-17 Thread Rafael Aquini
On Sat, Nov 17, 2012 at 01:01:30PM -0500, Sasha Levin wrote: > > I'm getting the following while fuzzing using trinity inside a KVM tools > guest, > on latest -next: > > [ 1642.783728] BUG: unable to handle kernel NULL pointer dereference at > 0194 > [ 1642.785083] IP: []

Re: [PATCH v12 4/7] mm: introduce compaction and migration for ballooned pages

2012-11-17 Thread Rafael Aquini
On Sat, Nov 17, 2012 at 01:01:30PM -0500, Sasha Levin wrote: I'm getting the following while fuzzing using trinity inside a KVM tools guest, on latest -next: [ 1642.783728] BUG: unable to handle kernel NULL pointer dereference at 0194 [ 1642.785083] IP: [8122b354]

Re: [PATCH -next] virtio: balloon: fix missing unlock on error in fill_balloon()

2012-11-13 Thread Rafael Aquini
On Mon, Nov 12, 2012 at 03:34:53PM -0800, Andrew Morton wrote: > On Mon, 12 Nov 2012 21:50:40 +0800 > Wei Yongjun wrote: > > > From: Wei Yongjun > > > > Add the missing unlock before return from function fill_balloon() > > in the error handling case. > > > > Introduced by

Re: [PATCH -next] virtio: balloon: fix missing unlock on error in fill_balloon()

2012-11-13 Thread Rafael Aquini
On Mon, Nov 12, 2012 at 03:34:53PM -0800, Andrew Morton wrote: On Mon, 12 Nov 2012 21:50:40 +0800 Wei Yongjun weiyj...@gmail.com wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function fill_balloon() in the error handling case.

Re: [PATCH -next] virtio: balloon: fix missing unlock on error in fill_balloon()

2012-11-12 Thread Rafael Aquini
On Mon, Nov 12, 2012 at 09:50:40PM +0800, Wei Yongjun wrote: > From: Wei Yongjun > > Add the missing unlock before return from function fill_balloon() > in the error handling case. > > Introduced by 9864a8(virtio_balloon: introduce migration primitives > to balloon pages) > > dpatch engine is

Re: [PATCH -next] virtio: balloon: fix missing unlock on error in fill_balloon()

2012-11-12 Thread Rafael Aquini
On Mon, Nov 12, 2012 at 09:50:40PM +0800, Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function fill_balloon() in the error handling case. Introduced by 9864a8(virtio_balloon: introduce migration primitives to balloon pages)

Re: [PATCH v11 7/7] mm: add vm event counters for balloon pages compaction

2012-11-11 Thread Rafael Aquini
On Sat, Nov 10, 2012 at 05:55:38PM +0200, Michael S. Tsirkin wrote: > > mutex_unlock(>balloon_lock); > > + balloon_event_count(COMPACTBALLOONMIGRATED); > > > > return MIGRATEPAGE_BALLOON_SUCCESS; > > } > > Looks like any ballon would need to do this. > Can this chunk go into caller

Re: [PATCH v12 0/7] make balloon pages movable by compaction

2012-11-11 Thread Rafael Aquini
On Sun, Nov 11, 2012 at 05:01:13PM -0200, Rafael Aquini wrote: > Change log: > v12: > * Address last suggestions on sorting the barriers usage out (Mel > Gorman); > * Fix reported build breakages for CONFIG_BALLOON_COMPACTION=n (Andrew > Morton); > * Enhance comm

[PATCH v12 6/7] mm: introduce putback_movable_pages()

2012-11-11 Thread Rafael Aquini
this patch introduces putback_movable_pages() to properly cope with cases where the isolated pageset contains ballooned pages and LRU pages, thus fixing the mentioned inelegant hack around putback_lru_pages(). Signed-off-by: Rafael Aquini --- include/linux/migrate.h | 2 ++ mm/compaction.c | 6

<    1   2   3   4   5   6   7   >