diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-10-31 10:06:46 +0000 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-10-31 10:06:46 +0000 |
commit | 1f04c0a24b2f3cfe89c802a24396263623e3512d (patch) | |
tree | d7e2216b6e65b833c0c2b79b478d13ce17dbf296 /mm/pdflush.c | |
parent | 07b188ab773e183871e57b33ae37bf635c9f12ba (diff) | |
parent | e2f2e58e7968f8446b1078a20a18bf8ea12b4fbc (diff) | |
download | talos-op-linux-1f04c0a24b2f3cfe89c802a24396263623e3512d.tar.gz talos-op-linux-1f04c0a24b2f3cfe89c802a24396263623e3512d.zip |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'mm/pdflush.c')
-rw-r--r-- | mm/pdflush.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mm/pdflush.c b/mm/pdflush.c index d6781951267e..52822c98c489 100644 --- a/mm/pdflush.c +++ b/mm/pdflush.c @@ -20,6 +20,7 @@ #include <linux/fs.h> // Needed by writeback.h #include <linux/writeback.h> // Prototypes pdflush_operation() #include <linux/kthread.h> +#include <linux/cpuset.h> /* @@ -170,12 +171,24 @@ static int __pdflush(struct pdflush_work *my_work) static int pdflush(void *dummy) { struct pdflush_work my_work; + cpumask_t cpus_allowed; /* * pdflush can spend a lot of time doing encryption via dm-crypt. We * don't want to do that at keventd's priority. */ set_user_nice(current, 0); + + /* + * Some configs put our parent kthread in a limited cpuset, + * which kthread() overrides, forcing cpus_allowed == CPU_MASK_ALL. + * Our needs are more modest - cut back to our cpusets cpus_allowed. + * This is needed as pdflush's are dynamically created and destroyed. + * The boottime pdflush's are easily placed w/o these 2 lines. + */ + cpus_allowed = cpuset_cpus_allowed(current); + set_cpus_allowed(current, cpus_allowed); + return __pdflush(&my_work); } |