1. 31 Jan, 2020 2 commits
    • John Hubbard's avatar
      mm, tree-wide: rename put_user_page*() to unpin_user_page*() · f1f6a7dd
      John Hubbard authored
      In order to provide a clearer, more symmetric API for pinning and
      unpinning DMA pages.  This way, pin_user_pages*() calls match up with
      unpin_user_pages*() calls, and the API is a lot closer to being
      self-explanatory.
      
      Link: http://lkml.kernel.org/r/20200107224558.2362728-23-jhubbard@nvidia.com
      
      Signed-off-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Björn Töpel <bjorn.topel@intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Jason Gunthorpe <jgg@mellanox.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Leon Romanovsky <leonro@mellanox.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f1f6a7dd
    • John Hubbard's avatar
      IB/{core,hw,umem}: set FOLL_PIN via pin_user_pages*(), fix up ODP · dfa0a4ff
      John Hubbard authored
      Convert infiniband to use the new pin_user_pages*() calls.
      
      Also, revert earlier changes to Infiniband ODP that had it using
      put_user_page().  ODP is "Case 3" in
      Documentation/core-api/pin_user_pages.rst, which is to say, normal
      get_user_pages() and put_page() is the API to use there.
      
      The new pin_user_pages*() calls replace corresponding get_user_pages*()
      calls, and set the FOLL_PIN flag.  The FOLL_PIN flag requires that the
      caller must return the pages via put_user_page*() calls, but infiniband
      was already doing that as part of an earlier commit.
      
      Link: http://lkml.kernel.org/r/20200107224558.2362728-14-jhubbard@nvidia.com
      
      Signed-off-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Björn Töpel <bjorn.topel@intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Leon Romanovsky <leonro@mellanox.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dfa0a4ff
  2. 24 Sep, 2019 1 commit
    • akpm@linux-foundation.org's avatar
      mm/gup: add make_dirty arg to put_user_pages_dirty_lock() · 2d15eb31
      akpm@linux-foundation.org authored
      [11~From: John Hubbard <jhubbard@nvidia.com>
      Subject: mm/gup: add make_dirty arg to put_user_pages_dirty_lock()
      
      Patch series "mm/gup: add make_dirty arg to put_user_pages_dirty_lock()",
      v3.
      
      There are about 50+ patches in my tree [2], and I'll be sending out the
      remaining ones in a few more groups:
      
      * The block/bio related changes (Jerome mostly wrote those, but I've had
        to move stuff around extensively, and add a little code)
      
      * mm/ changes
      
      * other subsystem patches
      
      * an RFC that shows the current state of the tracking patch set.  That
        can only be applied after all call sites are converted, but it's good to
        get an early look at it.
      
      This is part a tree-wide conversion, as described in fc1d8e7c ("mm:
      introduce put_user_page*(), placeholder versions").
      
      This patch (of 3):
      
      Provide more capable variation of put_user_pages_dirty_lock(), and delete
      put_user_pages_dirty().  This is based on the following:
      
      1.  Lots of call sites become simpler if a bool is passed into
         put_user_page*(), instead of making the call site choose which
         put_user_page*() variant to call.
      
      2.  Christoph Hellwig's observation that set_page_dirty_lock() is
         usually correct, and set_page_dirty() is usually a bug, or at least
         questionable, within a put_user_page*() calling chain.
      
      This leads to the following API choices:
      
          * put_user_pages_dirty_lock(page, npages, make_dirty)
      
          * There is no put_user_pages_dirty(). You have to
            hand code that, in the rare case that it's
            required.
      
      [jhubbard@nvidia.com: remove unused variable in siw_free_plist()]
        Link: http://lkml.kernel.org/r/20190729074306.10368-1-jhubbard@nvidia.com
      Link: http://lkml.kernel.org/r/20190724044537.10458-2-jhubbard@nvidia.com
      
      Signed-off-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2d15eb31
  3. 27 May, 2019 1 commit
  4. 14 May, 2019 2 commits
  5. 07 Feb, 2019 2 commits
  6. 20 Apr, 2017 1 commit
  7. 02 Mar, 2017 1 commit
  8. 03 Aug, 2016 1 commit
    • Ira Weiny's avatar
      IB/hfi1: Make use of mm consistent · 3faa3d9a
      Ira Weiny authored
      
      
      The hfi1 driver registers a mmu_notifier callback when /dev/hfi1_* is
      opened, and unregisters it when the device is closed.  The driver
      incorrectly assumes that the close will always happen from the same
      context as the open.  In particular, closes due to SIGKILL or OOM killer
      activity may happen from a different context.  In these cases, the wrong
      mm is passed to mmu_notifier_unregister(), which causes improper reference
      counting for the victim mm, and eventual memory corruption.
      
      Preserve the mm for all open file descriptors and use this mm rather than
      current->mm for memory operations for the lifetime of that fd.  Note: this
      patch leaves 1 use of current->mm in place.  This use is removed in a
      follow on patch because other functional changes were required prior to
      that use being removed.
      
      If registration fails, there is no reason to keep the handler object
      around.  Free the handler object rather than add it to the list to
      prevent any mmu_notifier operations, including unregister, when
      registration fails.
      Suggested-by: default avatarJim Foraker <foraker1@llnl.gov>
      Reviewed-by: default avatarDean Luick <dean.luick@intel.com>
      Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      3faa3d9a
  9. 26 May, 2016 1 commit
  10. 21 Mar, 2016 2 commits
  11. 12 Mar, 2016 1 commit
  12. 11 Mar, 2016 1 commit
  13. 29 Feb, 2016 1 commit
    • Mitko Haralanov's avatar
      staging/hfi1: Enable TID caching feature · 0b091fb3
      Mitko Haralanov authored
      
      
      This commit "flips the switch" on the TID caching feature
      implemented in this patch series.
      
      As well as enabling the new feature by tying the new function
      with the PSM API, it also cleans up the old unneeded code,
      data structure members, and variables.
      
      Due to difference in operation and information, the tracing
      functions related to expected receives had to be changed. This
      patch include these changes.
      
      The tracing function changes could not be split into a separate
      commit without including both tracing variants at the same time.
      This would have caused other complications and ugliness.
      Signed-off-by: default avatarMitko Haralanov <mitko.haralanov@intel.com>
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      0b091fb3
  14. 21 Dec, 2015 1 commit
  15. 29 Aug, 2015 1 commit