Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11841
b: refs/heads/master
c: 28a42b9
h: refs/heads/master
i:
  11839: c30a76a
v: v3
  • Loading branch information
Paul Jackson authored and Linus Torvalds committed Oct 31, 2005
1 parent 4fadc42 commit cca6754
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18a19cb3047e454ee5ecbc35d7acf3f8e09e0466
refs/heads/master: 28a42b9ea7e42e1efb02cc2dcacba0b6af234e1b
13 changes: 13 additions & 0 deletions trunk/mm/pdflush.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>


/*
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit cca6754

Please sign in to comment.