Merge branch 'akpm' (patches from Andrew)
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2022 23:11:53 +0000 (16:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2022 23:11:53 +0000 (16:11 -0700)
Merge updates from Andrew Morton:

 - A few misc subsystems: kthread, scripts, ntfs, ocfs2, block, and vfs

 - Most the MM patches which precede the patches in Willy's tree: kasan,
   pagecache, gup, swap, shmem, memcg, selftests, pagemap, mremap,
   sparsemem, vmalloc, pagealloc, memory-failure, mlock, hugetlb,
   userfaultfd, vmscan, compaction, mempolicy, oom-kill, migration, thp,
   cma, autonuma, psi, ksm, page-poison, madvise, memory-hotplug, rmap,
   zswap, uaccess, ioremap, highmem, cleanups, kfence, hmm, and damon.

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (227 commits)
  mm/damon/sysfs: remove repeat container_of() in damon_sysfs_kdamond_release()
  Docs/ABI/testing: add DAMON sysfs interface ABI document
  Docs/admin-guide/mm/damon/usage: document DAMON sysfs interface
  selftests/damon: add a test for DAMON sysfs interface
  mm/damon/sysfs: support DAMOS stats
  mm/damon/sysfs: support DAMOS watermarks
  mm/damon/sysfs: support schemes prioritization
  mm/damon/sysfs: support DAMOS quotas
  mm/damon/sysfs: support DAMON-based Operation Schemes
  mm/damon/sysfs: support the physical address space monitoring
  mm/damon/sysfs: link DAMON for virtual address spaces monitoring
  mm/damon: implement a minimal stub for sysfs-based DAMON interface
  mm/damon/core: add number of each enum type values
  mm/damon/core: allow non-exclusive DAMON start/stop
  Docs/damon: update outdated term 'regions update interval'
  Docs/vm/damon/design: update DAMON-Idle Page Tracking interference handling
  Docs/vm/damon: call low level monitoring primitives the operations
  mm/damon: remove unnecessary CONFIG_DAMON option
  mm/damon/paddr,vaddr: remove damon_{p,v}a_{target_valid,set_operations}()
  mm/damon/dbgfs-test: fix is_target_id() change
  ...

33 files changed:
1  2 
Documentation/admin-guide/kernel-parameters.txt
Documentation/admin-guide/sysctl/kernel.rst
MAINTAINERS
arch/arm/Kconfig
arch/arm64/mm/hugetlbpage.c
arch/x86/Kconfig
arch/x86/kernel/cpu/mce/core.c
block/bdev.c
block/bfq-iosched.c
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_req.c
fs/btrfs/inode.c
fs/buffer.c
fs/cifs/cifsfs.c
fs/erofs/super.c
fs/ext4/super.c
fs/f2fs/compress.c
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c
fs/f2fs/super.c
fs/fs-writeback.c
fs/nilfs2/segbuf.c
fs/xfs/xfs_buf.c
fs/zonefs/super.c
include/linux/fs.h
include/linux/sched.h
include/linux/sched/sysctl.h
kernel/sched/core.c
kernel/sysctl.c
mm/Kconfig
mm/page_io.c
mm/usercopy.c

index 2d1b8c1ea2e81a5599f8eb442593bd84692a2214,fdfd2b6848220b56b006806da997c569b36df6ea..803c60bf21d3b9c958141971d64d0729c4c5043f
@@@ -609,8 -616,56 +616,13 @@@ being accessed should be migrated to a 
  The unmapping of pages and trapping faults incur additional overhead that
  ideally is offset by improved memory locality but there is no universal
  guarantee. If the target workload is already bound to NUMA nodes then this
 -feature should be disabled. Otherwise, if the system overhead from the
 -feature is too high then the rate the kernel samples for NUMA hinting
 -faults may be controlled by the `numa_balancing_scan_period_min_ms,
 -numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms,
 -numa_balancing_scan_size_mb`_, and numa_balancing_settle_count sysctls.
 +feature should be disabled.
  
 -numa_balancing_scan_period_min_ms, numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms, numa_balancing_scan_size_mb
 -===============================================================================================================================
 -
 -
 -Automatic NUMA balancing scans tasks address space and unmaps pages to
 -detect if pages are properly placed or if the data should be migrated to a
 -memory node local to where the task is running.  Every "scan delay" the task
 -scans the next "scan size" number of pages in its address space. When the
 -end of the address space is reached the scanner restarts from the beginning.
 -
 -In combination, the "scan delay" and "scan size" determine the scan rate.
 -When "scan delay" decreases, the scan rate increases.  The scan delay and
 -hence the scan rate of every task is adaptive and depends on historical
 -behaviour. If pages are properly placed then the scan delay increases,
 -otherwise the scan delay decreases.  The "scan size" is not adaptive but
 -the higher the "scan size", the higher the scan rate.
 -
 -Higher scan rates incur higher system overhead as page faults must be
 -trapped and potentially data must be migrated. However, the higher the scan
 -rate, the more quickly a tasks memory is migrated to a local node if the
 -workload pattern changes and minimises performance impact due to remote
 -memory accesses. These sysctls control the thresholds for scan delays and
 -the number of pages scanned.
 -
 -``numa_balancing_scan_period_min_ms`` is the minimum time in milliseconds to
 -scan a tasks virtual memory. It effectively controls the maximum scanning
 -rate for each task.
 -
 -``numa_balancing_scan_delay_ms`` is the starting "scan delay" used for a task
 -when it initially forks.
 -
 -``numa_balancing_scan_period_max_ms`` is the maximum time in milliseconds to
 -scan a tasks virtual memory. It effectively controls the minimum scanning
 -rate for each task.
 -
 -``numa_balancing_scan_size_mb`` is how many megabytes worth of pages are
 -scanned for a given scan.
 -
 -
+ Or NUMA_BALANCING_MEMORY_TIERING to optimize page placement among
+ different types of memory (represented as different NUMA nodes) to
+ place the hot pages in the fast memory.  This is implemented based on
+ unmapping and page fault too.
  oops_all_cpu_backtrace
  ======================
  
diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
index 42a3a736436f97fe37b519d494e34f05c532ea62,37372cd5c9a71dc582e0219d6136509e2cd52bd4..61e511c518903e9ed8b74af6ed15e64546c69510
@@@ -119,9 -118,9 +119,10 @@@ config X8
        select ARCH_WANT_DEFAULT_BPF_JIT        if X86_64
        select ARCH_WANTS_DYNAMIC_TASK_STRUCT
        select ARCH_WANTS_NO_INSTR
+       select ARCH_WANT_GENERAL_HUGETLB
        select ARCH_WANT_HUGE_PMD_SHARE
        select ARCH_WANT_LD_ORPHAN_WARN
 +      select ARCH_WANTS_RT_DELAYED_SIGNALS
        select ARCH_WANTS_THP_SWAP              if X86_64
        select ARCH_HAS_PARANOID_L1D_FLUSH
        select BUILDTIME_TABLE_SORT
Simple merge
diff --cc block/bdev.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/buffer.c
Simple merge
Simple merge
Simple merge
diff --cc fs/ext4/super.c
Simple merge
Simple merge
diff --cc fs/f2fs/data.c
Simple merge
diff --cc fs/f2fs/f2fs.h
Simple merge
Simple merge
diff --cc fs/f2fs/super.c
Simple merge
Simple merge
index a3bb0c856ec8087a4acf3d0f1902987a7a224569,f4b57bc0c5861d2de41faddcac15528ee350285b..1362ccb64ec7d0e2086f8efeb3a8dac277b8b5a8
@@@ -337,21 -337,10 +337,9 @@@ static void nilfs_end_bio_write(struct 
  }
  
  static int nilfs_segbuf_submit_bio(struct nilfs_segment_buffer *segbuf,
 -                                 struct nilfs_write_info *wi, int mode,
 -                                 int mode_flags)
 +                                 struct nilfs_write_info *wi)
  {
        struct bio *bio = wi->bio;
-       int err;
-       if (segbuf->sb_nbio > 0 &&
-           bdi_write_congested(segbuf->sb_super->s_bdi)) {
-               wait_for_completion(&segbuf->sb_bio_event);
-               segbuf->sb_nbio--;
-               if (unlikely(atomic_read(&segbuf->sb_err))) {
-                       bio_put(bio);
-                       err = -EIO;
-                       goto failed;
-               }
-       }
  
        bio->bi_end_io = nilfs_end_bio_write;
        bio->bi_private = segbuf;
        wi->nr_vecs = min(wi->max_pages, wi->rest_blocks);
        wi->start = wi->end;
        return 0;
-  failed:
-       wi->bio = NULL;
-       return err;
  }
  
 -/**
 - * nilfs_alloc_seg_bio - allocate a new bio for writing log
 - * @nilfs: nilfs object
 - * @start: start block number of the bio
 - * @nr_vecs: request size of page vector.
 - *
 - * Return Value: On success, pointer to the struct bio is returned.
 - * On error, NULL is returned.
 - */
 -static struct bio *nilfs_alloc_seg_bio(struct the_nilfs *nilfs, sector_t start,
 -                                     int nr_vecs)
 -{
 -      struct bio *bio;
 -
 -      bio = bio_alloc(GFP_NOIO, nr_vecs);
 -      if (likely(bio)) {
 -              bio_set_dev(bio, nilfs->ns_bdev);
 -              bio->bi_iter.bi_sector =
 -                      start << (nilfs->ns_blocksize_bits - 9);
 -      }
 -      return bio;
 -}
 -
  static void nilfs_segbuf_prepare_write(struct nilfs_segment_buffer *segbuf,
                                       struct nilfs_write_info *wi)
  {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc kernel/sysctl.c
Simple merge
diff --cc mm/Kconfig
Simple merge
diff --cc mm/page_io.c
Simple merge
diff --cc mm/usercopy.c
Simple merge