Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp304214pxm; Wed, 2 Mar 2022 15:55:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCaILifK2iJiKPgl8yEWphgrvB4N9eI8CWKBqNVui/M2WCxeND/tMWSjNrMxOqRzKnmWl5 X-Received: by 2002:a17:90a:8595:b0:1bb:fbfd:bfbf with SMTP id m21-20020a17090a859500b001bbfbfdbfbfmr2297555pjn.125.1646265307925; Wed, 02 Mar 2022 15:55:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646265307; cv=none; d=google.com; s=arc-20160816; b=lDPTPFYZ0mGAVMtIYEPUNonyw1m4BE03MTfw400oki3znEUFPbyrDsg+N54LewnFoI wmcbNRw4eEh9TnxQNS0PC6QJdijCIuhaNrO+ju1Kg9++1MIhe9BNwhWd6yV8qm1fqanv iNkFdumIWEmAQOO0TBlfhTK7RiEYQ8SXkB/MSAjyfXpGzKCDXU3S4evh2fz9NUI6Nci0 gvvVcxAuzrA+xse7lB9M/RwPGeL8Cm+BMNk0uR6r9h5ScJT+d6rIAWG74j8njRqDjWD+ 2GFyWu/Q8uwXYFVF/+Q5YPws56HH+ZO/dZcaLoBfTnRoicBDM+NwIRRZNKgj1ukCxTgh g3QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GkitiNRAXPXA41Tw0EpxO8Dg4MOHGDvtJ7D54K0fJ0s=; b=bbLqSPGC1kC+XAjn6wO0+UMoaNQJN4maqd48jJZ0hrXQHjalMyJOfUUUA1eU77+vLJ 1im+RIWV3qaVEWaWGb0G0DQjZ6iKHcbEvgGKRJpb/F0AnW3Ks3yICDYNVVBdeZAu3pq1 I5qsG4KpsoQ4EzfhbJXcrd/0Va4Gqumjy3TQT1nCyM2Eyw2Vl8I9hdwu0yfdmbUhdISi KvOOt7xSiw0Phl+ZPKY/ZUO1NcVP3EzB2cyxmKp39bGBLkJ/3Z7EjVbIvomt9h1zPChA snzcwxJecvJZAGPRtgwi/FBWsQTBGdsu2B9+fCgkteOCbBHS8ucRHOlz8BnorTNDBi4g 2AUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=tFUsNE5F; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j18-20020a63fc12000000b00373e12c3979si451991pgi.461.2022.03.02.15.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 15:55:07 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=tFUsNE5F; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AF7F0188842; Wed, 2 Mar 2022 15:15:48 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242882AbiCBOZq (ORCPT + 99 others); Wed, 2 Mar 2022 09:25:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234943AbiCBOZn (ORCPT ); Wed, 2 Mar 2022 09:25:43 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0A5954FB2 for ; Wed, 2 Mar 2022 06:25:00 -0800 (PST) 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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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