diff options
| author | Andrea Arcangeli <andrea@suse.de> | 2005-02-01 16:32:56 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-02-01 16:32:56 -0800 |
| commit | be1d0e0e574321dbc22da68f66c5dc01c811e126 (patch) | |
| tree | e987b4943db0b780da9623bb2e888137fe78a0e2 /include/linux | |
| parent | a10fdbe61b1b5143d2f36e03cd103e3d80e17842 (diff) | |
[PATCH] mm: oom-killer tunable
With <garloff@suse.de>
This is protect-pids, a patch to allow the admin to tune the oom killer.
The tweak is inherited between parent and child so it's easy to write a
wrapper for complex apps.
I made used_math a char at the light of later patches. Current patch
breaks alpha, but future patches will fix it.
Signed-off-by: Andrea Arcangeli <andrea@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index b15db5dc354c..1fa591147d9f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -614,7 +614,19 @@ struct task_struct { struct key *process_keyring; /* keyring private to this process (CLONE_THREAD) */ struct key *thread_keyring; /* keyring private to this thread */ #endif - unsigned short used_math; +/* + * Must be changed atomically so it shouldn't be + * be a shareable bitflag. + */ + unsigned char used_math; +/* + * OOM kill score adjustment (bit shift). + * Cannot live together with used_math since + * used_math and oomkilladj can be changed at the + * same time, so they would race if they're in the + * same atomic block. + */ + short oomkilladj; char comm[TASK_COMM_LEN]; /* file system info */ int link_count, total_link_count; |
