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 E08C1C433EF for ; Tue, 10 May 2022 16:10:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6801F6B0071; Tue, 10 May 2022 12:10:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 62FB96B0073; Tue, 10 May 2022 12:10:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 51E2C6B0074; Tue, 10 May 2022 12:10:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3F18E6B0071 for ; Tue, 10 May 2022 12:10:58 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 09FA93222A for ; Tue, 10 May 2022 16:10:58 +0000 (UTC) X-FDA: 79450322196.02.FA4AA94 Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) by imf27.hostedemail.com (Postfix) with ESMTP id 59C874009F for ; Tue, 10 May 2022 16:10:55 +0000 (UTC) Received: by mail-yb1-f173.google.com with SMTP id y76so31602886ybe.1 for ; Tue, 10 May 2022 09:10:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HWr6j8L83YvC4oASSY1+KN7VXDAW39s2toR1CA0dOGM=; b=RlY/r9s3r9kOyisJCmDy9MdyIjnatnPNsx5zqhU5hy+tmdsBoq6TF36hxb9T4906as bYTWoizuhtwJHb2AF1uriEvmqhjci5KVeh7DADQgrNrImJXfNPm66sQRkba/MIAThsi3 i9RE/oJtZqzqxbWczthqmb/xHpq3M1yZaqKpmKDHryIz5VJ7bOLFNcfrFT93N1Cesiwm 8zATZIVKIntG+AV/qUl89gwyaM7nJK3zuei11ezzA9SKpumXz3nHAV1rdIwveht/78sX bj4NGXJceokJyDg7yyqDg1tGRW8DKu8s/UOykw/JSaTmEJUhcRxE3d7dvliXDNp3Brlb RduQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HWr6j8L83YvC4oASSY1+KN7VXDAW39s2toR1CA0dOGM=; b=YPq3vadse6glGIckxvyrj43uaT+gXJm2PSzqph64bL7a8f9FlfHzAi8qRDWcLpYTs4 e2o2M5VO1GCwP1r6exkexsE7vhtbk2MAmso9K29bz1Rr7TMAhFU7fdJ0RLvx0BaM8+ES eYeTP/+wLknO8mIHLs9nE21M1kuHAV8T+pAp0yc2jDR4IR+kmEfByC0zFwxQM5z3ASnP bjzJKXNp72DmcUADd0b2LwTsOciPFd8c1UGVU/zds0AjRcwzD2xLkWh2UzlaXWtVFs36 XREeuXzzBck247in3iJs9U56pwtz+QPPjLAfhdhPnW31QnaeARF72SPo1z7ByYnFqare D4Ng== X-Gm-Message-State: AOAM533T4dXgUgezSFdwz5I8kAG3vaY4I/oKZ3hT9+M4SO+a9F83Pafk cembghYDyKpuJ4XEcs4Rd8RnT8Yl8uOG8WLHRwKLdw== X-Google-Smtp-Source: ABdhPJxw2puCwa3aeQ2ujP92lgV0IWtmFRYyzeAebZNg7CXo5t9A9KOZycbj33LXrbCpqmmrklTc/q9gZ69BS9j8rk8= X-Received: by 2002:a05:6902:13c2:b0:641:b6d:a151 with SMTP id y2-20020a05690213c200b006410b6da151mr18715929ybu.348.1652199056496; Tue, 10 May 2022 09:10:56 -0700 (PDT) MIME-Version: 1.0 References: <20220510030014.3842475-1-surenb@google.com> <20220510030014.3842475-3-surenb@google.com> <008de890-7fe1-aeae-345e-0cd3fcd32352@linuxfoundation.org> In-Reply-To: <008de890-7fe1-aeae-345e-0cd3fcd32352@linuxfoundation.org> From: Suren Baghdasaryan Date: Tue, 10 May 2022 09:10:45 -0700 Message-ID: Subject: Re: [PATCH 3/3] mm: delete unused MMF_OOM_VICTIM flag To: Shuah Khan Cc: Andrew Morton , Michal Hocko , David Rientjes , Matthew Wilcox , Johannes Weiner , Roman Gushchin , Minchan Kim , "Kirill A. Shutemov" , Andrea Arcangeli , Christian Brauner , Christoph Hellwig , Oleg Nesterov , David Hildenbrand , Jann Horn , Shakeel Butt , Peter Xu , John Hubbard , shuah@kernel.org, LKML , linux-mm , linux-kselftest@vger.kernel.org, kernel-team Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="RlY/r9s3"; spf=pass (imf27.hostedemail.com: domain of surenb@google.com designates 209.85.219.173 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 59C874009F X-Stat-Signature: gsduh3xmc9zy477ehenk951w4rxh1n4f X-HE-Tag: 1652199055-220146 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, May 10, 2022 at 8:51 AM Shuah Khan wrote: > > On 5/9/22 9:00 PM, Suren Baghdasaryan wrote: > > With the last usage of MMF_OOM_VICTIM in exit_mmap gone, this flag is > > now unused and can be removed. > > > > Signed-off-by: Suren Baghdasaryan > > --- > > include/linux/oom.h | 9 --------- > > include/linux/sched/coredump.h | 1 - > > mm/oom_kill.c | 4 +--- > > 3 files changed, 1 insertion(+), 13 deletions(-) > > > > diff --git a/include/linux/oom.h b/include/linux/oom.h > > index 6cdf0772dbae..25990e9d9e15 100644 > > --- 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); > > -} > > - > > /* > > * Checks whether a page fault on the given mm is still reliable. > > * This is no longer true if the oom reaper started to reap the > > diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h > > index 4d9e3a656875..746f6cb07a20 100644 > > --- a/include/linux/sched/coredump.h > > +++ b/include/linux/sched/coredump.h > > @@ -70,7 +70,6 @@ static inline int get_dumpable(struct mm_struct *mm) > > #define MMF_UNSTABLE 22 /* mm is unstable for copy_from_user */ > > #define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */ > > #define MMF_DISABLE_THP 24 /* disable THP for all VMAs */ > > -#define MMF_OOM_VICTIM 25 /* mm is the oom victim */ > > #define MMF_OOM_REAP_QUEUED 26 /* mm was queued for oom_reaper */ > > #define MMF_MULTIPROCESS 27 /* mm is shared between processes */ > > /* > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > > index 36355b162727..11291b99599f 100644 > > --- a/mm/oom_kill.c > > +++ b/mm/oom_kill.c > > @@ -732,10 +732,8 @@ static void mark_oom_victim(struct task_struct *tsk) > > return; > > > > /* oom_mm is bound to the signal struct life time. */ > > - if (!cmpxchg(&tsk->signal->oom_mm, NULL, mm)) { > > + if (!cmpxchg(&tsk->signal->oom_mm, NULL, mm)) > > mmgrab(tsk->signal->oom_mm); > > - set_bit(MMF_OOM_VICTIM, &mm->flags); > > - } > > > > /* > > * Make sure that the task is woken up from uninterruptible sleep > > > > Thank you for working on the new tests and cleanups. Thanks for the review! > > This series needs a cover-letter that explains why this series is needed > that includes the information from this last patch. > > Please send v2 with a proper cover letter starting with why this series > is necessary. If you did that, it would have reviewers job is lot easier. > > Also it appears you are combining new tests with cleanup patches. I think > patches 2/3 and 3/3 can be a separate series and the new test can be a > separate patch. I used the new selftest to test the patches but otherwise it's true, they are unrelated. I was debating whether to send them separately and with your blessing I'll split them up. Thanks, Suren. > > thanks, > -- Shuah