Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6255722iob; Tue, 10 May 2022 14:06:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMvn+c9Xm8kN0b93t0MYY0W9j0BNBJxUZT8QYUONhyoEm94L0zt0Ix+pIY/7p7JuaBE3X8 X-Received: by 2002:a63:5a13:0:b0:3c6:3d28:87e5 with SMTP id o19-20020a635a13000000b003c63d2887e5mr18774888pgb.452.1652216814773; Tue, 10 May 2022 14:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652216814; cv=none; d=google.com; s=arc-20160816; b=mL+MTze4TSEMvctLfgo6wXAPsXya/FlOxTmgGVcYQewfsxGJ9Hom4tXloxCiMC/t/s PqCHjmdD6mLByJsubPpXkVVlor7/9ZJRuxPT3GWl5Retlv1pOl9iQZ3HD9XRxoBeiuiq ta0TO/mKRbwkoOgd0Tbkhqdz6UkUBoc+0wjWE6azA6xbvZmsRJ8mGYMSPpjk609y1Pt7 Ik7jxasPTI0hbBeJq9G5BDWTH6KNKgow2H236vw/ZBe5P7aGWHo7Acm9eCTjiOJy4amE xFB8jmrgscP0njcSAkhVyq8ue+1X7BfEnPA3QH/NetdI12qtwNoX5CjLqc4SoVVqXCQ6 gnkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PHyk6KxcWFuGsfBMCjMvRxqt94J8O6q+Cwc7jfhdMJk=; b=rfHQgUZHq5QYf3yqLzRU7bNN+nbsrGcvp8PvDGjEHbUZwLYCmqNEHmGkwsN2s35Zq5 vvZ/Swsvlo1NzDoZa0FzOG7RXsoJwfY1GhnjrcFTF42fArO5NCXxh3JhMlnD0jbVrPjr 1pFzdRpv3l2MjlePwuZAJTh7EEo5zpa5LY0onvqnLvfV82tJL+3/GCYByHvG+uYYBWlM Rwg3C8Sc21jkYqB5Q0hDVBFFPx/KfvdncI/ZNmHLYmy40EniyQ8Ay2rPHQiWR97gWL6V cDrJpR7CmyzsS8lpjH8jwUifDpRd1KyMsNifr6Kx/TWz6XUlq6Mr3cSY+8n4a7VXcivF JYag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=La2oft9h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w7-20020a634747000000b003db034cfa69si442395pgk.489.2022.05.10.14.06.38; Tue, 10 May 2022 14:06:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=La2oft9h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345257AbiEJQjW (ORCPT + 99 others); Tue, 10 May 2022 12:39:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244332AbiEJQjV (ORCPT ); Tue, 10 May 2022 12:39:21 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D5352A4A14 for ; Tue, 10 May 2022 09:35:21 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id i38so31662848ybj.13 for ; Tue, 10 May 2022 09:35:21 -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=jXCqRzgjw0o1kT58mAPTqZjzY5CQpeiJHPREzqLTJFOS3ecqDYPWHERsdCBKjQPH2p 3fzgfyC3slpH3jNfmGPsEyp9CWruG9AOOZxX3qKGwaqE7TNr4EcarwLhSrk+vR+fDr9E eMRNvFJMfr3zsSYCG/uW7k/UD+/HZuksCKZ6dyx0lJnNw3BXibPw8MhGZ88ESzETQ0xL Vc24dmBukGxP1vuv8101Jg6C+v4va6Xke7XmCSH0Kmx3zFiu3aSuxIRl30uihThnJC1O ooYSvxAXUvxUQcTJQp7pzKYSRxWZdy0HfL7ekJCFb+gSvJjxCCJf0Dm/yxrWwrgHEqzl zlbg== X-Gm-Message-State: AOAM530ygYWKHmTZPphWsYFeJ9RiioLX2C5/EJXngBlOAo5AguvCiQe/ /lafNmA9tpvefbnshKOr3+HRmFfK5YdQ5Gh2TXKhXA== 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-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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