lkml.org 
[lkml]   [2018]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v12 09/11] mm: Allow arch code to override copy_highpage()
    On Wed, 21 Feb 2018 10:15:51 -0700 Khalid Aziz <khalid.aziz@oracle.com> wrote:

    > Some architectures can support metadata for memory pages and when a
    > page is copied, its metadata must also be copied. Sparc processors
    > from M7 onwards support metadata for memory pages. This metadata
    > provides tag based protection for access to memory pages. To maintain
    > this protection, the tag data must be copied to the new page when a
    > page is migrated across NUMA nodes. This patch allows arch specific
    > code to override default copy_highpage() and copy metadata along
    > with page data upon migration.
    >
    > ...
    >
    > --- a/include/linux/highmem.h
    > +++ b/include/linux/highmem.h
    > @@ -237,6 +237,8 @@ static inline void copy_user_highpage(struct page *to, struct page *from,
    >
    > #endif
    >
    > +#ifndef __HAVE_ARCH_COPY_HIGHPAGE
    > +
    > static inline void copy_highpage(struct page *to, struct page *from)
    > {
    > char *vfrom, *vto;
    > @@ -248,4 +250,6 @@ static inline void copy_highpage(struct page *to, struct page *from)
    > kunmap_atomic(vfrom);
    > }
    >
    > +#endif
    > +
    > #endif /* _LINUX_HIGHMEM_H */

    It would be more consistent and conventional here to do

    #ifndef copy_highpage
    static inline void copy_highpage(struct page *to, struct page *from)
    {
    ...
    }
    #define copy_highpage copy_highpage

    As is happening in [patch 07/11].

    And a similar change could be made to [patch 02/11], actually.


    Either way,

    Acked-by: Andrew Morton <akpm@linux-foundation.org>

    \
     
     \ /
      Last update: 2018-03-06 23:49    [W:3.769 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site