diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-07-03 09:30:05 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2009-07-29 17:30:38 -0400 |
| commit | 5b6e135f5e1e9e5586ad69e35c96494a4b413a00 (patch) | |
| tree | 466130cdd4af3610f62ec393f427ea36d5b76511 /include/linux | |
| parent | 0a930ce98838ed0a03530fd4960eb3423c9b55bc (diff) | |
sched: mmdrop needs to be delayed on -rt
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mm_types.h | 3 | ||||
| -rw-r--r-- | include/linux/sched.h | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 7acc8439d9b3..bd799364147a 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -247,6 +247,9 @@ struct mm_struct { | |||
| 247 | /* Architecture-specific MM context */ | 247 | /* Architecture-specific MM context */ |
| 248 | mm_context_t context; | 248 | mm_context_t context; |
| 249 | 249 | ||
| 250 | /* realtime bits */ | ||
| 251 | struct list_head delayed_drop; | ||
| 252 | |||
| 250 | /* Swap token stuff */ | 253 | /* Swap token stuff */ |
| 251 | /* | 254 | /* |
| 252 | * Last value of global fault stamp as seen by this process. | 255 | * Last value of global fault stamp as seen by this process. |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2e5be662deef..ba941e448176 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -2111,12 +2111,20 @@ extern struct mm_struct * mm_alloc(void); | |||
| 2111 | 2111 | ||
| 2112 | /* mmdrop drops the mm and the page tables */ | 2112 | /* mmdrop drops the mm and the page tables */ |
| 2113 | extern void __mmdrop(struct mm_struct *); | 2113 | extern void __mmdrop(struct mm_struct *); |
| 2114 | extern void __mmdrop_delayed(struct mm_struct *); | ||
| 2115 | |||
| 2114 | static inline void mmdrop(struct mm_struct * mm) | 2116 | static inline void mmdrop(struct mm_struct * mm) |
| 2115 | { | 2117 | { |
| 2116 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) | 2118 | if (unlikely(atomic_dec_and_test(&mm->mm_count))) |
| 2117 | __mmdrop(mm); | 2119 | __mmdrop(mm); |
| 2118 | } | 2120 | } |
| 2119 | 2121 | ||
| 2122 | static inline void mmdrop_delayed(struct mm_struct * mm) | ||
| 2123 | { | ||
| 2124 | if (atomic_dec_and_test(&mm->mm_count)) | ||
| 2125 | __mmdrop_delayed(mm); | ||
| 2126 | } | ||
| 2127 | |||
| 2120 | /* mmput gets rid of the mappings and all user-space */ | 2128 | /* mmput gets rid of the mappings and all user-space */ |
| 2121 | extern void mmput(struct mm_struct *); | 2129 | extern void mmput(struct mm_struct *); |
| 2122 | /* Grab a reference to a task's mm, if it is not already going away */ | 2130 | /* Grab a reference to a task's mm, if it is not already going away */ |
