27 Sep, 2019

1 commit

  • The naming of pgtable_page_{ctor,dtor}() seems to have confused a few
    people, and until recently arm64 used these erroneously/pointlessly for
    other levels of page table.

    To make it incredibly clear that these only apply to the PTE level, and to
    align with the naming of pgtable_pmd_page_{ctor,dtor}(), let's rename them
    to pgtable_pte_page_{ctor,dtor}().

    These changes were generated with the following shell script:

    ----
    git grep -lw 'pgtable_page_.tor' | while read FILE; do
    sed -i '{s/pgtable_page_ctor/pgtable_pte_page_ctor/}' $FILE;
    sed -i '{s/pgtable_page_dtor/pgtable_pte_page_dtor/}' $FILE;
    done
    ----

    ... with the documentation re-flowed to remain under 80 columns, and
    whitespace fixed up in macros to keep backslashes aligned.

    There should be no functional change as a result of this patch.

    Link: http://lkml.kernel.org/r/20190722141133.3116-1-mark.rutland@arm.com
    Signed-off-by: Mark Rutland
    Reviewed-by: Mike Rapoport
    Acked-by: Geert Uytterhoeven [m68k]
    Cc: Anshuman Khandual
    Cc: Matthew Wilcox
    Cc: Michal Hocko
    Cc: Yu Zhao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Rutland
     

22 Aug, 2019

1 commit

  • From rdma.git

    Jason Gunthorpe says:

    ====================
    This is a collection of general cleanups for ODP to clarify some of the
    flows around umem creation and use of the interval tree.
    ====================

    The branch is based on v5.3-rc5 due to dependencies, and is being taken
    into hmm.git due to dependencies in the next patches.

    * odp_fixes:
    RDMA/mlx5: Use odp instead of mr->umem in pagefault_mr
    RDMA/mlx5: Use ib_umem_start instead of umem.address
    RDMA/core: Make invalidate_range a device operation
    RDMA/odp: Use kvcalloc for the dma_list and page_list
    RDMA/odp: Check for overflow when computing the umem_odp end
    RDMA/odp: Provide ib_umem_odp_release() to undo the allocs
    RDMA/odp: Split creating a umem_odp from ib_umem_get
    RDMA/odp: Make the three ways to create a umem_odp clear
    RMDA/odp: Consolidate umem_odp initialization
    RDMA/odp: Make it clearer when a umem is an implicit ODP umem
    RDMA/odp: Iterate over the whole rbtree directly
    RDMA/odp: Use the common interval tree library instead of generic
    RDMA/mlx5: Fix MR npages calculation for IB_ACCESS_HUGETLB

    Signed-off-by: Jason Gunthorpe

    Jason Gunthorpe
     

20 Aug, 2019

1 commit

  • There isn't any good reason to pass callbacks to migrate_vma. Instead
    we can just export the three steps done by this function to drivers and
    let them sequence the operation without callbacks. This removes a lot
    of boilerplate code as-is, and will allow the drivers to drastically
    improve code flow and error handling further on.

    Link: https://lore.kernel.org/r/20190814075928.23766-2-hch@lst.de
    Signed-off-by: Christoph Hellwig
    Reviewed-by: Ralph Campbell
    Tested-by: Ralph Campbell
    Signed-off-by: Jason Gunthorpe

    Christoph Hellwig
     

08 Aug, 2019

1 commit


31 Jul, 2019

1 commit

  • Pull HMM fixes from Jason Gunthorpe:
    "Fix the locking around nouveau's use of the hmm_range_* APIs. It works
    correctly in the success case, but many of the the edge cases have
    missing unlocks or double unlocks.

    The diffstat is a bit big as Christoph did a comprehensive job to move
    the obsolete API from the core header and into the driver before
    fixing its flow, but the risk of regression from this code motion is
    low"

    * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
    nouveau: unlock mmap_sem on all errors from nouveau_range_fault
    nouveau: remove the block parameter to nouveau_range_fault
    mm/hmm: move hmm_vma_range_done and hmm_vma_fault to nouveau
    mm/hmm: always return EBUSY for invalid ranges in hmm_range_{fault,snapshot}

    Linus Torvalds
     

26 Jul, 2019

