linux/drivers/hv
Linus Torvalds 2b09f480f0 A large overhaul of the restartable sequences and CID management:
The recent enablement of RSEQ in glibc resulted in regressions which are
   caused by the related overhead. It turned out that the decision to invoke
   the exit to user work was not really a decision. More or less each
   context switch caused that. There is a long list of small issues which
   sums up nicely and results in a 3-4% regression in I/O benchmarks.
 
   The other detail which caused issues due to extra work in context switch
   and task migration is the CID (memory context ID) management. It also
   requires to use a task work to consolidate the CID space, which is
   executed in the context of an arbitrary task and results in sporadic
   uncontrolled exit latencies.
 
   The rewrite addresses this by:
 
   - Removing deprecated and long unsupported functionality
 
   - Moving the related data into dedicated data structures which are
     optimized for fast path processing.
 
   - Caching values so actual decisions can be made
 
   - Replacing the current implementation with a optimized inlined variant.
 
   - Separating fast and slow path for architectures which use the generic
     entry code, so that only fault and error handling goes into the
     TIF_NOTIFY_RESUME handler.
 
   - Rewriting the CID management so that it becomes mostly invisible in the
     context switch path. That moves the work of switching modes into the
     fork/exit path, which is a reasonable tradeoff. That work is only
     required when a process creates more threads than the cpuset it is
     allowed to run on or when enough threads exit after that. An artificial
     thread pool benchmarks which triggers this did not degrade, it actually
     improved significantly.
 
     The main effect in migration heavy scenarios is that runqueue lock held
     time and therefore contention goes down significantly.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmksaRYTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoencEADA5he8PAFPmSRRPo6+2G5mHzWe8kIU
 5ZViQStWFNAA0qqy8VXryWiJ6qqrO6la9o7K4YOXASUtlkVjquRp1DF7PabqGwuy
 zshbRCXNlT51J8uqanN8VrGVjlf+bMdHDbGoI1SLkUTxG8b+kDD5PXUQE1ARelPP
 Slbg9u+EMrxj6D5MDTPbuW6TqryJEkPtiNScyOz43emp9ww9+WVxenOcRqU4D+Th
 mjWmrGIzkroSf4XReMoD/wg9TPTpUjXnNCwl2viY9JvBpkMfYtU4tJAGK3aNFOWy
 zsAN0O9CaFGrUEFne7qUmtwhNLdtnjx5HN5pe7yZd1EhdTuQKq4jPiiQnwwm8w72
 c0o6m45FNPmPoSyfaZWCkLjbTEUXonT9JF61iN35JVxim8gBDDJjHFKnLxDmLrH3
 X0eESE48ReY2EneDV6Y8RJRo6oG14Fccvc39aTf/2Rw3trpmtt2agvConQzupQIg
 DzANw4jhUUzFRrHrMHACNsqKFXh9ratue/S9DM3xxTpGO/bKdeK7jGIgzNf8O34M
 J0O6Hvk5jMdcWlIJTx21GoGzoSkkXnR49g/71aCcp+MwdY4x9zFz5SWi8LWQRmkx
 xRo6tY27Bma8/SEwMJjPpAUXDTpq6v+j3cPisybL1yGsyt9lh+p8LX7VUtwcoEqe
 6ZelC5Kgw/+/kg==
 =n5KT
 -----END PGP SIGNATURE-----

Merge tag 'core-rseq-2025-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull rseq updates from Thomas Gleixner:
 "A large overhaul of the restartable sequences and CID management:

  The recent enablement of RSEQ in glibc resulted in regressions which
  are caused by the related overhead. It turned out that the decision to
  invoke the exit to user work was not really a decision. More or less
  each context switch caused that. There is a long list of small issues
  which sums up nicely and results in a 3-4% regression in I/O
  benchmarks.

  The other detail which caused issues due to extra work in context
  switch and task migration is the CID (memory context ID) management.
  It also requires to use a task work to consolidate the CID space,
  which is executed in the context of an arbitrary task and results in
  sporadic uncontrolled exit latencies.

  The rewrite addresses this by:

   - Removing deprecated and long unsupported functionality

   - Moving the related data into dedicated data structures which are
     optimized for fast path processing.

   - Caching values so actual decisions can be made

   - Replacing the current implementation with a optimized inlined
     variant.

   - Separating fast and slow path for architectures which use the
     generic entry code, so that only fault and error handling goes into
     the TIF_NOTIFY_RESUME handler.

   - Rewriting the CID management so that it becomes mostly invisible in
     the context switch path. That moves the work of switching modes
     into the fork/exit path, which is a reasonable tradeoff. That work
     is only required when a process creates more threads than the
     cpuset it is allowed to run on or when enough threads exit after
     that. An artificial thread pool benchmarks which triggers this did
     not degrade, it actually improved significantly.

     The main effect in migration heavy scenarios is that runqueue lock
     held time and therefore contention goes down significantly"

