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 69EA4C433F5 for ; Wed, 2 Mar 2022 14:25:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CFD6D8D0002; Wed, 2 Mar 2022 09:25:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CAC7F8D0001; Wed, 2 Mar 2022 09:25:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B9B9B8D0002; Wed, 2 Mar 2022 09:25:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id AB9EE8D0001 for ; Wed, 2 Mar 2022 09:25:01 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 7C9FC821C4 for ; Wed, 2 Mar 2022 14:25:01 +0000 (UTC) X-FDA: 79199668002.06.AFCBF07 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf21.hostedemail.com (Postfix) with ESMTP id D48251C001B for ; Wed, 2 Mar 2022 14:25:00 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 755261F37E; Wed, 2 Mar 2022 14:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1646231099; 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=GkitiNRAXPXA41Tw0EpxO8Dg4MOHGDvtJ7D54K0fJ0s=; b=tFUsNE5F9vD88aKepoWoMqpzIWRj3ldyArGelKorFa0ftNPzsB+GldHOCf4o6M72ZI/ZAv S6B4iWj6rtUWDJdU7hoaCOAe56qZ7jt+tFYsBoeTyLR4Hk8lN5NlobbnNEHONnogNRuRn3 aemX0OnokuAMrX3aBo5s9/kwIPbT378= Received: from suse.cz (unknown [10.100.201.86]) (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 438E5A3B81; Wed, 2 Mar 2022 14:24:59 +0000 (UTC) Date: Wed, 2 Mar 2022 15:24:59 +0100 From: Michal Hocko To: Nico Pache Cc: Waiman Long , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, jsavitz@redhat.com, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, dvhart@infradead.org, dave@stgolabs.net, andrealmeid@collabora.com Subject: Re: [PATCH v3] mm/oom: do not oom reap task with an unresolved robust futex Message-ID: References: <20220114180135.83308-1-npache@redhat.com> <43a6c470-9fc2-6195-9a25-5321d17540e5@redhat.com> <118fc685-c68d-614f-006a-7d5487302122@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <118fc685-c68d-614f-006a-7d5487302122@redhat.com> X-Rspamd-Queue-Id: D48251C001B X-Stat-Signature: 1bxuk61ww3ofx5e9d1kf75986pg3ps3s Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=tFUsNE5F; spf=pass (imf21.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1646231100-468336 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: Sorry, this has slipped through cracks. On Mon 14-02-22 15:39:31, Nico Pache wrote: [...] > We've recently been discussing the following if statement in __oom_reap_task_mm: > if (vma_is_anonymous(vma) || !(vma->vm_flags & VM_SHARED)) > > Given the comment above it, and some of the upstream discussion the original > RFC, we are struggling to see why this should be a `||` and not an `&&`. If we > only want to reap anon memory and reaping shared memory can be dangerous is this > statement incorrect? > > We have a patch queued up to make this change, but wanted to get your opinion on > why this was originally designed this way in case we are missing something. I do not really see why this would be wrong. Private file backed mappings can contain a reapable memory as well. I do not see how this would solve the futex issue. -- Michal Hocko SUSE Labs