From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92ADFC28D13 for ; Mon, 22 Aug 2022 22:21:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BD8E26B0073; Mon, 22 Aug 2022 18:21:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B86A28D0001; Mon, 22 Aug 2022 18:21:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A75D86B0075; Mon, 22 Aug 2022 18:21:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 99CFC6B0073 for ; Mon, 22 Aug 2022 18:21:23 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 742A21C29E9 for ; Mon, 22 Aug 2022 22:21:23 +0000 (UTC) X-FDA: 79828650846.30.9082940 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf31.hostedemail.com (Postfix) with ESMTP id 246FE20011 for ; Mon, 22 Aug 2022 22:21:22 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1864461342; Mon, 22 Aug 2022 22:21:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8ED8C433D6; Mon, 22 Aug 2022 22:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1661206881; bh=5+dnYijmph9j6r03H83ENF5D6tCqRSMA7zXrvGscJRw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Y0ue13+62oMUgAjV9ILcmIWjJ5FwskKcbdYBwur2vKZDZoKkHxLRAJKvyfOsz+dV0 74pW5JwXQXaPIb712dr/YhnST0oSv/xswDTRK3h/2XcaDedtlKB/veiDOwKmlL20EZ 5FtdESRE0T6NFirhe6oY/KR/1TrxXyasW+gEPXVI= Date: Mon, 22 Aug 2022 15:21:19 -0700 From: Andrew Morton To: Suren Baghdasaryan 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 Subject: Re: [PATCH RESEND v2 2/2] mm: delete unused MMF_OOM_VICTIM flag Message-Id: <20220822152119.96d40c884078229ee3e6b25e@linux-foundation.org> In-Reply-To: <20220531223100.510392-2-surenb@google.com> References: <20220531223100.510392-1-surenb@google.com> <20220531223100.510392-2-surenb@google.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Y0ue13+6; spf=pass (imf31.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661206883; a=rsa-sha256; cv=none; b=p1svfRv0VZF3nlbQjeE4xTbhS2WrznEv+9BhQcGiNBYMrwRc0TmPIQevpkb7krHl0NgOAx EZRx5HuO/ZrBQ+vZSTz9JfH4xFaapartl06WwB/TdiSnjE3d+2Rwib4b/XmQoaJqjCJnoR 3RTdgLbBlU1+GzzFIbxxP7dnvdVX/7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661206883; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=T6RkRa86kjzHF9lzpZsPlXOFVMSkA+dp4dYVFak82XU=; b=xrPC0j45LM7ETQepS1dm31V3ufjNcyw9hwLS7tDU/Z0vZwooK7YVOlH+mTfMosDqMAcpfc aww81WeB/pcFij18nrpH5wohRbfIg7BTg1MsFaih2kf+Jgl6p+KxtkcV6ELlwDOu2oATjs pbTvekhlOzqLwiagAK6zhO+88oU5J/U= Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Y0ue13+6; spf=pass (imf31.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 246FE20011 X-Stat-Signature: xisup85aaippxopkpzntuf9r3ie96hyh X-HE-Tag: 1661206882-827506 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 31 May 2022 15:31:00 -0700 Suren Baghdasaryan 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?