[PATCH 4/6] mm, page_alloc: un-inline the bad part of free_pages_check

2016-04-27 Thread Mel Gorman
/page_alloc.c +++ b/mm/page_alloc.c @@ -906,18 +906,11 @@ static inline bool page_expected_state(struct page *page, return true; } -static inline int free_pages_check(struct page *page) +static void free_pages_check_bad(struct page *page) { const char *bad_reason; unsigned

[PATCH 5/6] mm, page_alloc: pull out side effects from free_pages_check

2016-04-27 Thread Mel Gorman
tatic void free_pages_check_bad(struct page *page) } static inline int free_pages_check(struct page *page) { - if (likely(page_expected_state(page, PAGE_FLAGS_CHECK_AT_FREE))) { - page_cpupid_reset_last(page); - page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP

Re: [PATCH 2/3] mm, page_alloc: pull out side effects from free_pages_check

2016-04-27 Thread Vlastimil Babka
On 04/27/2016 02:41 PM, Mel Gorman wrote: On Wed, Apr 27, 2016 at 02:01:15PM +0200, Vlastimil Babka wrote: Check without side-effects should be easier to maintain. It also removes the duplicated cpupid and flags reset done in !DEBUG_VM variant of both free_pcp_prepare() and then bulkfree_pcp_pre

Re: [PATCH 1/3] mm, page_alloc: un-inline the bad part of free_pages_check

2016-04-27 Thread Vlastimil Babka
On 04/27/2016 02:37 PM, Mel Gorman wrote: On Wed, Apr 27, 2016 at 02:01:14PM +0200, Vlastimil Babka wrote: !DEBUG_VM bloat-o-meter: add/remove: 1/0 grow/shrink: 0/2 up/down: 124/-383 (-259) function old new delta free_pages_check_bad

Re: [PATCH 2/3] mm, page_alloc: pull out side effects from free_pages_check

2016-04-27 Thread Mel Gorman
On Wed, Apr 27, 2016 at 02:01:15PM +0200, Vlastimil Babka wrote: > Check without side-effects should be easier to maintain. It also removes the > duplicated cpupid and flags reset done in !DEBUG_VM variant of both > free_pcp_prepare() and then bulkfree_pcp_prepare(). Finally, it enables > the next

Re: [PATCH 1/3] mm, page_alloc: un-inline the bad part of free_pages_check

2016-04-27 Thread Mel Gorman
On Wed, Apr 27, 2016 at 02:01:14PM +0200, Vlastimil Babka wrote: > !DEBUG_VM bloat-o-meter: > > add/remove: 1/0 grow/shrink: 0/2 up/down: 124/-383 (-259) > function old new delta > free_pages_check_bad - 124+124 > free_pcp

[PATCH 1/3] mm, page_alloc: un-inline the bad part of free_pages_check

2016-04-27 Thread Vlastimil Babka
@@ static inline bool page_expected_state(struct page *page, return true; } -static inline int free_pages_check(struct page *page) +static void free_pages_check_bad(struct page *page) { const char *bad_reason; unsigned long bad_flags; - if (page_expected_state(page

[PATCH 2/3] mm, page_alloc: pull out side effects from free_pages_check

2016-04-27 Thread Vlastimil Babka
+), 6 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 12c03a8509a0..163d08ea43f0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -932,11 +932,8 @@ static void free_pages_check_bad(struct page *page) } static inline int free_pages_check(struct page *page) { - if (l

Re: free_pages_check

2008-01-07 Thread Nick Piggin
On Tuesday 08 January 2008 16:44, H. Peter Anvin wrote: > Nick Piggin wrote: > > On Tuesday 08 January 2008 13:43, Yinghai Lu wrote: > >> wonder why free_pages_check mm/page_alloc.c is using bit OR than logical > >> OR > >> > >> @@ -450,9 +450,

Re: free_pages_check

2008-01-07 Thread H. Peter Anvin
Nick Piggin wrote: On Tuesday 08 January 2008 13:43, Yinghai Lu wrote: wonder why free_pages_check mm/page_alloc.c is using bit OR than logical OR @@ -450,9 +450,9 @@ static inline void __free_one_page(struc static inline int free_pages_check(struct page *page) { - if (unlikely

Re: free_pages_check

2008-01-07 Thread Nick Piggin
On Tuesday 08 January 2008 13:43, Yinghai Lu wrote: > wonder why free_pages_check mm/page_alloc.c is using bit OR than logical OR > > @@ -450,9 +450,9 @@ static inline void __free_one_page(struc > > static inline int free_pages_check(struct page *page) > { > - if (u

Re: free_pages_check

2008-01-07 Thread Andrew Morton
On Mon, 7 Jan 2008 18:43:46 -0800 "Yinghai Lu" <[EMAIL PROTECTED]> wrote: > wonder why free_pages_check mm/page_alloc.c is using bit OR than logical OR > > @@ -450,9 +450,9 @@ static inline void __free_one_page(struc > > static inline int free_pages_check(struc

free_pages_check

2008-01-07 Thread Yinghai Lu
wonder why free_pages_check mm/page_alloc.c is using bit OR than logical OR @@ -450,9 +450,9 @@ static inline void __free_one_page(struc static inline int free_pages_check(struct page *page) { - if (unlikely(page_mapcount(page) | - (page->mapping != N