2 commits

  • Add a HMM_FAULT_SNAPSHOT flag so that hmm_range_snapshot can be merged
    into the almost identical hmm_range_fault function.

    Link: https://lore.kernel.org/r/20190726005650.2566-5-rcampbell@nvidia.com
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Ralph Campbell
    Reviewed-by: Jason Gunthorpe
    Signed-off-by: Jason Gunthorpe

    Christoph Hellwig
     
  • We should not have two different error codes for the same
    condition. EAGAIN must be reserved for the FAULT_FLAG_ALLOW_RETRY retry
    case and signals to the caller that the mmap_sem has been unlocked.

    Use EBUSY for the !valid case so that callers can get the locking right.

    Link: https://lore.kernel.org/r/20190724065258.16603-2-hch@lst.de
    Tested-by: Ralph Campbell
    Signed-off-by: Christoph Hellwig
    Reviewed-by: Ralph Campbell
    Reviewed-by: Jason Gunthorpe
    Reviewed-by: Felix Kuehling
    [jgg: elaborated commit message]
    Signed-off-by: Jason Gunthorpe

    Christoph Hellwig
     

23 Jul, 2019

1 commit


19 Jul, 2019

1 commit

  • Explain the general mechanisms of 'ZONE_DEVICE' pages and list the users
    of 'devm_memremap_pages()'.

    [dan.j.williams@intel.com: update ZONE_DEVICE memory model documentation]
    Link: http://lkml.kernel.org/r/156109575458.1409767.1885676287099277666.stgit@dwillia2-desk3.amr.corp.intel.com
    Link: http://lkml.kernel.org/r/156092354985.979959.15763234410543451710.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Dan Williams
    Reported-by: Mike Rapoport
    Reviewed-by: Mike Rapoport
    Tested-by: Aneesh Kumar K.V [ppc64]
    Cc: Jonathan Corbet
    Cc: David Hildenbrand
    Cc: Jane Chu
    Cc: Jeff Moyer
    Cc: Jérôme Glisse
    Cc: Logan Gunthorpe
    Cc: Michal Hocko
    Cc: Oscar Salvador
    Cc: Pavel Tatashin
    Cc: Toshi Kani
    Cc: Vlastimil Babka
    Cc: Wei Yang
    Cc: Jason Gunthorpe
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     

17 Jul, 2019

1 commit


15 Jul, 2019

4 commits

  • Those files belong to the admin guide, so add them.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The stuff under sysctl describes /sys interface from userspace
    point of view. So, add it to the admin-guide and remove the
    :orphan: from its index file.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Rename the /proc/sys/ documentation files to ReST, using the
    README file as a template for an index.rst, adding the other
    files there via TOC markup.

    Despite being written on different times with different
    styles, try to make them somewhat coherent with a similar
    look and feel, ensuring that they'll look nice as both
    raw text file and as via the html output produced by the
    Sphinx build system.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Pull HMM updates from Jason Gunthorpe:
    "Improvements and bug fixes for the hmm interface in the kernel:

    - Improve clarity, locking and APIs related to the 'hmm mirror'
    feature merged last cycle. In linux-next we now see AMDGPU and
    nouveau to be using this API.

    - Remove old or transitional hmm APIs. These are hold overs from the
    past with no users, or APIs that existed only to manage cross tree
    conflicts. There are still a few more of these cleanups that didn't
    make the merge window cut off.

    - Improve some core mm APIs:
    - export alloc_pages_vma() for driver use
    - refactor into devm_request_free_mem_region() to manage
    DEVICE_PRIVATE resource reservations
    - refactor duplicative driver code into the core dev_pagemap
    struct

    - Remove hmm wrappers of improved core mm APIs, instead have drivers
    use the simplified API directly

    - Remove DEVICE_PUBLIC

    - Simplify the kconfig flow for the hmm users and core code"

    * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (42 commits)
    mm: don't select MIGRATE_VMA_HELPER from HMM_MIRROR
    mm: remove the HMM config option
    mm: sort out the DEVICE_PRIVATE Kconfig mess
    mm: simplify ZONE_DEVICE page private data
    mm: remove hmm_devmem_add
    mm: remove hmm_vma_alloc_locked_page
    nouveau: use devm_memremap_pages directly
    nouveau: use alloc_page_vma directly
    PCI/P2PDMA: use the dev_pagemap internal refcount
    device-dax: use the dev_pagemap internal refcount
    memremap: provide an optional internal refcount in struct dev_pagemap
    memremap: replace the altmap_valid field with a PGMAP_ALTMAP_VALID flag
    memremap: remove the data field in struct dev_pagemap
    memremap: add a migrate_to_ram method to struct dev_pagemap_ops
    memremap: lift the devmap_enable manipulation into devm_memremap_pages
    memremap: pass a struct dev_pagemap to ->kill and ->cleanup
    memremap: move dev_pagemap callbacks into a separate structure
    memremap: validate the pagemap type passed to devm_memremap_pages
    mm: factor out a devm_request_free_mem_region helper
    mm: export alloc_pages_vma
    ...

    Linus Torvalds
     

10 Jul, 2019

1 commit

  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     

09 Jul, 2019

1 commit


03 Jul, 2019

2 commits

  • Christoph Hellwig says:

    ====================
    Below is a series that cleans up the dev_pagemap interface so that it is
    more easily usable, which removes the need to wrap it in hmm and thus
    allowing to kill a lot of code

    Changes since v3:
    - pull in "mm/swap: Fix release_pages() when releasing devmap pages" and
    rebase the other patches on top of that
    - fold the hmm_devmem_add_resource into the DEVICE_PUBLIC memory removal
    patch
    - remove _vm_normal_page as it isn't needed without DEVICE_PUBLIC memory
    - pick up various ACKs

    Changes since v2:
    - fix nvdimm kunit build
    - add a new memory type for device dax
    - fix a few issues in intermediate patches that didn't show up in the end
    result
    - incorporate feedback from Michal Hocko, including killing of
    the DEVICE_PUBLIC memory type entirely

    Changes since v1:
    - rebase
    - also switch p2pdma to the internal refcount
    - add type checking for pgmap->type
    - rename the migrate method to migrate_to_ram
    - cleanup the altmap_valid flag
    - various tidbits from the reviews
    ====================

    Conflicts resolved by:
    - Keeping Ira's version of the code in swap.c
    - Using the delete for the section in hmm.rst
    - Using the delete for the devmap code in hmm.c and .h

    * branch 'hmm-devmem-cleanup.4': (24 commits)
    mm: don't select MIGRATE_VMA_HELPER from HMM_MIRROR
    mm: remove the HMM config option
    mm: sort out the DEVICE_PRIVATE Kconfig mess
    mm: simplify ZONE_DEVICE page private data
    mm: remove hmm_devmem_add
    mm: remove hmm_vma_alloc_locked_page
    nouveau: use devm_memremap_pages directly
    nouveau: use alloc_page_vma directly
    PCI/P2PDMA: use the dev_pagemap internal refcount
    device-dax: use the dev_pagemap internal refcount
    memremap: provide an optional internal refcount in struct dev_pagemap
    memremap: replace the altmap_valid field with a PGMAP_ALTMAP_VALID flag
    memremap: remove the data field in struct dev_pagemap
    memremap: add a migrate_to_ram method to struct dev_pagemap_ops
    memremap: lift the devmap_enable manipulation into devm_memremap_pages
    memremap: pass a struct dev_pagemap to ->kill and ->cleanup
    memremap: move dev_pagemap callbacks into a separate structure
    memremap: validate the pagemap type passed to devm_memremap_pages
    mm: factor out a devm_request_free_mem_region helper
    mm: export alloc_pages_vma
    ...

    Signed-off-by: Jason Gunthorpe

    Jason Gunthorpe
     
  • There isn't really much value add in the hmm_devmem_add wrapper and
    more, as using devm_memremap_pages directly now is just as simple.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jason Gunthorpe
    Reviewed-by: Dan Williams
    Signed-off-by: Jason Gunthorpe

    Christoph Hellwig
     

21 Jun, 2019

1 commit

  • The asterisks prepended to the quoted text currently get translated to
    bullet points, which gets increasingly confusing the smaller your
    screen is (when viewing the sphinx output, that is).

    Convert the whole quote to a literal block.

    Signed-off-by: Valentin Schneider
    Signed-off-by: Jonathan Corbet

    Valentin Schneider
     

15 Jun, 2019

2 commits

  • In order to prepare to add them to the Kernel API book,
    convert the files to ReST format.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • Convert the cgroup-v1 files to ReST format, in order to
    allow a later addition to the admin-guide.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Tejun Heo
    Signed-off-by: Tejun Heo

    Mauro Carvalho Chehab
     

07 Jun, 2019

1 commit

  • Update the HMM documentation to reflect the latest API and make a few
    minor wording changes.

    Cc: John Hubbard
    Cc: Ira Weiny
    Cc: Dan Williams
    Cc: Arnd Bergmann
    Cc: Balbir Singh
    Cc: Dan Carpenter
    Cc: Matthew Wilcox
    Cc: Souptick Joarder
    Cc: Andrew Morton
    Signed-off-by: Ralph Campbell
    Reviewed-by: Jérôme Glisse
    Signed-off-by: Jason Gunthorpe

    Ralph Campbell
     

02 Jun, 2019

1 commit

  • Fix Sphinx warnings in Documentation/vm/hmm.rst by using "::" notation and
    inserting a blank line. Also add a missing ';'.

    Documentation/vm/hmm.rst:292: WARNING: Unexpected indentation.
    Documentation/vm/hmm.rst:300: WARNING: Unexpected indentation.

    Link: http://lkml.kernel.org/r/c5995359-7c82-4e47-c7be-b58a4dda0953@infradead.org
    Fixes: 023a019a9b4e ("mm/hmm: add default fault flags to avoid the need to pre-fill pfns arrays")
    Signed-off-by: Randy Dunlap
    Reviewed-by: Jérôme Glisse
    Reviewed-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

15 May, 2019

4 commits

  • The HMM mirror API can be use in two fashions. The first one where the
    HMM user coalesce multiple page faults into one request and set flags per
    pfns for of those faults. The second one where the HMM user want to
    pre-fault a range with specific flags. For the latter one it is a waste
    to have the user pre-fill the pfn arrays with a default flags value.

    This patch adds a default flags value allowing user to set them for a
    range without having to pre-fill the pfn array.

    Link: http://lkml.kernel.org/r/20190403193318.16478-8-jglisse@redhat.com
    Signed-off-by: Jérôme Glisse
    Reviewed-by: Ralph Campbell
    Cc: John Hubbard
    Cc: Dan Williams
    Cc: Arnd Bergmann
    Cc: Balbir Singh
    Cc: Dan Carpenter
    Cc: Ira Weiny
    Cc: Matthew Wilcox
    Cc: Souptick Joarder
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jérôme Glisse
     
  • A common use case for HMM mirror is user trying to mirror a range and
    before they could program the hardware it get invalidated by some core mm
    event. Instead of having user re-try right away to mirror the range
    provide a completion mechanism for them to wait for any active
    invalidation affecting the range.

    This also changes how hmm_range_snapshot() and hmm_range_fault() works by
    not relying on vma so that we can drop the mmap_sem when waiting and
    lookup the vma again on retry.

    Link: http://lkml.kernel.org/r/20190403193318.16478-7-jglisse@redhat.com
    Signed-off-by: Jérôme Glisse
    Reviewed-by: Ralph Campbell
    Cc: John Hubbard
    Cc: Dan Williams
    Cc: Dan Carpenter
    Cc: Matthew Wilcox
    Cc: Arnd Bergmann
    Cc: Balbir Singh
    Cc: Ira Weiny
    Cc: Souptick Joarder
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jérôme Glisse
     
  • Minor optimization around hmm_pte_need_fault(). Rename for consistency
    between code, comments and documentation. Also improves the comments on
    all the possible returns values. Improve the function by returning the
    number of populated entries in pfns array.

    Link: http://lkml.kernel.org/r/20190403193318.16478-6-jglisse@redhat.com
    Signed-off-by: Jérôme Glisse
    Reviewed-by: Ralph Campbell
    Cc: John Hubbard
    Cc: Dan Williams
    Cc: Arnd Bergmann
    Cc: Balbir Singh
    Cc: Dan Carpenter
    Cc: Ira Weiny
    Cc: Matthew Wilcox
    Cc: Souptick Joarder
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jérôme Glisse
     
  • Rename for consistency between code, comments and documentation. Also
    improves the comments on all the possible returns values. Improve the
    function by returning the number of populated entries in pfns array.

    Link: http://lkml.kernel.org/r/20190403193318.16478-5-jglisse@redhat.com
    Signed-off-by: Jérôme Glisse
    Reviewed-by: Ralph Campbell
    Reviewed-by: John Hubbard
    Reviewed-by: Ira Weiny
    Cc: Dan Williams
    Cc: Arnd Bergmann
    Cc: Balbir Singh
    Cc: Dan Carpenter
    Cc: Matthew Wilcox
    Cc: Souptick Joarder
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jérôme Glisse
     

