Re: [PATCH 2/3] thp: change deferred_split_count() to return number of THP in queue

2016-01-22 Thread Kirill A. Shutemov
On Fri, Jan 22, 2016 at 03:31:27PM +0100, Andrea Arcangeli wrote: > On Thu, Jan 21, 2016 at 03:09:22PM +0300, Kirill A. Shutemov wrote: > > @@ -3511,7 +3506,7 @@ static unsigned long deferred_split_scan(struct > > shrinker *shrink, > > list_splice_tail(, >split_queue); > >

Re: [PATCH 2/3] thp: change deferred_split_count() to return number of THP in queue

2016-01-22 Thread Andrea Arcangeli
On Thu, Jan 21, 2016 at 03:09:22PM +0300, Kirill A. Shutemov wrote: > @@ -3511,7 +3506,7 @@ static unsigned long deferred_split_scan(struct > shrinker *shrink, > list_splice_tail(, >split_queue); > spin_unlock_irqrestore(>split_queue_lock, flags); > > - return split *

Re: [PATCH 2/3] thp: change deferred_split_count() to return number of THP in queue

2016-01-22 Thread Kirill A. Shutemov
On Fri, Jan 22, 2016 at 03:31:27PM +0100, Andrea Arcangeli wrote: > On Thu, Jan 21, 2016 at 03:09:22PM +0300, Kirill A. Shutemov wrote: > > @@ -3511,7 +3506,7 @@ static unsigned long deferred_split_scan(struct > > shrinker *shrink, > > list_splice_tail(, >split_queue); > >

Re: [PATCH 2/3] thp: change deferred_split_count() to return number of THP in queue

2016-01-22 Thread Andrea Arcangeli
On Thu, Jan 21, 2016 at 03:09:22PM +0300, Kirill A. Shutemov wrote: > @@ -3511,7 +3506,7 @@ static unsigned long deferred_split_scan(struct > shrinker *shrink, > list_splice_tail(, >split_queue); > spin_unlock_irqrestore(>split_queue_lock, flags); > > - return split *

[PATCH 2/3] thp: change deferred_split_count() to return number of THP in queue

2016-01-21 Thread Kirill A. Shutemov
I've got meaning of shrinker::count_objects() wrong: it should return number of potentially freeable objects, which is not necessary correlate with freeable memory. Returning 256 per THP in queue is not reasonable: shrinker::scan_objects() never called with nr_to_scan > 128 in my setup. Let's

[PATCH 2/3] thp: change deferred_split_count() to return number of THP in queue

2016-01-21 Thread Kirill A. Shutemov
I've got meaning of shrinker::count_objects() wrong: it should return number of potentially freeable objects, which is not necessary correlate with freeable memory. Returning 256 per THP in queue is not reasonable: shrinker::scan_objects() never called with nr_to_scan > 128 in my setup. Let's