]>
git.karo-electronics.de Git - karo-tx-linux.git/log
David Rientjes [Fri, 16 Dec 2011 04:49:21 +0000 (15:49 +1100)]
cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask
Kernels where MAX_NUMNODES > BITS_PER_LONG may temporarily see an empty
nodemask in a tsk's mempolicy if its previous nodemask is remapped onto a
new set of allowed cpuset nodes where the two nodemasks, as a result of
the remap, are now disjoint.
c0ff7453bb5c ("cpuset,mm: fix no node to alloc memory when changing
cpuset's mems") adds get_mems_allowed() to prevent the set of allowed
nodes from changing for a thread. This causes any update to a set of
allowed nodes to stall until put_mems_allowed() is called.
This stall is unncessary, however, if at least one node remains unchanged
in the update to the set of allowed nodes. This was addressed by
89e8a244b97e ("cpusets: avoid looping when storing to mems_allowed if one
node remains set"), but it's still possible that an empty nodemask may be
read from a mempolicy because the old nodemask may be remapped to the new
nodemask during rebind. To prevent this, only avoid the stall if there is
no mempolicy for the thread being changed.
This is a temporary solution until all reads from mempolicy nodemasks can
be guaranteed to not be empty without the get_mems_allowed()
synchronization.
Also moves the check for nodemask intersection inside task_lock() so that
tsk->mems_allowed cannot change. This ensures that nothing can set this
tsk's mems_allowed out from under us and also protects tsk->mempolicy.
Reported-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Paul Menage <paul@paulmenage.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stephen Rothwell [Mon, 19 Dec 2011 07:03:12 +0000 (18:03 +1100)]
Merge remote-tracking branch 'uapi/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 07:00:40 +0000 (18:00 +1100)]
Merge remote-tracking branch 'kvmtool/master'
Conflicts:
include/net/9p/9p.h
scripts/kconfig/Makefile
Stephen Rothwell [Mon, 19 Dec 2011 06:46:36 +0000 (17:46 +1100)]
Merge remote-tracking branch 'remoteproc/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 06:39:27 +0000 (17:39 +1100)]
Merge remote-tracking branch 'memblock/memblock-kill-early_node_map'
Conflicts:
arch/arm/mm/init.c
arch/score/Kconfig
Stephen Rothwell [Mon, 19 Dec 2011 06:37:56 +0000 (17:37 +1100)]
Merge remote-tracking branch 'xshm/xshm-for-next'
Stephen Rothwell [Mon, 19 Dec 2011 06:34:48 +0000 (17:34 +1100)]
Merge remote-tracking branch 'kmap_atomic/kmap_atomic'
Conflicts:
Documentation/feature-removal-schedule.txt
Stephen Rothwell [Mon, 19 Dec 2011 06:28:07 +0000 (17:28 +1100)]
Merge remote-tracking branch 'vhost/linux-next'
Conflicts:
arch/hexagon/Kconfig
arch/m68k/Kconfig
Stephen Rothwell [Mon, 19 Dec 2011 06:26:36 +0000 (17:26 +1100)]
Merge remote-tracking branch 'pinctrl/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 06:20:12 +0000 (17:20 +1100)]
Merge remote-tracking branch 'writeback/writeback-for-next'
Stephen Rothwell [Mon, 19 Dec 2011 06:18:17 +0000 (17:18 +1100)]
Merge remote-tracking branch 'tmem/tmem'
Conflicts:
mm/swapfile.c
Stephen Rothwell [Mon, 19 Dec 2011 06:16:40 +0000 (17:16 +1100)]
Merge remote-tracking branch 'char-misc/char-misc-next'
Stephen Rothwell [Mon, 19 Dec 2011 06:15:02 +0000 (17:15 +1100)]
Merge remote-tracking branch 'staging/staging-next'
Conflicts:
drivers/hid/hid-hyperv.c
drivers/staging/hv/Kconfig
drivers/staging/hv/Makefile
drivers/staging/iio/adc/ad799x_core.c
Stephen Rothwell [Mon, 19 Dec 2011 06:09:22 +0000 (17:09 +1100)]
Merge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Mon, 19 Dec 2011 06:07:26 +0000 (17:07 +1100)]
Merge remote-tracking branch 'tty/tty-next'
Conflicts:
drivers/tty/serial/Kconfig
drivers/tty/serial/Makefile
Stephen Rothwell [Mon, 19 Dec 2011 06:00:35 +0000 (17:00 +1100)]
Merge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Mon, 19 Dec 2011 05:59:04 +0000 (16:59 +1100)]
Merge remote-tracking branch 'hsi/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 05:53:13 +0000 (16:53 +1100)]
Merge commit 'refs/next/
20111214 /regmap'
Conflicts:
drivers/base/regmap/regcache.c
drivers/base/regmap/regmap.c
Stephen Rothwell [Mon, 19 Dec 2011 05:40:42 +0000 (16:40 +1100)]
Merge remote-tracking branch 'namespace/master'
Stephen Rothwell [Mon, 19 Dec 2011 05:39:05 +0000 (16:39 +1100)]
Merge remote-tracking branch 'sysctl/master'
Stephen Rothwell [Mon, 19 Dec 2011 05:37:27 +0000 (16:37 +1100)]
Merge remote-tracking branch 'percpu/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 05:31:26 +0000 (16:31 +1100)]
Merge remote-tracking branch 'xen-two/linux-next'
Conflicts:
arch/x86/xen/Kconfig
Stephen Rothwell [Mon, 19 Dec 2011 05:29:48 +0000 (16:29 +1100)]
Merge remote-tracking branch 'xen/upstream/xen'
Conflicts:
arch/x86/xen/Kconfig
Stephen Rothwell [Mon, 19 Dec 2011 05:23:49 +0000 (16:23 +1100)]
Merge remote-tracking branch 'oprofile/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 05:16:59 +0000 (16:16 +1100)]
Merge remote-tracking branch 'kmemleak/kmemleak'
Stephen Rothwell [Mon, 19 Dec 2011 05:10:19 +0000 (16:10 +1100)]
Merge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 04:56:27 +0000 (15:56 +1100)]
Merge remote-tracking branch 'uprobes/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 04:49:27 +0000 (15:49 +1100)]
Merge remote-tracking branch 'tip/auto-latest'
Conflicts:
drivers/cpufreq/cpufreq_conservative.c
drivers/cpufreq/cpufreq_ondemand.c
drivers/macintosh/rack-meter.c
fs/proc/stat.c
fs/proc/uptime.c
kernel/sched/core.c
kernel/sched/fair.c
Stephen Rothwell [Mon, 19 Dec 2011 04:24:43 +0000 (15:24 +1100)]
Merge remote-tracking branch 'gpio/gpio/next'
Stephen Rothwell [Mon, 19 Dec 2011 04:23:11 +0000 (15:23 +1100)]
Merge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 04:20:04 +0000 (15:20 +1100)]
Merge remote-tracking branch 'fsnotify/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 04:18:32 +0000 (15:18 +1100)]
Merge remote-tracking branch 'apm/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 04:11:42 +0000 (15:11 +1100)]
Merge remote-tracking branch 'pm/linux-next'
Conflicts:
fs/xfs/xfs_buf.c
Stephen Rothwell [Mon, 19 Dec 2011 04:01:20 +0000 (15:01 +1100)]
Merge remote-tracking branch 'trivial/for-next'
Conflicts:
arch/powerpc/platforms/40x/Kconfig
Stephen Rothwell [Mon, 19 Dec 2011 04:01:10 +0000 (15:01 +1100)]
Merge remote-tracking branch 'osd/linux-next'
Stephen Rothwell [Mon, 19 Dec 2011 03:54:50 +0000 (14:54 +1100)]
Merge remote-tracking branch 'cputime/cputime'
Stephen Rothwell [Mon, 19 Dec 2011 03:51:35 +0000 (14:51 +1100)]
Merge remote-tracking branch 'iommu/next'
Conflicts:
drivers/pci/hotplug/acpiphp_glue.c
include/linux/pci_regs.h
Stephen Rothwell [Mon, 19 Dec 2011 03:49:58 +0000 (14:49 +1100)]
Merge remote-tracking branch 'watchdog/linux-next'
Stephen Rothwell [Mon, 19 Dec 2011 03:47:14 +0000 (14:47 +1100)]
Merge remote-tracking branch 'security/next'
Conflicts:
lib/Makefile
Stephen Rothwell [Mon, 19 Dec 2011 03:45:44 +0000 (14:45 +1100)]
Merge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 03:44:12 +0000 (14:44 +1100)]
Merge remote-tracking branch 'fbdev/fbdev-next'
Stephen Rothwell [Mon, 19 Dec 2011 03:39:23 +0000 (14:39 +1100)]
Merge remote-tracking branch 'drm/drm-next'
Conflicts:
drivers/gpu/drm/nouveau/nouveau_sgdma.c
Stephen Rothwell [Mon, 19 Dec 2011 03:35:10 +0000 (14:35 +1100)]
Merge remote-tracking branch 'mfd/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 03:33:41 +0000 (14:33 +1100)]
Merge remote-tracking branch 'md/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 03:32:08 +0000 (14:32 +1100)]
Merge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 03:31:59 +0000 (14:31 +1100)]
Merge remote-tracking branch 'kgdb/kgdb-next'
Stephen Rothwell [Mon, 19 Dec 2011 03:30:29 +0000 (14:30 +1100)]
Merge remote-tracking branch 'mmc/mmc-next'
Conflicts:
drivers/mmc/card/block.c
Stephen Rothwell [Mon, 19 Dec 2011 03:28:58 +0000 (14:28 +1100)]
Merge remote-tracking branch 'battery/master'
Stephen Rothwell [Mon, 19 Dec 2011 03:18:52 +0000 (14:18 +1100)]
Merge commit 'refs/next/
20111215 /block'
Stephen Rothwell [Mon, 19 Dec 2011 03:06:02 +0000 (14:06 +1100)]
Merge remote-tracking branch 'input/next'
Conflicts:
drivers/input/keyboard/samsung-keypad.c
Stephen Rothwell [Mon, 19 Dec 2011 03:04:34 +0000 (14:04 +1100)]
Merge branch 'quilt/rr'
Stephen Rothwell [Mon, 19 Dec 2011 03:03:09 +0000 (14:03 +1100)]
Merge remote-tracking branch 'cpufreq/next'
Stephen Rothwell [Mon, 19 Dec 2011 03:01:43 +0000 (14:01 +1100)]
Merge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 03:00:07 +0000 (14:00 +1100)]
Merge remote-tracking branch 'sound/for-next'
Conflicts:
arch/arm/mach-s3c64xx/mach-crag6410.c
Stephen Rothwell [Mon, 19 Dec 2011 02:58:31 +0000 (13:58 +1100)]
Merge remote-tracking branch 'crypto/master'
Stephen Rothwell [Mon, 19 Dec 2011 02:57:05 +0000 (13:57 +1100)]
Merge remote-tracking branch 'l2-mtd/master'
Conflicts:
drivers/mtd/maps/bcm963xx-flash.c
Stephen Rothwell [Mon, 19 Dec 2011 02:50:20 +0000 (13:50 +1100)]
Merge remote-tracking branch 'mtd/master'
Stephen Rothwell [Mon, 19 Dec 2011 02:48:52 +0000 (13:48 +1100)]
Merge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Mon, 19 Dec 2011 02:47:05 +0000 (13:47 +1100)]
Merge remote-tracking branch 'wireless-next/master'
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn.c
Stephen Rothwell [Mon, 19 Dec 2011 02:41:02 +0000 (13:41 +1100)]
Merge remote-tracking branch 'net-next/master'
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn.c
Stephen Rothwell [Mon, 19 Dec 2011 02:37:22 +0000 (13:37 +1100)]
Merge remote-tracking branch 'slave-dma/next'
Conflicts:
drivers/dma/pl330.c
Stephen Rothwell [Mon, 19 Dec 2011 01:58:36 +0000 (12:58 +1100)]
Merge remote-tracking branch 'target-merge/for-next-merge'
Stephen Rothwell [Mon, 19 Dec 2011 01:57:11 +0000 (12:57 +1100)]
Merge remote-tracking branch 'target-updates/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 01:55:26 +0000 (12:55 +1100)]
Merge remote-tracking branch 'scsi/master'
Stephen Rothwell [Mon, 19 Dec 2011 01:53:57 +0000 (12:53 +1100)]
Merge remote-tracking branch 'dlm/next'
Stephen Rothwell [Mon, 19 Dec 2011 01:52:32 +0000 (12:52 +1100)]
Merge remote-tracking branch 'ubi/linux-next'
Stephen Rothwell [Mon, 19 Dec 2011 01:50:34 +0000 (12:50 +1100)]
Merge remote-tracking branch 'libata/NEXT'
Stephen Rothwell [Mon, 19 Dec 2011 01:50:30 +0000 (12:50 +1100)]
Merge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 01:49:01 +0000 (12:49 +1100)]
Merge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 01:45:39 +0000 (12:45 +1100)]
Merge remote-tracking branch 'v4l-dvb/master'
Conflicts:
drivers/staging/media/as102/as102_drv.h
Stephen Rothwell [Mon, 19 Dec 2011 01:44:14 +0000 (12:44 +1100)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Mon, 19 Dec 2011 01:42:51 +0000 (12:42 +1100)]
Merge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Mon, 19 Dec 2011 01:41:27 +0000 (12:41 +1100)]
Merge remote-tracking branch 'bjdooks-i2c/next-i2c'
Conflicts:
drivers/i2c/busses/i2c-designware-platdrv.c
Stephen Rothwell [Mon, 19 Dec 2011 01:40:01 +0000 (12:40 +1100)]
Merge branch 'quilt/i2c'
Stephen Rothwell [Mon, 19 Dec 2011 01:34:12 +0000 (12:34 +1100)]
Merge commit 'refs/next/
20111216 /hid'
Stephen Rothwell [Mon, 19 Dec 2011 01:23:38 +0000 (12:23 +1100)]
Merge remote-tracking branch 'pci/linux-next'
Stephen Rothwell [Mon, 19 Dec 2011 00:49:47 +0000 (11:49 +1100)]
Merge remote-tracking branch 'xfs/master'
Stephen Rothwell [Mon, 19 Dec 2011 00:48:25 +0000 (11:48 +1100)]
Merge remote-tracking branch 'ubifs/linux-next'
Stephen Rothwell [Mon, 19 Dec 2011 00:46:55 +0000 (11:46 +1100)]
Merge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Mon, 19 Dec 2011 00:45:35 +0000 (11:45 +1100)]
Merge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Mon, 19 Dec 2011 00:44:12 +0000 (11:44 +1100)]
Merge remote-tracking branch 'logfs/master'
Conflicts:
fs/logfs/file.c
Stephen Rothwell [Mon, 19 Dec 2011 00:42:36 +0000 (11:42 +1100)]
Merge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Mon, 19 Dec 2011 00:41:14 +0000 (11:41 +1100)]
Merge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 00:41:10 +0000 (11:41 +1100)]
Merge remote-tracking branch 'ecryptfs/next'
Stephen Rothwell [Mon, 19 Dec 2011 00:39:43 +0000 (11:39 +1100)]
Merge remote-tracking branch 'xtensa/master'
Stephen Rothwell [Mon, 19 Dec 2011 00:38:17 +0000 (11:38 +1100)]
Merge remote-tracking branch 's390/features'
Stephen Rothwell [Mon, 19 Dec 2011 00:38:00 +0000 (11:38 +1100)]
Merge remote-tracking branch '52xx-and-virtex/powerpc/next'
Stephen Rothwell [Mon, 19 Dec 2011 00:35:39 +0000 (11:35 +1100)]
Merge remote-tracking branch '4xx/next'
Conflicts:
arch/powerpc/platforms/40x/ppc40x_simple.c
Stephen Rothwell [Mon, 19 Dec 2011 00:33:17 +0000 (11:33 +1100)]
Merge remote-tracking branch 'powerpc/next'
Stephen Rothwell [Mon, 19 Dec 2011 00:31:51 +0000 (11:31 +1100)]
Merge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 00:30:00 +0000 (11:30 +1100)]
Merge remote-tracking branch 'mips/mips-for-linux-next'
Conflicts:
arch/mips/kernel/perf_event_mipsxx.c
Stephen Rothwell [Mon, 19 Dec 2011 00:28:35 +0000 (11:28 +1100)]
Merge remote-tracking branch 'm68knommu/for-next'
Conflicts:
arch/m68k/Kconfig.debug
Stephen Rothwell [Mon, 19 Dec 2011 00:27:13 +0000 (11:27 +1100)]
Merge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 00:25:50 +0000 (11:25 +1100)]
Merge remote-tracking branch 'ia64/next'
Stephen Rothwell [Mon, 19 Dec 2011 00:24:29 +0000 (11:24 +1100)]
Merge branch 'quilt/hexagon'
Stephen Rothwell [Mon, 19 Dec 2011 00:22:49 +0000 (11:22 +1100)]
Merge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Mon, 19 Dec 2011 00:17:28 +0000 (11:17 +1100)]
Merge remote-tracking branch 'c6x/for-linux-next'
Stephen Rothwell [Mon, 19 Dec 2011 00:16:08 +0000 (11:16 +1100)]
Merge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Mon, 19 Dec 2011 00:14:49 +0000 (11:14 +1100)]
Merge remote-tracking branch 'tegra/for-next'
Conflicts:
arch/arm/mach-tegra/board-dt-tegra20.c
arch/arm/mach-tegra/common.c
Stephen Rothwell [Mon, 19 Dec 2011 00:01:51 +0000 (11:01 +1100)]
Merge remote-tracking branch 's5p/for-next'
Conflicts:
arch/arm/mach-exynos/cpu.c
arch/arm/mach-exynos/include/mach/entry-macro.S