[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130716051020.GA30116@lge.com>
Date: Tue, 16 Jul 2013 14:10:20 +0900
From: Joonsoo Kim <iamjoonsoo.kim@....com>
To: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Rik van Riel <riel@...hat.com>, Mel Gorman <mgorman@...e.de>,
Michal Hocko <mhocko@...e.cz>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Hugh Dickins <hughd@...gle.com>,
Davidlohr Bueso <davidlohr.bueso@...com>,
David Gibson <david@...son.dropbear.id.au>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/9] mm, hugetlb: move up the code which check
availability of free huge page
On Tue, Jul 16, 2013 at 09:06:04AM +0530, Aneesh Kumar K.V wrote:
> Joonsoo Kim <iamjoonsoo.kim@....com> writes:
>
> > On Mon, Jul 15, 2013 at 07:31:33PM +0530, Aneesh Kumar K.V wrote:
> >> Joonsoo Kim <iamjoonsoo.kim@....com> writes:
> >>
> >> > We don't need to proceede the processing if we don't have any usable
> >> > free huge page. So move this code up.
> >>
> >> I guess you can also mention that since we are holding hugetlb_lock
> >> hstate values can't change.
> >
> > Okay. I will mention this for v2.
> >
> >>
> >>
> >> Also.
> >>
> >> >
> >> > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@....com>
> >> >
> >> > diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> >> > index e2bfbf7..d87f70b 100644
> >> > --- a/mm/hugetlb.c
> >> > +++ b/mm/hugetlb.c
> >> > @@ -539,10 +539,6 @@ static struct page *dequeue_huge_page_vma(struct hstate *h,
> >> > struct zoneref *z;
> >> > unsigned int cpuset_mems_cookie;
> >> >
> >> > -retry_cpuset:
> >> > - cpuset_mems_cookie = get_mems_allowed();
> >> > - zonelist = huge_zonelist(vma, address,
> >> > - htlb_alloc_mask, &mpol, &nodemask);
> >> > /*
> >> > * A child process with MAP_PRIVATE mappings created by their parent
> >> > * have no page reserves. This check ensures that reservations are
> >> > @@ -550,11 +546,16 @@ retry_cpuset:
> >> > */
> >> > if (!vma_has_reserves(vma) &&
> >> > h->free_huge_pages - h->resv_huge_pages == 0)
> >> > - goto err;
> >> > + return NULL;
> >> >
> >>
> >> If you don't do the above change, the patch will be much simpler.
> >
> > The patch will be, but output code will not.
> > With this change, we can remove one goto label('err:') and
> > this makes code more readable.
> >
>
> If you feel stronly about the cleanup, you can do another path for the
> cleanups. Don't mix things in a single patch. That makes review difficult.
Okay! I will make an another patch for clean-up.
Thanks.
>
> -aneesh
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists