1. 20 10月, 2020 2 次提交
  2. 19 10月, 2020 1 次提交
  3. 16 10月, 2020 3 次提交
  4. 15 10月, 2020 3 次提交
  5. 14 10月, 2020 8 次提交
    • J
      selftests/vm: 8x compaction_test speedup · 11002620
      John Hubbard 提交于
      This patch reduces the running time for compaction_test from about 27 sec,
      to 3.3 sec, which is about an 8x speedup.
      
      These numbers are for an Intel x86_64 system with 32 GB of DRAM.
      
      The compaction_test.c program was spending most of its time doing mmap(),
      1 MB at a time, on about 25 GB of memory.
      
      Instead, do the mmaps 100 MB at a time.  (Going past 100 MB doesn't make
      things go much faster, because other parts of the program are using the
      remaining time.)
      Signed-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Acked-by: NSri Jayaramappa <sjayaram@akamai.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Link: https://lkml.kernel.org/r/20201002080621.551044-2-jhubbard@nvidia.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      11002620
    • R
      tools/testing/selftests/vm/hmm-tests.c: use the new SKIP() macro · bfe18a09
      Ralph Campbell 提交于
      Some tests might not be able to be run if resources like huge pages are
      not available.  Mark these tests as skipped instead of simply passing.
      Signed-off-by: NRalph Campbell <rcampbell@nvidia.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NJason Gunthorpe <jgg@nvidia.com>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Link: http://lkml.kernel.org/r/20200827190400.12608-1-rcampbell@nvidia.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bfe18a09
    • J
      selftests/vm: fix incorrect gcc invocation in some cases · 34d10913
      John Hubbard 提交于
      Avoid accidental wrong builds, due to built-in rules working just a little
      bit too well--but not quite as well as required for our situation here.
      
      In other words, "make userfaultfd" (for example) is supposed to fail to
      build at all, because this Makefile only supports either "make" (all), or
      "make /full/path".  However, the built-in rules, if not suppressed, will
      pick up CFLAGS and the initial LDLIBS (but not the target-specific LDLIBS,
      because those are only set for the full path target!).  This causes it to
      get pretty far into building things despite using incorrect values such as
      an *occasionally* incomplete LDLIBS value.
      Signed-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Link: https://lkml.kernel.org/r/20200915012901.1655280-3-jhubbard@nvidia.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      34d10913
    • J
      selftests/vm: fix false build success on the second and later attempts · efc9511c
      John Hubbard 提交于
      Patch series "selftests/vm: fix some minor aggravating factors in the Makefile".
      
      This fixes a couple of minor aggravating factors that I ran across while
      trying to do some changes in selftests/vm.  These are simple things, but
      like most things with GNU Make, it's rarely obvious what's wrong until you
      understand *the entire Makefile and all of its includes*.
      
      So while there is, of course, joy in learning those details, I thought I'd
      fix these little things, so as to allow others to skip out on the Joy if
      they so choose.  :)
      
      First of all, if you have an item (let's choose userfaultfd for an
      example) that fails to build, you might do this:
      
      $ make -j32
      
          # ...you observe a failed item in the threaded output
      
      # OK, let's get a closer look
      
      $ make
          # ...but now the build quietly "succeeds".
      
      That's what Patch 0001 fixes.
      
      Second, if you instead attempt this approach for your closer look (a casual
      mistake, as it's not supported):
      
      $ make userfaultfd
      
          # ...userfaultfd fails to link, due to incomplete LDLIBS
      
      That's what Patch 0002 fixes.
      
      This patch (of 2):
      
      If one or more of these selftest fail to build, then after the first
      failure, subsequent invocations of "make" will make it appear that there
      are no build failures, after all.
      
      That's because the failed build products remain, with up-to-date
      timestamps, thus tricking Make (and you!) into believing that there's
      nothing else to build.
      
      Fix this by telling Make to delete targets that didn't completely
      succeed.
      Signed-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Link: https://lkml.kernel.org/r/20200915012901.1655280-1-jhubbard@nvidia.com
      Link: https://lkml.kernel.org/r/20200915012901.1655280-2-jhubbard@nvidia.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      efc9511c
    • B
      mm/gup_benchmark: use pin_user_pages for FOLL_LONGTERM flag · 657d4f79
      Barry Song 提交于
      According to Documentation/core-api/pin_user_pages.rst, FOLL_PIN is a
      prerequisite to FOLL_LONGTERM.  Another way of saying that is,
      FOLL_LONGTERM is a specific case, more restrictive case of FOLL_PIN.
      
      Almost all kernel modules are using pin_user_pages() with FOLL_LONGTERM,
      mm/gup_benchmark.c seems to the only exception in which FOLL_PIN is not a
      prerequisite to FOLL_LONGTERM.
      Signed-off-by: NBarry Song <song.bao.hua@hisilicon.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NJohn Hubbard <jhubbard@nvidia.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jérôme Glisse <jglisse@redhat.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Mike Kravetz <mike.kravetz@oracle.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Link: http://lkml.kernel.org/r/20200815122056.29508-1-song.bao.hua@hisilicon.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      657d4f79
    • D
      device-dax: add dis-contiguous resource support · 60e93dc0
      Dan Williams 提交于
      Break the requirement that device-dax instances are physically contiguous.
      With this constraint removed it allows fragmented available capacity to
      be fully allocated.
      
      This capability is useful to mitigate the "noisy neighbor" problem with
      memory-side-cache management for virtual machines, or any other scenario
      where a platform address boundary also designates a performance boundary.
      For example a direct mapped memory side cache might rotate cache colors at
      1GB boundaries.  With dis-contiguous allocations a device-dax instance
      could be configured to contain only 1 cache color.
      
      It also satisfies Joao's use case (see link) for partitioning memory for
      exclusive guest access.  It allows for a future potential mode where the
      host kernel need not allocate 'struct page' capacity up-front.
      Reported-by: NJoao Martins <joao.m.martins@oracle.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Ard Biesheuvel <ardb@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Brice Goglin <Brice.Goglin@inria.fr>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Hulk Robot <hulkci@huawei.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Jason Gunthorpe <jgg@mellanox.com>
      Cc: Jason Yan <yanaijie@huawei.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: "Jérôme Glisse" <jglisse@redhat.com>
      Cc: Jia He <justin.he@arm.com>
      Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: kernel test robot <lkp@intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Stefano Stabellini <sstabellini@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/lkml/20200110190313.17144-1-joao.m.martins@oracle.com/
      Link: https://lkml.kernel.org/r/159643104304.4062302.16561669534797528660.stgit@dwillia2-desk3.amr.corp.intel.com
      Link: https://lkml.kernel.org/r/160106116875.30709.11456649969327399771.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      60e93dc0
    • D
      mm/memremap_pages: convert to 'struct range' · a4574f63
      Dan Williams 提交于
      The 'struct resource' in 'struct dev_pagemap' is only used for holding
      resource span information.  The other fields, 'name', 'flags', 'desc',
      'parent', 'sibling', and 'child' are all unused wasted space.
      
      This is in preparation for introducing a multi-range extension of
      devm_memremap_pages().
      
      The bulk of this change is unwinding all the places internal to libnvdimm
      that used 'struct resource' unnecessarily, and replacing instances of
      'struct dev_pagemap'.res with 'struct dev_pagemap'.range.
      
      P2PDMA had a minor usage of the resource flags field, but only to report
      failures with "%pR".  That is replaced with an open coded print of the
      range.
      
      [dan.carpenter@oracle.com: mm/hmm/test: use after free in dmirror_allocate_chunk()]
        Link: https://lkml.kernel.org/r/20200926121402.GA7467@kadamSigned-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>	[xen]
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Stefano Stabellini <sstabellini@kernel.org>
      Cc: "Jérôme Glisse" <jglisse@redhat.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Ard Biesheuvel <ardb@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brice Goglin <Brice.Goglin@inria.fr>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Hulk Robot <hulkci@huawei.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jason Gunthorpe <jgg@mellanox.com>
      Cc: Jason Yan <yanaijie@huawei.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: Jia He <justin.he@arm.com>
      Cc: Joao Martins <joao.m.martins@oracle.com>
      Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
      Cc: kernel test robot <lkp@intel.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lkml.kernel.org/r/159643103173.4062302.768998885691711532.stgit@dwillia2-desk3.amr.corp.intel.com
      Link: https://lkml.kernel.org/r/160106115761.30709.13539840236873663620.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a4574f63
    • D
      device-dax: make pgmap optional for instance creation · f5516ec5
      Dan Williams 提交于
      The passed in dev_pagemap is only required in the pmem case as the
      libnvdimm core may have reserved a vmem_altmap for dev_memremap_pages() to
      place the memmap in pmem directly.  In the hmem case there is no agent
      reserving an altmap so it can all be handled by a core internal default.
      
      Pass the resource range via a new @range property of 'struct
      dev_dax_data'.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
      Cc: Brice Goglin <Brice.Goglin@inria.fr>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Jia He <justin.he@arm.com>
      Cc: Joao Martins <joao.m.martins@oracle.com>
      Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Ard Biesheuvel <ardb@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Hulk Robot <hulkci@huawei.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jason Gunthorpe <jgg@mellanox.com>
      Cc: Jason Yan <yanaijie@huawei.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: "Jérôme Glisse" <jglisse@redhat.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: kernel test robot <lkp@intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Stefano Stabellini <sstabellini@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lkml.kernel.org/r/159643099958.4062302.10379230791041872886.stgit@dwillia2-desk3.amr.corp.intel.com
      Link: https://lkml.kernel.org/r/160106110513.30709.4303239334850606031.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f5516ec5
  6. 13 10月, 2020 1 次提交
  7. 12 10月, 2020 10 次提交
  8. 10 10月, 2020 4 次提交
  9. 09 10月, 2020 8 次提交