linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: mhocko@suse.com, rientjes@google.com, willy@infradead.org,
	hannes@cmpxchg.org, guro@fb.com, minchan@kernel.org,
	kirill@shutemov.name, aarcange@redhat.com, brauner@kernel.org,
	hch@infradead.org, oleg@redhat.com, david@redhat.com,
	jannh@google.com, shakeelb@google.com, peterx@redhat.com,
	jhubbard@nvidia.com, shuah@kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org, kernel-team@android.com,
	Yu Zhao <yuzhao@google.com>
Subject: Re: [PATCH RESEND v2 2/2] mm: delete unused MMF_OOM_VICTIM flag
Date: Mon, 22 Aug 2022 15:21:19 -0700	[thread overview]
Message-ID: <20220822152119.96d40c884078229ee3e6b25e@linux-foundation.org> (raw)
In-Reply-To: <20220531223100.510392-2-surenb@google.com>

On Tue, 31 May 2022 15:31:00 -0700 Suren Baghdasaryan <surenb@google.com> wrote:

> With the last usage of MMF_OOM_VICTIM in exit_mmap gone, this flag is
> now unused and can be removed.
> 
> ...
>
> --- a/include/linux/oom.h
> +++ b/include/linux/oom.h
> @@ -77,15 +77,6 @@ static inline bool tsk_is_oom_victim(struct task_struct * tsk)
>  	return tsk->signal->oom_mm;
>  }
>  
> -/*
> - * Use this helper if tsk->mm != mm and the victim mm needs a special
> - * handling. This is guaranteed to stay true after once set.
> - */
> -static inline bool mm_is_oom_victim(struct mm_struct *mm)
> -{
> -	return test_bit(MMF_OOM_VICTIM, &mm->flags);
> -}
> -

The patch "mm: multi-gen LRU: support page table walks" from the MGLRU
series
(https://lkml.kernel.org/r/20220815071332.627393-9-yuzhao@google.com)
adds two calls to mm_is_oom_victim(), so my build broke.

I assume the fix is simply

--- a/mm/vmscan.c~mm-delete-unused-mmf_oom_victim-flag-fix
+++ a/mm/vmscan.c
@@ -3429,9 +3429,6 @@ static bool should_skip_mm(struct mm_str
 	if (size < MIN_LRU_BATCH)
 		return true;
 
-	if (mm_is_oom_victim(mm))
-		return true;
-
 	return !mmget_not_zero(mm);
 }
 
@@ -4127,9 +4124,6 @@ restart:
 
 		walk_pmd_range(&val, addr, next, args);
 
-		if (mm_is_oom_victim(args->mm))
-			return 1;
-
 		/* a racy check to curtail the waiting time */
 		if (wq_has_sleeper(&walk->lruvec->mm_state.wait))
 			return 1;
_

Please confirm?


  reply	other threads:[~2022-08-22 22:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 22:30 [PATCH RESEND v2 1/2] mm: drop oom code from exit_mmap Suren Baghdasaryan
2022-05-31 22:31 ` [PATCH RESEND v2 2/2] mm: delete unused MMF_OOM_VICTIM flag Suren Baghdasaryan
2022-08-22 22:21   ` Andrew Morton [this message]
2022-08-22 22:33     ` Yu Zhao
2022-08-22 22:48       ` Andrew Morton
2022-08-22 22:59         ` Yu Zhao
2022-08-22 23:16           ` Andrew Morton
2022-08-22 23:20             ` Yu Zhao
2022-08-23  8:36               ` Michal Hocko
2022-08-28 19:50                 ` Yu Zhao
2022-06-01 21:36 ` [PATCH RESEND v2 1/2] mm: drop oom code from exit_mmap Andrew Morton
2022-06-01 21:47   ` Suren Baghdasaryan
2022-06-01 21:50     ` Suren Baghdasaryan
2022-06-02  6:53     ` Michal Hocko
2022-06-02 13:31       ` Liam Howlett
2022-06-02 14:08         ` Michal Hocko
2022-06-02 13:39     ` Matthew Wilcox
2022-06-02 15:02       ` Suren Baghdasaryan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220822152119.96d40c884078229ee3e6b25e@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=aarcange@redhat.com \
    --cc=brauner@kernel.org \
    --cc=david@redhat.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=hch@infradead.org \
    --cc=jannh@google.com \
    --cc=jhubbard@nvidia.com \
    --cc=kernel-team@android.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterx@redhat.com \
    --cc=rientjes@google.com \
    --cc=shakeelb@google.com \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=willy@infradead.org \
    --cc=yuzhao@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox