Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1711575 > unrolled thread
| Started by | David Rientjes <rientjes@google.com> |
|---|---|
| First post | 2017-08-15 02:40 +0200 |
| Last post | 2017-08-15 07:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[patch] mm, oom: remove unused mmput_async David Rientjes <rientjes@google.com> - 2017-08-15 02:40 +0200
Re: [patch] mm, oom: remove unused mmput_async Michal Hocko <mhocko@kernel.org> - 2017-08-15 07:50 +0200
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Date | 2017-08-15 02:40 +0200 |
| Subject | [patch] mm, oom: remove unused mmput_async |
| Message-ID | <uey3L-2Df-9@gated-at.bofh.it> |
After "mm: oom: let oom_reap_task and exit_mmap to run concurrently",
mmput_async() is no longer used. Remove it.
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: David Rientjes <rientjes@google.com>
---
include/linux/sched/mm.h | 6 ------
kernel/fork.c | 16 ----------------
2 files changed, 22 deletions(-)
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
--- a/include/linux/sched/mm.h
+++ b/include/linux/sched/mm.h
@@ -84,12 +84,6 @@ static inline bool mmget_not_zero(struct mm_struct *mm)
/* mmput gets rid of the mappings and all user-space */
extern void mmput(struct mm_struct *);
-#ifdef CONFIG_MMU
-/* same as above but performs the slow path from the async context. Can
- * be called from the atomic context as well
- */
-extern void mmput_async(struct mm_struct *);
-#endif
/* Grab a reference to a task's mm, if it is not already going away */
extern struct mm_struct *get_task_mm(struct task_struct *task);
diff --git a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -925,22 +925,6 @@ void mmput(struct mm_struct *mm)
}
EXPORT_SYMBOL_GPL(mmput);
-#ifdef CONFIG_MMU
-static void mmput_async_fn(struct work_struct *work)
-{
- struct mm_struct *mm = container_of(work, struct mm_struct, async_put_work);
- __mmput(mm);
-}
-
-void mmput_async(struct mm_struct *mm)
-{
- if (atomic_dec_and_test(&mm->mm_users)) {
- INIT_WORK(&mm->async_put_work, mmput_async_fn);
- schedule_work(&mm->async_put_work);
- }
-}
-#endif
-
/**
* set_mm_exe_file - change a reference to the mm's executable file
*
[toc] | [next] | [standalone]
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Date | 2017-08-15 07:50 +0200 |
| Message-ID | <ueCTM-5Ho-5@gated-at.bofh.it> |
| In reply to | #1711575 |
On Mon 14-08-17 17:34:32, David Rientjes wrote:
> After "mm: oom: let oom_reap_task and exit_mmap to run concurrently",
> mmput_async() is no longer used. Remove it.
>
> Cc: Andrea Arcangeli <aarcange@redhat.com>
> Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Thanks!
> ---
> include/linux/sched/mm.h | 6 ------
> kernel/fork.c | 16 ----------------
> 2 files changed, 22 deletions(-)
>
> diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
> --- a/include/linux/sched/mm.h
> +++ b/include/linux/sched/mm.h
> @@ -84,12 +84,6 @@ static inline bool mmget_not_zero(struct mm_struct *mm)
>
> /* mmput gets rid of the mappings and all user-space */
> extern void mmput(struct mm_struct *);
> -#ifdef CONFIG_MMU
> -/* same as above but performs the slow path from the async context. Can
> - * be called from the atomic context as well
> - */
> -extern void mmput_async(struct mm_struct *);
> -#endif
>
> /* Grab a reference to a task's mm, if it is not already going away */
> extern struct mm_struct *get_task_mm(struct task_struct *task);
> diff --git a/kernel/fork.c b/kernel/fork.c
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -925,22 +925,6 @@ void mmput(struct mm_struct *mm)
> }
> EXPORT_SYMBOL_GPL(mmput);
>
> -#ifdef CONFIG_MMU
> -static void mmput_async_fn(struct work_struct *work)
> -{
> - struct mm_struct *mm = container_of(work, struct mm_struct, async_put_work);
> - __mmput(mm);
> -}
> -
> -void mmput_async(struct mm_struct *mm)
> -{
> - if (atomic_dec_and_test(&mm->mm_users)) {
> - INIT_WORK(&mm->async_put_work, mmput_async_fn);
> - schedule_work(&mm->async_put_work);
> - }
> -}
> -#endif
> -
> /**
> * set_mm_exe_file - change a reference to the mm's executable file
> *
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Michal Hocko
SUSE Labs
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web