* tag 'core-rseq-2025-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (54 commits)
  sched/mmcid: Switch over to the new mechanism
  sched/mmcid: Implement deferred mode change
  irqwork: Move data struct to a types header
  sched/mmcid: Provide CID ownership mode fixup functions
  sched/mmcid: Provide new scheduler CID mechanism
  sched/mmcid: Introduce per task/CPU ownership infrastructure
  sched/mmcid: Serialize sched_mm_cid_fork()/exit() with a mutex
  sched/mmcid: Provide precomputed maximal value
  sched/mmcid: Move initialization out of line
  signal: Move MMCID exit out of sighand lock
  sched/mmcid: Convert mm CID mask to a bitmap
  cpumask: Cache num_possible_cpus()
  sched/mmcid: Use cpumask_weighted_or()
  cpumask: Introduce cpumask_weighted_or()
  sched/mmcid: Prevent pointless work in mm_update_cpus_allowed()
  sched/mmcid: Move scheduler code out of global header
  sched: Fixup whitespace damage
  sched/mmcid: Cacheline align MM CID storage
  sched/mmcid: Use proper data structures
  sched/mmcid: Revert the complex CID management
  ...
2025-12-02 08:48:53 -08:00
..
Kconfig Drivers: hv: Make CONFIG_HYPERV bool 2025-10-01 00:00:45 +00:00
Makefile Drivers: hv: Make CONFIG_HYPERV bool 2025-10-01 00:00:45 +00:00
channel.c Drivers: hv: Simplify data structures for VMBus channel close message 2025-09-08 22:11:03 +00:00
channel_mgmt.c Drivers: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:43:52 +00:00
connection.c Drivers: hv: Use nested hypercall for post message and signal event 2025-07-15 06:24:16 +00:00
hv.c Drivers: hv: Use nested hypercall for post message and signal event 2025-07-15 06:24:16 +00:00
hv_balloon.c hv_balloon: update the NR_BALLOON_PAGES state 2025-03-21 22:03:13 -07:00
hv_common.c mshv: Add support for a new parent partition configuration 2025-09-08 22:10:51 +00:00
hv_debugfs.c
hv_kvp.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
hv_proc.c Drivers: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:43:52 +00:00
hv_snapshot.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
hv_trace.c
hv_trace.h
hv_trace_balloon.h
hv_util.c Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet 2024-12-09 18:44:15 +00:00
hv_utils_transport.c Drivers: hv: util: Cosmetic changes for hv_utils_transport.c 2025-09-08 22:10:55 +00:00
hv_utils_transport.h
hyperv_vmbus.h uio_hv_generic: Fix sysfs creation path for ring buffer 2025-05-02 13:59:02 +02:00
mshv.h mshv: Use common "entry virt" APIs to do work in root before running guest 2025-09-30 22:50:48 +00:00
mshv_common.c mshv: Use common "entry virt" APIs to do work in root before running guest 2025-09-30 22:50:48 +00:00
mshv_eventfd.c ARM: 2025-07-30 17:14:01 -07:00
mshv_eventfd.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_irq.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_portid_table.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_root.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_root_hv_call.c Drivers: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:43:52 +00:00
mshv_root_main.c A large overhaul of the restartable sequences and CID management: 2025-12-02 08:48:53 -08:00
mshv_synic.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
ring_buffer.c Drivers: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:43:52 +00:00
vmbus_drv.c Drivers: hv: vmbus: Fix typos in vmbus_drv.c 2025-09-30 23:31:00 +00:00