RE: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-26 Thread Luck, Tony
> gfpflags_to_migratetype() > if (memory_mirror_enabled()) { /* We want to mirror all unmovable pages */ > if (!(gfp_mask & __GFP_MOVABLE)) >return MIGRATE_MIRROR > } I'm not sure that we can divide memory into just two buckets of "mirrored" and "movable". My expectation

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-26 Thread Xishi Qiu
On 2015/6/26 16:34, Kamezawa Hiroyuki wrote: > On 2015/06/26 10:43, Xishi Qiu wrote: >> On 2015/6/26 7:54, Kamezawa Hiroyuki wrote: >> >>> On 2015/06/25 18:44, Xishi Qiu wrote: On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: > On 2015/06/09 19:04, Xishi Qiu wrote: >> On 2015/6/9

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-26 Thread Kamezawa Hiroyuki
On 2015/06/26 10:43, Xishi Qiu wrote: On 2015/6/26 7:54, Kamezawa Hiroyuki wrote: On 2015/06/25 18:44, Xishi Qiu wrote: On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: On 2015/06/04 22:04, Xishi Qiu wrote:

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-26 Thread Kamezawa Hiroyuki
On 2015/06/26 10:43, Xishi Qiu wrote: On 2015/6/26 7:54, Kamezawa Hiroyuki wrote: On 2015/06/25 18:44, Xishi Qiu wrote: On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: On 2015/06/04 22:04, Xishi Qiu wrote:

RE: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-26 Thread Luck, Tony
gfpflags_to_migratetype() if (memory_mirror_enabled()) { /* We want to mirror all unmovable pages */ if (!(gfp_mask __GFP_MOVABLE)) return MIGRATE_MIRROR } I'm not sure that we can divide memory into just two buckets of mirrored and movable. My expectation is that

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-26 Thread Xishi Qiu
On 2015/6/26 16:34, Kamezawa Hiroyuki wrote: On 2015/06/26 10:43, Xishi Qiu wrote: On 2015/6/26 7:54, Kamezawa Hiroyuki wrote: On 2015/06/25 18:44, Xishi Qiu wrote: On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-25 Thread Xishi Qiu
On 2015/6/26 7:54, Kamezawa Hiroyuki wrote: > On 2015/06/25 18:44, Xishi Qiu wrote: >> On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: >> >>> On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: > On 2015/06/04 22:04, Xishi Qiu wrote: >> Add the buddy

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-25 Thread Kamezawa Hiroyuki
On 2015/06/25 18:44, Xishi Qiu wrote: On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address range mirroring feature. Allocate mirrored

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-25 Thread Xishi Qiu
On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: > On 2015/06/09 19:04, Xishi Qiu wrote: >> On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: >> >>> On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address range mirroring feature. Allocate mirrored pages in MIGRATE_MIRROR

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-25 Thread Xishi Qiu
On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address range mirroring feature. Allocate mirrored pages in MIGRATE_MIRROR list. If there

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-25 Thread Kamezawa Hiroyuki
On 2015/06/25 18:44, Xishi Qiu wrote: On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address range mirroring feature. Allocate mirrored

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-25 Thread Xishi Qiu
On 2015/6/26 7:54, Kamezawa Hiroyuki wrote: On 2015/06/25 18:44, Xishi Qiu wrote: On 2015/6/10 11:06, Kamezawa Hiroyuki wrote: On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-15 Thread Kamezawa Hiroyuki
On 2015/06/16 2:20, Luck, Tony wrote: On Mon, Jun 15, 2015 at 05:47:27PM +0900, Kamezawa Hiroyuki wrote: So, there are 3 ideas. (1) kernel only from MIRROR / user only from MOVABLE (Tony) (2) kernel only from MIRROR / user from MOVABLE + MIRROR(ASAP) (AKPM suggested) This makes use

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-15 Thread Luck, Tony
On Mon, Jun 15, 2015 at 05:47:27PM +0900, Kamezawa Hiroyuki wrote: > So, there are 3 ideas. > > (1) kernel only from MIRROR / user only from MOVABLE (Tony) > (2) kernel only from MIRROR / user from MOVABLE + MIRROR(ASAP) (AKPM > suggested) > This makes use of the fact MOVABLE memory is

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-15 Thread Kamezawa Hiroyuki
On 2015/06/11 5:40, Luck, Tony wrote: I guess, mirrored memory should be allocated if !__GFP_HIGHMEM or !__GFP_MOVABLE HIGHMEM shouldn't matter - partial memory mirror only makes any sense on X86_64 systems ... 32-bit kernels don't even boot on systems with 64GB, and the minimum rational

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-15 Thread Kamezawa Hiroyuki
On 2015/06/11 5:40, Luck, Tony wrote: I guess, mirrored memory should be allocated if !__GFP_HIGHMEM or !__GFP_MOVABLE HIGHMEM shouldn't matter - partial memory mirror only makes any sense on X86_64 systems ... 32-bit kernels don't even boot on systems with 64GB, and the minimum rational

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-15 Thread Luck, Tony
On Mon, Jun 15, 2015 at 05:47:27PM +0900, Kamezawa Hiroyuki wrote: So, there are 3 ideas. (1) kernel only from MIRROR / user only from MOVABLE (Tony) (2) kernel only from MIRROR / user from MOVABLE + MIRROR(ASAP) (AKPM suggested) This makes use of the fact MOVABLE memory is

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-15 Thread Kamezawa Hiroyuki
On 2015/06/16 2:20, Luck, Tony wrote: On Mon, Jun 15, 2015 at 05:47:27PM +0900, Kamezawa Hiroyuki wrote: So, there are 3 ideas. (1) kernel only from MIRROR / user only from MOVABLE (Tony) (2) kernel only from MIRROR / user from MOVABLE + MIRROR(ASAP) (AKPM suggested) This makes use

