Re: [PATCH] mm: add the block to the tail of the list in expand()

2015-08-14 Thread Xishi Qiu
On 2015/8/5 22:47, Dave Hansen wrote: > On 08/05/2015 12:54 AM, Xishi Qiu wrote: >> I add some debug code like this, but it doesn't trigger the dump_stack(). > ... >> + if (!list_empty(&area->free_list[migratetype])) { >> + printk("expand(), the list is not empty\n"); >> +

Re: [PATCH] mm: add the block to the tail of the list in expand()

2015-08-05 Thread Dave Hansen
On 08/05/2015 12:54 AM, Xishi Qiu wrote: > I add some debug code like this, but it doesn't trigger the dump_stack(). ... > + if (!list_empty(&area->free_list[migratetype])) { > + printk("expand(), the list is not empty\n"); > + dump_stack(); > + } > +

Re: [PATCH] mm: add the block to the tail of the list in expand()

2015-08-05 Thread Xishi Qiu
On 2015/8/4 22:27, Dave Hansen wrote: > On 08/03/2015 06:13 PM, Xishi Qiu wrote: >> How did you do the experiment? > > I just stuck in some counters in expand() that looked to see whether the > list was empty or not when the page is added and then printed them out > occasionally. > Hi Dave, I

Re: [PATCH] mm: add the block to the tail of the list in expand()

2015-08-04 Thread Dave Hansen
On 08/03/2015 06:13 PM, Xishi Qiu wrote: > How did you do the experiment? I just stuck in some counters in expand() that looked to see whether the list was empty or not when the page is added and then printed them out occasionally. It will be interesting to see the results both on a freshly-boote

Re: [PATCH] mm: add the block to the tail of the list in expand()

2015-08-03 Thread Xishi Qiu
On 2015/8/3 12:10, Dave Hansen wrote: > On 08/02/2015 07:05 PM, Xishi Qiu wrote: Also, this might not do very much good in practice. If you are splitting a high-order page, you are doing the split because the lower-order lists are empty. So won't that list_add() be to an empty >>

Re: [PATCH] mm: add the block to the tail of the list in expand()

2015-08-02 Thread Dave Hansen
On 08/02/2015 07:05 PM, Xishi Qiu wrote: >> > Also, this might not do very much good in practice. If you are >> > splitting a high-order page, you are doing the split because the >> > lower-order lists are empty. So won't that list_add() be to an empty > > I made a mistake, you are right, all th

Re: [PATCH] mm: add the block to the tail of the list in expand()

2015-08-02 Thread Xishi Qiu
On 2015/8/1 7:24, Dave Hansen wrote: > On 07/31/2015 02:30 AM, Xishi Qiu wrote: >> __free_one_page() will judge whether the the next-highest order is free, >> then add the block to the tail or not. So when we split large order block, >> add the small block to the tail, it will reduce fragment. >

Re: [PATCH] mm: add the block to the tail of the list in expand()

2015-07-31 Thread Dave Hansen
On 07/31/2015 02:30 AM, Xishi Qiu wrote: > __free_one_page() will judge whether the the next-highest order is free, > then add the block to the tail or not. So when we split large order block, > add the small block to the tail, it will reduce fragment. It's an interesting idea, but what does it d

[PATCH] mm: add the block to the tail of the list in expand()

2015-07-31 Thread Xishi Qiu
__free_one_page() will judge whether the the next-highest order is free, then add the block to the tail or not. So when we split large order block, add the small block to the tail, it will reduce fragment. Signed-off-by: Xishi Qiu --- mm/page_alloc.c |7 ++- 1 files changed, 6 insertion