lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 6 Jul 2020 17:34:24 +0900
From:   Joonsoo Kim <js1304@...il.com>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>, kernel-team@....com,
        Christoph Hellwig <hch@...radead.org>,
        Roman Gushchin <guro@...com>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
        Michal Hocko <mhocko@...e.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: Re: [PATCH v3 6/8] mm/gup: use a standard migration target allocation callback

2020년 7월 4일 (토) 오전 12:56, Vlastimil Babka <vbabka@...e.cz>님이 작성:
>
> On 6/23/20 8:13 AM, js1304@...il.com wrote:
> > From: Joonsoo Kim <iamjoonsoo.kim@....com>
> >
> > There is a well-defined migration target allocation callback.
> > It's mostly similar with new_non_cma_page() except considering CMA pages.
> >
> > This patch adds a CMA consideration to the standard migration target
> > allocation callback and use it on gup.c.
> >
> > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@....com>
>
> Acked-by: Vlastimil Babka <vbabka@...e.cz>
>
> But a suggestion below.
>
> > ---
> >  mm/gup.c      | 57 ++++++++-------------------------------------------------
> >  mm/internal.h |  1 +
> >  mm/migrate.c  |  4 +++-
> >  3 files changed, 12 insertions(+), 50 deletions(-)
> >
> > diff --git a/mm/gup.c b/mm/gup.c
> > index 15be281..f6124e3 100644
> > --- a/mm/gup.c
> > +++ b/mm/gup.c
> > @@ -1608,56 +1608,15 @@ static bool check_dax_vmas(struct vm_area_struct **vmas, long nr_pages)
> >  }
> >
> >  #ifdef CONFIG_CMA
> > -static struct page *new_non_cma_page(struct page *page, unsigned long private)
> > +static struct page *alloc_migration_target_non_cma(struct page *page, unsigned long private)
> >  {
>
> ...
>
> > +     struct migration_target_control mtc = {
> > +             .nid = page_to_nid(page),
> > +             .gfp_mask = GFP_USER | __GFP_NOWARN,
> > +             .skip_cma = true,
> > +     };
> >
> > -     return __alloc_pages_node(nid, gfp_mask, 0);
> > +     return alloc_migration_target(page, (unsigned long)&mtc);
>
> Do we really need this wrapper? The only user is check_and_migrate_cma_pages so
> just opencode it?

This wrapper exists for setting up a different nid for each page.
However, as you suggested in the next reply, we can remove this wrapper if
NUMA_NO_NODE handling is added to the standard function. I will add NUMA_NO_NODE
handling to the standard function and remove this wrapper.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