Re: [PATCH v2 2/4] mm: remove zone_lru_lock() function access ->lru_lock directly

2019-03-01 Thread John Hubbard
On 3/1/19 2:51 AM, Andrey Ryabinin wrote: > > > On 3/1/19 12:44 AM, John Hubbard wrote: >> On 2/28/19 12:33 AM, Andrey Ryabinin wrote: >>> We have common pattern to access lru_lock from a page pointer: >>> zone_lru_lock(page_zone(page)) >>> >>> Which is silly, because it unfolds to this: >>>

Re: [PATCH v2 2/4] mm: remove zone_lru_lock() function access ->lru_lock directly

2019-03-01 Thread Andrey Ryabinin
On 3/1/19 12:44 AM, John Hubbard wrote: > On 2/28/19 12:33 AM, Andrey Ryabinin wrote: >> We have common pattern to access lru_lock from a page pointer: >> zone_lru_lock(page_zone(page)) >> >> Which is silly, because it unfolds to this: >> >> &NODE_DATA(page_to_nid(page))->node_zones[p

Re: [PATCH v2 2/4] mm: remove zone_lru_lock() function access ->lru_lock directly

2019-02-28 Thread John Hubbard
On 2/28/19 1:56 PM, Vlastimil Babka wrote: > On 2/28/2019 10:44 PM, John Hubbard wrote: >> Instead of removing that function, let's change it, and add another >> (since you have two cases: either a page* or a pgdat* is available), >> and move it to where it can compile, like this: >> >> >> diff --g

Re: [PATCH v2 2/4] mm: remove zone_lru_lock() function access ->lru_lock directly

2019-02-28 Thread Vlastimil Babka
On 2/28/2019 10:44 PM, John Hubbard wrote: > Instead of removing that function, let's change it, and add another > (since you have two cases: either a page* or a pgdat* is available), > and move it to where it can compile, like this: > > > diff --git a/include/linux/mm.h b/include/linux/mm.h > in

Re: [PATCH v2 2/4] mm: remove zone_lru_lock() function access ->lru_lock directly

2019-02-28 Thread John Hubbard
On 2/28/19 12:33 AM, Andrey Ryabinin wrote: > We have common pattern to access lru_lock from a page pointer: > zone_lru_lock(page_zone(page)) > > Which is silly, because it unfolds to this: > > &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)]->zone_pgdat->lru_lock > while

Re: [PATCH v2 2/4] mm: remove zone_lru_lock() function access ->lru_lock directly

2019-02-28 Thread William Kucharski
> On Feb 28, 2019, at 11:22 AM, Andrew Morton wrote: > > I don't think so. This kernedoc comment was missing its leading /**. > The patch fixes that. That makes sense; it had looked like just an extraneous asterisk.

Re: [PATCH v2 2/4] mm: remove zone_lru_lock() function access ->lru_lock directly

2019-02-28 Thread Andrew Morton
On Thu, 28 Feb 2019 05:53:37 -0700 William Kucharski wrote: > > On Feb 28, 2019, at 1:33 AM, Andrey Ryabinin > > wrote: > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > index a9852ed7b97f..2d081a32c6a8 100644 > > --- a/mm/vmscan.c > > +++ b/mm/vmscan.c > > @@ -1614,8 +1614,8 @@ static __alway

Re: [PATCH v2 2/4] mm: remove zone_lru_lock() function access ->lru_lock directly

2019-02-28 Thread William Kucharski
> On Feb 28, 2019, at 1:33 AM, Andrey Ryabinin wrote: > diff --git a/mm/vmscan.c b/mm/vmscan.c > index a9852ed7b97f..2d081a32c6a8 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1614,8 +1614,8 @@ static __always_inline void update_lru_sizes(struct > lruvec *lruvec, > > } > > -/* > - *

Re: [PATCH v2 2/4] mm: remove zone_lru_lock() function access ->lru_lock directly

2019-02-28 Thread Mel Gorman
On Thu, Feb 28, 2019 at 11:33:27AM +0300, Andrey Ryabinin wrote: > We have common pattern to access lru_lock from a page pointer: > zone_lru_lock(page_zone(page)) > > Which is silly, because it unfolds to this: > > &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)]->zone_pg