LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: akpm@linux-foundation.org, tglx@linutronix.de,
	hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com,
	kirill.shutemov@linux.intel.com, mika.penttila@nextfour.com,
	david@redhat.com, vbabka@suse.cz, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	songmuchun@bytedance.com
Subject: Re: [PATCH v2 1/2] mm: introduce pmd_install() helper
Date: Wed, 1 Sep 2021 02:23:01 +0300	[thread overview]
Message-ID: <20210831232301.ilehcpc3n5bqodsz@box.shutemov.name> (raw)
In-Reply-To: <20210831132111.85437-2-zhengqi.arch@bytedance.com>

On Tue, Aug 31, 2021 at 09:21:10PM +0800, Qi Zheng wrote:
> Currently we have three times the same few lines repeated in the
> code. Deduplicate them by newly introduced pmd_install() helper.
> 
> Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
> Reviewed-by: David Hildenbrand <david@redhat.com>
> Reviewed-by: Muchun Song <songmuchun@bytedance.com>
> ---
>  include/linux/mm.h |  1 +
>  mm/filemap.c       | 11 ++---------
>  mm/memory.c        | 34 ++++++++++++++++------------------
>  3 files changed, 19 insertions(+), 27 deletions(-)
> 
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index a3cc83d64564..0af420a7e382 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -2463,6 +2463,7 @@ static inline spinlock_t *pud_lock(struct mm_struct *mm, pud_t *pud)
>  	return ptl;
>  }
>  
> +extern void pmd_install(struct mm_struct *mm, pmd_t *pmd, pgtable_t *pte);
>  extern void __init pagecache_init(void);
>  extern void __init free_area_init_memoryless_node(int nid);
>  extern void free_initmem(void);

mm/internal.h would be a better fit for the declaration.

Otherwise:

Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

-- 
 Kirill A. Shutemov

  reply	other threads:[~2021-08-31 23:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 13:21 [PATCH v2 0/2] Do some code cleanups related to mm Qi Zheng
2021-08-31 13:21 ` [PATCH v2 1/2] mm: introduce pmd_install() helper Qi Zheng
2021-08-31 23:23   ` Kirill A. Shutemov [this message]
2021-09-01 10:15     ` Qi Zheng
2021-08-31 13:21 ` [PATCH v2 2/2] mm: remove redundant smp_wmb() Qi Zheng
2021-08-31 23:25   ` Kirill A. Shutemov

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=20210831232301.ilehcpc3n5bqodsz@box.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mika.penttila@nextfour.com \
    --cc=songmuchun@bytedance.com \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    --cc=vdavydov.dev@gmail.com \
    --cc=zhengqi.arch@bytedance.com \
    --subject='Re: [PATCH v2 1/2] mm: introduce pmd_install() helper' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).