1. 30 May, 2024 3 commits
  2. 24 May, 2024 2 commits
    • Scott Mayhew's avatar
      nfs: don't invalidate dentries on transient errors · 0c8c7c55
      Scott Mayhew authored
      This is a slight variation on a patch previously proposed by Neil Brown
      that never got merged.
      
      Prior to commit 5ceb9d7f ("NFS: Refactor nfs_lookup_revalidate()"),
      any error from nfs_lookup_verify_inode() other than -ESTALE would result
      in nfs_lookup_revalidate() returning that error (-ESTALE is mapped to
      zero).
      
      Since that commit, all errors result in nfs_lookup_revalidate()
      returning zero, resulting in dentries being invalidated where they
      previously were not (particularly in the case of -ERESTARTSYS).
      
      Fix it by passing the actual error code to nfs_lookup_revalidate_done(),
      and leaving the decision on whether to  map the error code to zero or
      one to nfs_lookup_revalidate_done().
      
      A simple reproducer is to run the following python code in a
      subdirectory of an NFS mount (not in the root of the NFS mount):
      
      ---8<---
      import os
      import multiprocessing
      import time
      
      if __name__=="__main__":
          multiprocessing.set_start_method("spawn")
      
          count = 0
          while True:
              try:
                  os.getcwd()
                  pool = multiprocessing.Pool(10)
                  pool.close()
                  pool.terminate()
                  count += 1
              except Exception as e:
                  print(f"Failed after {count} iterations")
                  print(e)
                  break
      ---8<---
      
      Prior to commit 5ceb9d7f, the above code would run indefinitely.
      After commit 5ceb9d7f, it fails almost immediately with -ENOENT.
      Signed-off-by: default avatarScott Mayhew <smayhew@redhat.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      0c8c7c55
    • Jan Kara's avatar
      nfs: Avoid flushing many pages with NFS_FILE_SYNC · a527c3ba
      Jan Kara authored
      When we are doing WB_SYNC_ALL writeback, nfs submits write requests with
      NFS_FILE_SYNC flag to the server (which then generally treats it as an
      O_SYNC write). This helps to reduce latency for single requests but when
      submitting more requests, additional fsyncs on the server side hurt
      latency. NFS generally avoids this additional overhead by not setting
      NFS_FILE_SYNC if desc->pg_moreio is set.
      
      However this logic doesn't always work. When we do random 4k writes to a huge
      file and then call fsync(2), each page writeback is going to be sent with
      NFS_FILE_SYNC because after preparing one page for writeback, we start writing
      back next, nfs_do_writepage() will call nfs_pageio_cond_complete() which finds
      the page is not contiguous with previously prepared IO and submits is *without*
      setting desc->pg_moreio.  Hence NFS_FILE_SYNC is used resulting in poor
      performance.
      
      Fix the problem by setting desc->pg_moreio in nfs_pageio_cond_complete() before
      submitting outstanding IO. This improves throughput of
      fsync-after-random-writes on my test SSD from ~70MB/s to ~250MB/s.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      a527c3ba
  3. 22 May, 2024 3 commits
  4. 21 May, 2024 4 commits
  5. 20 May, 2024 11 commits
  6. 12 May, 2024 5 commits
  7. 11 May, 2024 10 commits
  8. 10 May, 2024 2 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-05-11' of https://gitlab.freedesktop.org/drm/kernel · cf87f46f
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This should be the last set of fixes for 6.9, i915, xe and amdgpu are
        the bulk here, one of the previous nouveau fixes turned up an issue,
        so reverting it, otherwise one core and a couple of meson fixes.
      
        core:
         - fix connector debugging output
      
        i915:
         - Automate CCS Mode setting during engine resets
         - Fix audio time stamp programming for DP
         - Fix parsing backlight BDB data
      
        xe:
         - Fix use zero-length element array
         - Move more from system wq to ordered private wq
         - Do not ignore return for drmm_mutex_init
      
        amdgpu:
         - DCN 3.5 fix
         - MST DSC fixes
         - S0i3 fix
         - S4 fix
         - HDP MMIO mapping fix
         - Fix a regression in visible vram handling
      
        amdkfd:
         - Spatial partition fix
      
        meson:
         - dw-hdmi: power-up fixes
         - dw-hdmi: add badngap setting for g12
      
        nouveau:
         - revert SG_DEBUG fix that has a side effect"
      
      * tag 'drm-fixes-2024-05-11' of https://gitlab.freedesktop.org/drm/kernel:
        Revert "drm/nouveau/firmware: Fix SG_DEBUG error with nvkm_firmware_ctor()"
        drm/amdgpu: Fix comparison in amdgpu_res_cpu_visible
        drm/amdkfd: don't allow mapping the MMIO HDP page with large pages
        drm/xe: Use ordered WQ for G2H handler
        drm/xe/guc: Check error code when initializing the CT mutex
        drm/xe/ads: Use flexible-array
        Revert "drm/amdkfd: Add partition id field to location_id"
        dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users
        drm/amd/display: MST DSC check for older devices
        drm/amd/display: Fix idle optimization checks for multi-display and dual eDP
        drm/amd/display: Fix DSC-re-computing
        drm/amd/display: Enable urgent latency adjustments for DCN35
        drm/connector: Add \n to message about demoting connector force-probes
        drm/i915/bios: Fix parsing backlight BDB data
        drm/i915/audio: Fix audio time stamp programming for DP
        drm/i915/gt: Automate CCS Mode setting during engine resets
        drm/meson: dw-hdmi: add bandgap setting for g12
        drm/meson: dw-hdmi: power up phy on device init
      cf87f46f
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-05-10-13-14' of... · c22c3e07
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-05-10-13-14' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull MM fixes from Andrew Morton:
       "18 hotfixes, 7 of which are cc:stable.
      
        More fixups for this cycle's page_owner updates. And a few userfaultfd
        fixes. Otherwise, random singletons - see the individual changelogs
        for details"
      
      * tag 'mm-hotfixes-stable-2024-05-10-13-14' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mailmap: add entry for Barry Song
        selftests/mm: fix powerpc ARCH check
        mailmap: add entry for John Garry
        XArray: set the marks correctly when splitting an entry
        selftests/vDSO: fix runtime errors on LoongArch
        selftests/vDSO: fix building errors on LoongArch
        mm,page_owner: don't remove __GFP_NOLOCKDEP in add_stack_record_to_list
        fs/proc/task_mmu: fix uffd-wp confusion in pagemap_scan_pmd_entry()
        fs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan
        mm/vmalloc: fix return value of vb_alloc if size is 0
        mm: use memalloc_nofs_save() in page_cache_ra_order()
        kmsan: compiler_types: declare __no_sanitize_or_inline
        lib/test_xarray.c: fix error assumptions on check_xa_multi_store_adv_add()
        tools: fix userspace compilation with new test_xarray changes
        MAINTAINERS: update URL's for KEYS/KEYRINGS_INTEGRITY and TPM DEVICE DRIVER
        mm: page_owner: fix wrong information in dump_page_owner
        maple_tree: fix mas_empty_area_rev() null pointer dereference
        mm/userfaultfd: reset ptes when close() for wr-protected ones
      c22c3e07