lkml.org 
[lkml]   [2013]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v2 03/20] mm, hugetlb: fix subpool accounting handling
    Date
    Joonsoo Kim <iamjoonsoo.kim@lge.com> writes:

    > On Thu, Aug 22, 2013 at 12:38:12PM +0530, Aneesh Kumar K.V wrote:
    >> Joonsoo Kim <iamjoonsoo.kim@lge.com> writes:
    >>
    >> > Hello, Aneesh.
    >> >
    >> > First of all, thank you for review!
    >> >
    >> > On Wed, Aug 21, 2013 at 02:58:20PM +0530, Aneesh Kumar K.V wrote:
    >> >> Joonsoo Kim <iamjoonsoo.kim@lge.com> writes:
    >> >>
    >> >> > If we alloc hugepage with avoid_reserve, we don't dequeue reserved one.
    >> >> > So, we should check subpool counter when avoid_reserve.
    >> >> > This patch implement it.
    >> >>
    >> >> Can you explain this better ? ie, if we don't have a reservation in the
    >> >> area chg != 0. So why look at avoid_reserve.
    >> >
    >> > We don't consider avoid_reserve when chg != 0.
    >> > Look at following code.
    >> >
    >> > + if (chg || avoid_reserve)
    >> > + if (hugepage_subpool_get_pages(spool, 1))
    >> >
    >> > It means that if chg != 0, we skip to check avoid_reserve.
    >>
    >> when whould be avoid_reserve == 1 and chg == 0 ?
    >
    > In this case, we should do hugepage_subpool_get_pages(), since we don't
    > get a reserved page due to avoid_reserve.

    As per off-list discussion we had around this, please add additional
    information in commit message explaining when we have
    avoid_reserve == 1 and chg == 0

    Something like the below copied from call site.

    /* If the process that created a MAP_PRIVATE mapping is about to
    * perform a COW due to a shared page count, attempt to satisfy
    * the allocation without using the existing reserves
    */

    Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

    -aneesh



    \
     
     \ /
      Last update: 2013-08-26 15:41    [W:4.095 / U:0.160 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site