All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Du, Changbin" <changbin.du@intel.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Du, Changbin" <changbin.du@intel.com>,
	akpm@linux-foundation.org, corbet@lwn.net, hughd@google.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH 1/2] mm, thp: introduce dedicated transparent huge page allocation interfaces
Date: Fri, 20 Oct 2017 16:31:42 +0800	[thread overview]
Message-ID: <20171020083142.GA18017@intel.com> (raw)
In-Reply-To: <20171019124931.p5zdvs2kdwu73mwh@dhcp22.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]

Hi Hocko,
On Thu, Oct 19, 2017 at 02:49:31PM +0200, Michal Hocko wrote:
> On Wed 18-10-17 19:00:26, Du, Changbin wrote:
> > Hi Hocko,
> > 
> > On Tue, Oct 17, 2017 at 12:20:52PM +0200, Michal Hocko wrote:
> > > [CC Kirill]
> > > 
> > > On Mon 16-10-17 17:19:16, changbin.du@intel.com wrote:
> > > > From: Changbin Du <changbin.du@intel.com>
> > > > 
> > > > This patch introduced 4 new interfaces to allocate a prepared
> > > > transparent huge page.
> > > >   - alloc_transhuge_page_vma
> > > >   - alloc_transhuge_page_nodemask
> > > >   - alloc_transhuge_page_node
> > > >   - alloc_transhuge_page
> > > > 
> > > > The aim is to remove duplicated code and simplify transparent
> > > > huge page allocation. These are similar to alloc_hugepage_xxx
> > > > which are for hugetlbfs pages. This patch does below changes:
> > > >   - define alloc_transhuge_page_xxx interfaces
> > > >   - apply them to all existing code
> > > >   - declare prep_transhuge_page as static since no others use it
> > > >   - remove alloc_hugepage_vma definition since it no longer has users
> > > 
> > > So what exactly is the advantage of the new API? The diffstat doesn't
> > > sound very convincing to me.
> > >
> > The caller only need one step to allocate thp. Several LOCs removed for all the
> > caller side with this change. So it's little more convinent.
> 
> Yeah, but the overall result is more code. So I am not really convinced. 
Yes, but some of code are just to make compiler happy (declarations). These are
just simple light wrappers same as other functions in kernel. At least the code
readbility is improved by this, two steps allocation merged into one so
duplicated logic removed.

> -- 
> Michal Hocko
> SUSE Labs

-- 
Thanks,
Changbin Du

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2017-10-20  8:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16  9:19 [PATCH 0/2] mm, thp: introduce dedicated transparent huge page allocation interfaces changbin.du
2017-10-16  9:19 ` changbin.du
2017-10-16  9:19 ` [PATCH 1/2] " changbin.du
2017-10-16  9:19   ` changbin.du
2017-10-17  8:08   ` Anshuman Khandual
2017-10-17  8:08     ` Anshuman Khandual
2017-10-17  9:16     ` Du, Changbin
2017-10-17 10:20   ` Michal Hocko
2017-10-17 10:20     ` Michal Hocko
2017-10-17 10:22     ` Michal Hocko
2017-10-17 10:22       ` Michal Hocko
2017-10-18 11:00     ` Du, Changbin
2017-10-19 12:49       ` Michal Hocko
2017-10-19 12:49         ` Michal Hocko
2017-10-20  8:31         ` Du, Changbin [this message]
2017-10-17 11:12   ` Kirill A. Shutemov
2017-10-17 11:12     ` Kirill A. Shutemov
2017-10-18 11:01     ` Du, Changbin
2017-10-18 15:54   ` kbuild test robot
2017-10-18 15:54     ` kbuild test robot
2017-10-18 16:01   ` kbuild test robot
2017-10-18 16:01     ` kbuild test robot
2017-10-16  9:19 ` [PATCH 2/2] mm: rename page dtor functions to {compound,huge,transhuge}_page__dtor changbin.du
2017-10-16  9:19   ` changbin.du
2017-10-17  8:36   ` Anshuman Khandual
2017-10-17  8:36     ` Anshuman Khandual
2017-10-17  9:21     ` Du, Changbin
2017-10-17 10:22   ` Michal Hocko
2017-10-17 10:22     ` Michal Hocko
2017-10-17 11:22     ` Kirill A. Shutemov
2017-10-17 11:22       ` Kirill A. Shutemov
2017-10-17 12:00       ` Michal Hocko
2017-10-17 12:00         ` Michal Hocko
2017-10-17 23:28 ` [PATCH 0/2] mm, thp: introduce dedicated transparent huge page allocation interfaces Andrew Morton
2017-10-17 23:28   ` Andrew Morton
2017-10-18 11:02   ` Du, Changbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171020083142.GA18017@intel.com \
    --to=changbin.du@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=hughd@google.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.