02 Jul, 2021

1 commit

  • make W=1 generates the following warning for mm/mapping_dirty_helpers.c

    mm/mapping_dirty_helpers.c:325: warning: duplicate section name 'Note'

    The helper function is very specific to one driver -- vmwgfx. While the
    two notes are separate, all of it needs to be taken into account when
    using the helper so make it one note.

    Link: https://lkml.kernel.org/r/20210520084809.8576-5-mgorman@techsingularity.net
    Signed-off-by: Mel Gorman
    Reviewed-by: Yang Shi
    Acked-by: Vlastimil Babka
    Cc: Dan Streetman
    Cc: David Hildenbrand
    Cc: Michal Hocko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     

17 Apr, 2021

1 commit

  • Mapping dirty helpers have, so far, been only used on X86, but a port of
    vmwgfx to ARM64 exposed a problem which results in a compilation error
    on ARM64 systems:

    mm/mapping_dirty_helpers.c: In function `wp_clean_pud_entry':
    mm/mapping_dirty_helpers.c:172:32: error: implicit declaration of function `pud_dirty'; did you mean `pmd_dirty'? [-Werror=implicit-function-declaration]

    This is due to the fact that mapping_dirty_helpers code assumes that
    pud_dirty is always defined, which is not the case for architectures
    that don't define CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD.

    ARM64 arch is a little inconsistent when it comes to PUD hugepage
    helpers, e.g. it defines pud_young but not pud_dirty but regardless of
    that the core kernel code shouldn't assume that any of the PUD hugepage
    helpers are available unless CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
    is defined. This prevents compilation errors whenever one of the
    drivers is ported to new architectures.

    Link: https://lkml.kernel.org/r/20210409165151.694574-1-zackr@vmware.com
    Signed-off-by: Zack Rusin
    Reviewed-by: Thomas Hellstrm (Intel)
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zack Rusin
     

16 Dec, 2020

1 commit

  • Add and change parameter explanation for wp_pte and clean_record_pte, to
    avoid W1 warning:

    mm/mapping_dirty_helpers.c:34: warning: Function parameter or member 'end' not described in 'wp_pte'
    mm/mapping_dirty_helpers.c:88: warning: Function parameter or member 'end' not described in 'clean_record_pte'

    Link: https://lkml.kernel.org/r/1605605088-30668-2-git-send-email-alex.shi@linux.alibaba.com
    Signed-off-by: Alex Shi
    Cc: Jonathan Corbet
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alex Shi
     

03 Apr, 2020

1 commit

  • Following the update of pagewalk code commit a07984d48146 ("mm: pagewalk:
    add p4d_entry() and pgd_entry()") we can modify the mapping_dirty_helpers'
    huge page-table entry callbacks to avoid splitting when a huge pud or -pmd
    is encountered.

    Signed-off-by: Thomas Hellstrom
    Signed-off-by: Andrew Morton
    Reviewed-by: Steven Price
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/20200203154305.15045-1-thomas_os@shipmail.org
    Signed-off-by: Linus Torvalds

    Thomas Hellstrom
     

06 Nov, 2019

1 commit

  • Add two utilities to 1) write-protect and 2) clean all ptes pointing into
    a range of an address space.
    The utilities are intended to aid in tracking dirty pages (either
    driver-allocated system memory or pci device memory).
    The write-protect utility should be used in conjunction with
    page_mkwrite() and pfn_mkwrite() to trigger write page-faults on page
    accesses. Typically one would want to use this on sparse accesses into
    large memory regions. The clean utility should be used to utilize
    hardware dirtying functionality and avoid the overhead of page-faults,
    typically on large accesses into small memory regions.

    Cc: Andrew Morton
    Cc: Matthew Wilcox
    Cc: Will Deacon
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Minchan Kim
    Cc: Michal Hocko
    Cc: Huang Ying
    Cc: Jérôme Glisse
    Cc: Kirill A. Shutemov
    Signed-off-by: Thomas Hellstrom
    Acked-by: Andrew Morton

    Thomas Hellstrom