RE: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-10 Thread Luck, Tony
> I guess, mirrored memory should be allocated if !__GFP_HIGHMEM or > !__GFP_MOVABLE HIGHMEM shouldn't matter - partial memory mirror only makes any sense on X86_64 systems ... 32-bit kernels don't even boot on systems with 64GB, and the minimum rational configuration for a machine that

RE: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-10 Thread Luck, Tony
I guess, mirrored memory should be allocated if !__GFP_HIGHMEM or !__GFP_MOVABLE HIGHMEM shouldn't matter - partial memory mirror only makes any sense on X86_64 systems ... 32-bit kernels don't even boot on systems with 64GB, and the minimum rational configuration for a machine that supports

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-09 Thread Kamezawa Hiroyuki
On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address range mirroring feature. Allocate mirrored pages in MIGRATE_MIRROR list. If there is no mirrored pages left, use other types

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-09 Thread Xishi Qiu
On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: > On 2015/06/04 22:04, Xishi Qiu wrote: >> Add the buddy system interface for address range mirroring feature. >> Allocate mirrored pages in MIGRATE_MIRROR list. If there is no mirrored pages >> left, use other types pages. >> >> Signed-off-by: Xishi

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-09 Thread Kamezawa Hiroyuki
On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address range mirroring feature. Allocate mirrored pages in MIGRATE_MIRROR list. If there is no mirrored pages left, use other types pages. Signed-off-by: Xishi Qiu --- mm/page_alloc.c | 40

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-09 Thread Xishi Qiu
On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address range mirroring feature. Allocate mirrored pages in MIGRATE_MIRROR list. If there is no mirrored pages left, use other types pages. Signed-off-by: Xishi Qiu

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-09 Thread Kamezawa Hiroyuki
On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address range mirroring feature. Allocate mirrored pages in MIGRATE_MIRROR list. If there is no mirrored pages left, use other types pages. Signed-off-by: Xishi Qiu qiuxi...@huawei.com --- mm/page_alloc.c | 40

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-09 Thread Kamezawa Hiroyuki
On 2015/06/09 19:04, Xishi Qiu wrote: On 2015/6/9 15:12, Kamezawa Hiroyuki wrote: On 2015/06/04 22:04, Xishi Qiu wrote: Add the buddy system interface for address range mirroring feature. Allocate mirrored pages in MIGRATE_MIRROR list. If there is no mirrored pages left, use other types

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-04 Thread Xishi Qiu
On 2015/6/5 1:09, Luck, Tony wrote: > +#ifdef CONFIG_MEMORY_MIRROR > + if (change_to_mirror(gfp_mask, ac.high_zoneidx)) > + ac.migratetype = MIGRATE_MIRROR; > +#endif > > We may have to be smarter than this here. I'd like to encourage the > enterprise Linux distributions to set

RE: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-04 Thread Luck, Tony
+#ifdef CONFIG_MEMORY_MIRROR + if (change_to_mirror(gfp_mask, ac.high_zoneidx)) + ac.migratetype = MIGRATE_MIRROR; +#endif We may have to be smarter than this here. I'd like to encourage the enterprise Linux distributions to set CONFIG_MEMORY_MIRROR=y But the reality is that

[RFC PATCH 10/12] mm: add the buddy system interface

2015-06-04 Thread Xishi Qiu
Add the buddy system interface for address range mirroring feature. Allocate mirrored pages in MIGRATE_MIRROR list. If there is no mirrored pages left, use other types pages. Signed-off-by: Xishi Qiu --- mm/page_alloc.c | 40 +++- 1 file changed, 39

Re: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-04 Thread Xishi Qiu
On 2015/6/5 1:09, Luck, Tony wrote: +#ifdef CONFIG_MEMORY_MIRROR + if (change_to_mirror(gfp_mask, ac.high_zoneidx)) + ac.migratetype = MIGRATE_MIRROR; +#endif We may have to be smarter than this here. I'd like to encourage the enterprise Linux distributions to set

RE: [RFC PATCH 10/12] mm: add the buddy system interface

2015-06-04 Thread Luck, Tony
+#ifdef CONFIG_MEMORY_MIRROR + if (change_to_mirror(gfp_mask, ac.high_zoneidx)) + ac.migratetype = MIGRATE_MIRROR; +#endif We may have to be smarter than this here. I'd like to encourage the enterprise Linux distributions to set CONFIG_MEMORY_MIRROR=y But the reality is that

[RFC PATCH 10/12] mm: add the buddy system interface

2015-06-04 Thread Xishi Qiu
Add the buddy system interface for address range mirroring feature. Allocate mirrored pages in MIGRATE_MIRROR list. If there is no mirrored pages left, use other types pages. Signed-off-by: Xishi Qiu qiuxi...@huawei.com --- mm/page_alloc.c | 40 +++- 1 file