devfs - Clean up some SMP inefficiencies
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 15 Feb 2020 00:01:09 +0000 (16:01 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 28 Feb 2020 17:10:18 +0000 (09:10 -0800)
commit387d2e2917226c0552942da3a77ce8e9a965080d
tree8c8d5b1e963eccba5de245f9b7cde6fd80213a7e
parentd39ab8826d047c0f3ccb3d180a08f80e49a6023d
devfs - Clean up some SMP inefficiencies

* We don't need the devfs master lock around a setattr call.  This
  fixes the open(O_CREAT|O_TRUNC) path for redirects to e.g. /dev/null,
  which is used all over the place in ports builds.

* The devfs spec open (open() again) path can obtain the devfs master
  lock shared instead of exclusive, except in the cloning case.
  This significantly reduces stalls during heavily concurrent bulk
  builds.
sys/vfs/devfs/devfs_vnops.c