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 256ACC433F5 for ; Thu, 9 Dec 2021 17:07:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F5236B0072; Thu, 9 Dec 2021 12:07:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A4C56B0073; Thu, 9 Dec 2021 12:07:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 76C056B0074; Thu, 9 Dec 2021 12:07:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0200.hostedemail.com [216.40.44.200]) by kanga.kvack.org (Postfix) with ESMTP id 676186B0072 for ; Thu, 9 Dec 2021 12:07:15 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2261F894C1 for ; Thu, 9 Dec 2021 17:07:05 +0000 (UTC) X-FDA: 78898886010.18.D8A0FAA Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) by imf22.hostedemail.com (Postfix) with ESMTP id 7007EC000F for ; Thu, 9 Dec 2021 17:07:04 +0000 (UTC) Received: by mail-yb1-f178.google.com with SMTP id j2so15140068ybg.9 for ; Thu, 09 Dec 2021 09:07:04 -0800 (PST) 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=fas2OWMrEaheu82JOXqt70D3AeQezFvpYTzImSBS/qY=; b=gaeFt1NOo2R3rPoTUL4NXG3WetKKF/4voae7kqnSTwu5/Oa54m3cTMAvkdYj3BjXC7 SSYU+o6eGjvsXbnG/Fiw4C793liazSyIuuFV3JSIb+fNzdpZP8hysLDUoRZ0HPGA0Oig 8EhwXW73IF+savB0+TtglCxyFS47NWbRtkKwOV4i6dP3KrHAd/nDxF1cWDbvYymgAY6S 6Sw1JLrIjG0AmJDP0gsrBYtv3z4u/tQTFd9hfpzoSEGlFNLrJip/GlhTqERq/FGKgDI6 EOAE8Wu2e3TTCD4vdz1YM7A6qHKGLFhq4EnpsUD5gY3bF9HDFR3pTKi8bzTJ8ukwLmcN 1Ang== 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=fas2OWMrEaheu82JOXqt70D3AeQezFvpYTzImSBS/qY=; b=deMGRMROJVepWFsV/aa6J7n8iwpozn2muVOZu2yUjvPvKH0NvSLoxAOuyjpy+/WoQy 5J7r71dCcOypRKZTRnCGeeRZkZP/nc5i7srWtfbZZLY9hnwQK90aIr3LhbdbqvKkexIi bP1Gf/N1YG+fxWc3xJRX38FnTuIj2IykkpCLn1uLVnh6ssvjkL3On9EqGg9WgoIdo7rh 7VOgn/CytEXhgMKfENur5oacbBUy5oKkEAIIWta7R7GP+6Xt32vei5AoVZEfNhTTSwBJ 8LUZLT36qFgm1zGVTzwDrcveKUcjaH6YtKhgP2pIiMWeXjWSldPJ6UJ9dXxgtuaFdsYW A1Ug== X-Gm-Message-State: AOAM530sVmmxt7Ui+cUo1TqzhDMTji71JwioDva5oF0yVf684/FV9VLh 21OO8t75Yi7T6BXZTyYwKY6uNE6+9yOeMxg5PZmoMA== X-Google-Smtp-Source: ABdhPJzSDMYSsNJU7k1O7prmBk6Nzch3NJj0ufS7Gs+gRAZosiipYNoXtYSkHAZcAfPmrJJMzr9W8/pf9MOYCMlXntE= X-Received: by 2002:a25:610d:: with SMTP id v13mr7164166ybb.1.1639069623555; Thu, 09 Dec 2021 09:07:03 -0800 (PST) MIME-Version: 1.0 References: <20211208212211.2860249-1-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Thu, 9 Dec 2021 09:06:52 -0800 Message-ID: Subject: Re: [PATCH 4/3] mm: drop MMF_OOM_SKIP from exit_mmap To: Michal Hocko Cc: akpm@linux-foundation.org, rientjes@google.com, willy@infradead.org, hannes@cmpxchg.org, guro@fb.com, riel@surriel.com, minchan@kernel.org, kirill@shutemov.name, aarcange@redhat.com, christian@brauner.io, hch@infradead.org, oleg@redhat.com, david@redhat.com, jannh@google.com, shakeelb@google.com, luto@kernel.org, christian.brauner@ubuntu.com, fweimer@redhat.com, jengelh@inai.de, timmurray@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 7007EC000F Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=gaeFt1NO; spf=pass (imf22.hostedemail.com: domain of surenb@google.com designates 209.85.219.178 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam04 X-Stat-Signature: ex1qghrmwz3o1taqndkropkcu98tc8x5 X-HE-Tag: 1639069624-926664 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000039, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Dec 9, 2021 at 8:47 AM Michal Hocko wrote: > > On Thu 09-12-21 08:24:04, Suren Baghdasaryan wrote: > > On Thu, Dec 9, 2021 at 1:12 AM Michal Hocko wrote: > > > > > > Do we want this on top? > > > > As we discussed in this thread > > https://lore.kernel.org/all/YY4snVzZZZYhbigV@dhcp22.suse.cz, > > __oom_reap_task_mm in exit_mmap allows oom-reaper/process_mrelease to > > unmap pages in parallel with exit_mmap without blocking each other. > > Removal of __oom_reap_task_mm from exit_mmap prevents this parallelism > > and has a negative impact on performance. So the conclusion of that > > thread I thought was to keep that part. My understanding is that we > > also wanted to remove MMF_OOM_SKIP as a follow-up patch but > > __oom_reap_task_mm would stay. > > OK, then we were talking past each other, I am afraid. I really wanted > to get rid of this oom specific stuff from exit_mmap. It was there out > of necessity. With a proper locking we can finally get rid of the crud. > As I've said previously oom reaping has never been a hot path. > > If we really want to optimize this path then I would much rather see a > generic solution which would allow to move the write lock down after > unmap_vmas. That would require oom reaper to be able to handle mlocked > memory. Ok, let's work on that and when that's done we can get rid of the oom stuff in exit_mmap. I'll look into this over the weekend and will likely be back with questions. Thanks! > -- > Michal Hocko > SUSE Labs