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 6A85BC433F5 for ; Tue, 10 May 2022 16:35:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EA3276B0071; Tue, 10 May 2022 12:35:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E520A6B0073; Tue, 10 May 2022 12:35:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD8FF6B0074; Tue, 10 May 2022 12:35:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id BB81E6B0071 for ; Tue, 10 May 2022 12:35:21 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 94E41120F16 for ; Tue, 10 May 2022 16:35:21 +0000 (UTC) X-FDA: 79450383642.24.4D5731F Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) by imf02.hostedemail.com (Postfix) with ESMTP id 08DAE800A2 for ; Tue, 10 May 2022 16:35:13 +0000 (UTC) Received: by mail-yb1-f173.google.com with SMTP id w187so31710368ybe.2 for ; Tue, 10 May 2022 09:35:20 -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=PHyk6KxcWFuGsfBMCjMvRxqt94J8O6q+Cwc7jfhdMJk=; b=La2oft9h//4R7NqvABzmLzI24UNpXxonVaHdkSWY3twz6H0Y9sPpY85ie6wF+7yAer el6asuMYV9LYEDtIHuNlUjqpPhdUe4BY7enwH08fIwoE+8ta5ybTub7FzYKweCdK92pe iCK+SwuUga7+6KC/E8MDCPWI9ZsIBwZg1F1VIBWRCBEYpdAQEPwXieo5JlZvfz4OjrGq 1/oys/C9twZpgnzlmD3QA7rKVETM+O4aWxKK50mwnTb+6qDnUm2jqDoIdEoxYbxv4MIO BQRCLGMjiT4wjyUshj2uFRw4PeH1iDXnVhXJTcIyvRHWWqYd/xykqO86bbSV8COo2rwn J3kQ== 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=PHyk6KxcWFuGsfBMCjMvRxqt94J8O6q+Cwc7jfhdMJk=; b=GoSRyf9q1zI6xbuRX9rejtcSFeLNVTsxjtSPuYj/5p5rlmXl7EOtOXa4nTtoxzDx22 +YEgy5iIbs1AuNIil3ipkkTrBM0iY4DhYomZRLHfihX+iz4jyHs7/w0fqJeiixQgc8me HFIwlzxERavINqsbexEXQjdrfLoO0xVKm5OZeayGqOoQAOeKIv2maNu9/JwH0woixBN+ Bj1cA08xORqyZnhHHuaNnyrVDOwS1CvH5wIoaMxNrnKsYkHV7VFimZQ7PhzbrJION5DS nu2N1lwKiIKrgvuO5yi/QaP3252nldlDP6pRaD2NSO5pkoGVCvglS53qGdG6T8D5rXy/ NgwA== X-Gm-Message-State: AOAM5335Wm+7aVtfZhie+yJiYmWquZG3Wtwh/KTuQ5H0v/xcwtqeD5ta 6Rw+7b1OvQNivXktIHETnWbTRCff/7aaWfEdK09bCQ== X-Google-Smtp-Source: ABdhPJzj9Ho7O1Hcx2a5+H/jratEJHay76ufapGe+gaVObbXYcEszYLH+XiZziFHLLNdOO3QjGUeT5y2pZslUkhvPxM= X-Received: by 2002:a25:d55:0:b0:648:7008:61e0 with SMTP id 82-20020a250d55000000b00648700861e0mr18392484ybn.282.1652200520221; Tue, 10 May 2022 09:35:20 -0700 (PDT) MIME-Version: 1.0 References: <20220510030014.3842475-1-surenb@google.com> <20220510030014.3842475-2-surenb@google.com> <3e847a15-e8c0-41fd-9518-2ae3d4a39092@linuxfoundation.org> In-Reply-To: <3e847a15-e8c0-41fd-9518-2ae3d4a39092@linuxfoundation.org> From: Suren Baghdasaryan Date: Tue, 10 May 2022 09:35:09 -0700 Message-ID: Subject: Re: [PATCH 2/3] mm: drop oom code from exit_mmap 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" X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 08DAE800A2 X-Stat-Signature: 4wnfmpnngezwk8pmr4s1sw38o4wi638i Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=La2oft9h; spf=pass (imf02.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-HE-Tag: 1652200513-961184 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:46 AM Shuah Khan wrote: > > On 5/9/22 9:00 PM, Suren Baghdasaryan wrote: > > With the oom-killer being able to operate on locked pages, exit_mmap > > does not need to ensure that oom_reap_task_mm is done before it can > > proceed. Instead it can rely on mmap_lock write lock to prevent > > oom-killer from operating on the vma tree while it's freeing page > > tables. exit_mmap can hold mmap_lock read lock when unmapping vmas > > and then take mmap_lock write lock before freeing page tables. > > > > Signed-off-by: Suren Baghdasaryan > > --- > > include/linux/oom.h | 2 -- > > mm/mmap.c | 25 ++++++------------------- > > mm/oom_kill.c | 2 +- > > 3 files changed, 7 insertions(+), 22 deletions(-) > > > > How does this improve the test? Include the information on why this > change is needed as opposed describing what this does? It doesn't improve the test. I used the test to verify this change and wanted to keep them together so that others have an easy way to exercise the same code path. That's the only relation between the test and this cleanup. I'll split them into separate patchsets to avoid further confusion. > > thanks, > -- Shuah