From cca675430321400c8328ce534bdd358d29f4c71e Mon Sep 17 00:00:00 2001 From: Paul Jackson Date: Sun, 30 Oct 2005 15:02:32 -0800 Subject: [PATCH] --- yaml --- r: 11841 b: refs/heads/master c: 28a42b9ea7e42e1efb02cc2dcacba0b6af234e1b h: refs/heads/master i: 11839: c30a76aadf8f09de0bb4531a2bd137f63caa765c v: v3 --- [refs] | 2 +- trunk/mm/pdflush.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 386ef60ab83d..84427cb8e56e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 18a19cb3047e454ee5ecbc35d7acf3f8e09e0466 +refs/heads/master: 28a42b9ea7e42e1efb02cc2dcacba0b6af234e1b diff --git a/trunk/mm/pdflush.c b/trunk/mm/pdflush.c index d6781951267e..52822c98c489 100644 --- a/trunk/mm/pdflush.c +++ b/trunk/mm/pdflush.c @@ -20,6 +20,7 @@ #include // Needed by writeback.h #include // Prototypes pdflush_operation() #include +#include /* @@ -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); }