30 Apr, 2019

2 commits


20 Apr, 2019

1 commit

  • When demonstrating FOLL_SPLIT in transhuge document, migration is used
    as an example. But, since commit 94723aafb9e7 ("mm: unclutter THP
    migration"), the way of THP migration is totally changed. FOLL_SPLIT is
    not used by migration anymore due to the change.

    Remove the obsolete example to avoid confusion.

    Cc: Michal Hocko
    Cc: Kirill A. Shutemov
    Cc: Mike Rapoport
    Signed-off-by: Yang Shi
    Reviewed-by: Zi Yan
    Signed-off-by: Jonathan Corbet

    Yang Shi
     

10 Apr, 2019

1 commit

  • Current document includes the path to an RST doc file. Since this is an
    RST file we can make this a link. Keeps the path as the link title
    since that what the original author wrote.

    Use reference to link to rst file.

    Signed-off-by: Tobin C. Harding
    Signed-off-by: Jonathan Corbet

    Tobin C. Harding
     

02 Feb, 2019

3 commits

  • sphinx emits warning

    WARNING: undefined label: memory-allocation ...

    This seems to be caused by the use of a hyphen in the label name instead
    of an underscore. Using an underscore for the label name and the
    reference clears the warning.

    Use underscore not hyphen in label and reference.

    Signed-off-by: Tobin C. Harding
    Signed-off-by: Jonathan Corbet

    Tobin C. Harding
     
  • sphinx emits warning

    WARNING: Inline emphasis start-string without end-string.

    This is caused by a missing colon.

    Add missing colon, clearing shpinx build warning.

    Signed-off-by: Tobin C. Harding
    Acked-by: Mike Rapoport
    Signed-off-by: Jonathan Corbet

    Tobin C. Harding
     
  • There is a minor typo in SLUB documentation.

    Fix typo.

    Signed-off-by: Tobin C. Harding
    Acked-by: Mike Rapoport
    Signed-off-by: Jonathan Corbet

    Tobin C. Harding
     

30 Dec, 2018

1 commit

  • Pull documentation update from Jonathan Corbet:
    "A fairly normal cycle for documentation stuff. We have a new document
    on perf security, more Italian translations, more improvements to the
    memory-management docs, improvements to the pathname lookup
    documentation, and the usual array of smaller fixes.

    As is often the case, there are a few reaches outside of
    Documentation/ to adjust kerneldoc comments"

    * tag 'docs-5.0' of git://git.lwn.net/linux: (38 commits)
    docs: improve pathname-lookup document structure
    configfs: fix wrong name of struct in documentation
    docs/mm-api: link slab_common.c to "The Slab Cache" section
    slab: make kmem_cache_create{_usercopy} description proper kernel-doc
    doc:process: add links where missing
    docs/core-api: make mm-api.rst more structured
    x86, boot: documentation whitespace fixup
    Documentation: devres: note checking needs when converting
    doc:it: add some process/* translations
    doc:it: fixes in process/1.Intro
    Documentation: convert path-lookup from markdown to resturctured text
    Documentation/admin-guide: update admin-guide index.rst
    Documentation/admin-guide: introduce perf-security.rst file
    scripts/kernel-doc: Fix struct and struct field attribute processing
    Documentation: dev-tools: Fix typos in index.rst
    Correct gen_init_cpio tool's documentation
    Document /proc/pid PID reuse behavior
    Documentation: update path-lookup.md for parallel lookups
    Documentation: Use "while" instead of "whilst"
    dmaengine: Add mailing list address to the documentation
    ...

    Linus Torvalds
     

21 Nov, 2018

1 commit


20 Nov, 2018

1 commit


07 Nov, 2018

1 commit

  • The i915 driver uses shmemfs to allocate backing storage for gem
    objects. These shmemfs pages can be pinned (increased ref count) by
    shmem_read_mapping_page_gfp(). When a lot of pages are pinned, vmscan
    wastes a lot of time scanning these pinned pages. In some extreme case,
    all pages in the inactive anon lru are pinned, and only the inactive
    anon lru is scanned due to inactive_ratio, the system cannot swap and
    invokes the oom-killer. Mark these pinned pages as unevictable to speed
    up vmscan.

    Export pagevec API check_move_unevictable_pages().

    This patch was inspired by Chris Wilson's change [1].

    [1]: https://patchwork.kernel.org/patch/9768741/

    Cc: Chris Wilson
    Cc: Joonas Lahtinen
    Cc: Peter Zijlstra
    Cc: Andrew Morton
    Cc: Dave Hansen
    Signed-off-by: Kuo-Hsin Yang
    Acked-by: Michal Hocko # mm part
    Reviewed-by: Chris Wilson
    Acked-by: Dave Hansen
    Acked-by: Andrew Morton
    Link: https://patchwork.freedesktop.org/patch/msgid/20181106132324.17390-1-chris@chris-wilson.co.uk
    Signed-off-by: Chris Wilson

    Kuo-Hsin Yang
     

27 Oct, 2018

1 commit

  • Extend the slub_debug syntax to "slub_debug=[,]*", where
    may contain an asterisk at the end. For example, the following
    would poison all kmalloc slabs:

    slub_debug=P,kmalloc*

    and the following would apply the default flags to all kmalloc and all
    block IO slabs:

    slub_debug=,bio*,kmalloc*

    Please note that a similar patch was posted by Iliyan Malchev some time
    ago but was never merged:

    https://marc.info/?l=linux-mm&m=131283905330474&w=2

    Link: http://lkml.kernel.org/r/20180928111139.27962-1-atomlin@redhat.com
    Signed-off-by: Aaron Tomlin
    Acked-by: Christoph Lameter
    Cc: Pekka Enberg
    Cc: David Rientjes
    Cc: Joonsoo Kim
    Cc: Iliyan Malchev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aaron Tomlin
     

10 Sep, 2018

1 commit

  • This is a respin with a wider audience (all that get_maintainer returned)
    and I know this spams a *lot* of people. Not sure what would be the correct
    way, so my apologies for ruining your inbox.

    The 00-INDEX files are supposed to give a summary of all files present
    in a directory, but these files are horribly out of date and their
    usefulness is brought into question. Often a simple "ls" would reveal
    the same information as the filenames are generally quite descriptive as
    a short introduction to what the file covers (it should not surprise
    anyone what Documentation/sched/sched-design-CFS.txt covers)

    A few years back it was mentioned that these files were no longer really
    needed, and they have since then grown further out of date, so perhaps
    it is time to just throw them out.

    A short status yields the following _outdated_ 00-INDEX files, first
    counter is files listed in 00-INDEX but missing in the directory, last
    is files present but not listed in 00-INDEX.

    List of outdated 00-INDEX:
    Documentation: (4/10)
    Documentation/sysctl: (0/1)
    Documentation/timers: (1/0)
    Documentation/blockdev: (3/1)
    Documentation/w1/slaves: (0/1)
    Documentation/locking: (0/1)
    Documentation/devicetree: (0/5)
    Documentation/power: (1/1)
    Documentation/powerpc: (0/5)
    Documentation/arm: (1/0)
    Documentation/x86: (0/9)
    Documentation/x86/x86_64: (1/1)
    Documentation/scsi: (4/4)
    Documentation/filesystems: (2/9)
    Documentation/filesystems/nfs: (0/2)
    Documentation/cgroup-v1: (0/2)
    Documentation/kbuild: (0/4)
    Documentation/spi: (1/0)
    Documentation/virtual/kvm: (1/0)
    Documentation/scheduler: (0/2)
    Documentation/fb: (0/1)
    Documentation/block: (0/1)
    Documentation/networking: (6/37)
    Documentation/vm: (1/3)

    Then there are 364 subdirectories in Documentation/ with several files that
    are missing 00-INDEX alltogether (and another 120 with a single file and no
    00-INDEX).

    I don't really have an opinion to whether or not we /should/ have 00-INDEX,
    but the above 00-INDEX should either be removed or be kept up to date. If
    we should keep the files, I can try to keep them updated, but I rather not
    if we just want to delete them anyway.

    As a starting point, remove all index-files and references to 00-INDEX and
    see where the discussion is going.

    Signed-off-by: Henrik Austad
    Acked-by: "Paul E. McKenney"
    Just-do-it-by: Steven Rostedt
    Reviewed-by: Jens Axboe
    Acked-by: Paul Moore
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mark Brown
    Acked-by: Mike Rapoport
    Cc: [Almost everybody else]
    Signed-off-by: Jonathan Corbet

    Henrik Austad