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 36A91C433F5 for ; Thu, 9 Dec 2021 16:48:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A43D96B0072; Thu, 9 Dec 2021 11:48:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9F3D76B0073; Thu, 9 Dec 2021 11:48:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E3D66B0074; Thu, 9 Dec 2021 11:48:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0176.hostedemail.com [216.40.44.176]) by kanga.kvack.org (Postfix) with ESMTP id 7FADC6B0072 for ; Thu, 9 Dec 2021 11:48:08 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4A49C7F71A for ; Thu, 9 Dec 2021 16:47:58 +0000 (UTC) X-FDA: 78898837836.23.29C89D9 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf06.hostedemail.com (Postfix) with ESMTP id 42F05180002 for ; Thu, 9 Dec 2021 16:47:57 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 7C708210E9; Thu, 9 Dec 2021 16:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1639068476; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZPRynoHMDR0DxFfqoxMvZfGGGCg7KDYFSyzRCoZgqGU=; b=uBWiPPCULOmL3VAVHx+eWri6bBtn047WWvXJ0YZoFblXVo+ZkkFdrMRYmT/G88q0ozF7NK LI9Gvgk2RmaGa4Cx+QX3Ojr8ZoFuowGsYNss4ji49sFwW13lpr+Z0Ig3/GSqx6Ar30Rn/U zhlzbbjvjX29cHXajyBDr2QNV3eFhRY= Received: from suse.cz (mhocko.udp.ovpn1.nue.suse.de [10.163.30.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 9FCBCA3B92; Thu, 9 Dec 2021 16:47:50 +0000 (UTC) Date: Thu, 9 Dec 2021 17:47:53 +0100 From: Michal Hocko To: Suren Baghdasaryan 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 Subject: Re: [PATCH 4/3] mm: drop MMF_OOM_SKIP from exit_mmap Message-ID: References: <20211208212211.2860249-1-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 42F05180002 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=uBWiPPCU; spf=pass (imf06.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam04 X-Stat-Signature: 6i5fkejp6fxn3jpd98gww979cadjdi8h X-HE-Tag: 1639068477-732753 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 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. -- Michal Hocko SUSE Labs