Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp105569pxw; Fri, 8 Apr 2022 02:26:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6U4JpvUSQUB1u+DqPBVDntUyhd2qQJJ0fJXq8gBkRFDenMCnYc4to7nEH5OchvvLS2p4W X-Received: by 2002:a17:907:9506:b0:6da:b4cd:515b with SMTP id ew6-20020a170907950600b006dab4cd515bmr17401536ejc.602.1649410019236; Fri, 08 Apr 2022 02:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649410019; cv=none; d=google.com; s=arc-20160816; b=xTGf0dPnNVAXOCzfIiANjQHZXA84PoZxg2vSvh28Q9PGOfUKkVdQGjYZFzzEnUDQo3 83gpdot+BaeotWrGirSMCsGPTplcxZleijieB4gDKAmuoBerfAM4jp4KHQBr+Tg04g3s 6WSz8Pe9rpLKoi/lilegzr/lBzapSAk2XWjMx/JUHiqChuWZN5VeDUyg9Zh/O391fsBm cdKy0YfZHZUq3LVPY7Eu7rkwldKQpDCR0zzR09pmJtRgkR+8Bqp8jgEq10UMqbjE5gNV L+GTli9X1EhJsNFcgLTF2nzYkojxZS2K6VsF4rWQjtsfxCBJMHaykcqRzzljNU9Xp1gW QwvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=oISKE5LaMehx2C01N20eUScIwjSSk2eBrc+o245KWv4=; b=hamwZw58GyJ0H6svu5JoKPbIj2IWnR2tI6a3uVfZWbpbJ8/Wnx2Nz9X+spz5gNr/at MNYs9a/CS6U4k26DH07I4ZORTUb2Q2+GXd1Ja85eNnM3oRB1qoYANDNPWNnIOVnZ+x+i QKDwWJXRU0jZb1QFP9H8rCmMA3Aeo44u8F2addz+HfPBj2WG67kTkLpmOcv1KqBvVRu8 5Me0AkmGiL49YbmeNJXJKYnXA/Z3ZT9AvTvFpcwFfOhPaFbChXZdX0vxVZPfr1ypIXpq X2Aexhh7SMH5oHMfW3JH5zCs/pOO5e4Uol24k10fKzh31CMGCtoxGE84Y988MDoJmeWv genw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=05bJBQvp; dkim=neutral (no key) header.i=@linutronix.de; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he40-20020a1709073da800b006e80a81a547si840926ejc.14.2022.04.08.02.26.33; Fri, 08 Apr 2022 02:26:59 -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=@linutronix.de header.s=2020 header.b=05bJBQvp; dkim=neutral (no key) header.i=@linutronix.de; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232110AbiDHIjz (ORCPT + 99 others); Fri, 8 Apr 2022 04:39:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbiDHIjx (ORCPT ); Fri, 8 Apr 2022 04:39:53 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1732C3893 for ; Fri, 8 Apr 2022 01:37:50 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1649407067; h=from:from:reply-to:subject:subject: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=oISKE5LaMehx2C01N20eUScIwjSSk2eBrc+o245KWv4=; b=05bJBQvp24Dg2sKt23/aO72hj8DzDnrYfy3ByG1lOW5b56M8i/ZSL78ZRqE5WgNB7XWe3d qj+YrwxFGlayPpAQ21vh7p9QRVsWlDJkQQ4me8j6lhhGY7czRvwx/Vj12cxaBvQuXx2UqH LR4rmAZX3qtJ1q8lsDm/UXFvYn+5QVLuPGnooP/9/OJiThtX/OUBD9Vn7tHsxj5r9ZMNXg etLXLWeWlseVF/7ZpbzC9zf6fbJEeCcZlnpIbaquYOgq8LWEmuleDV3wHiNn/5vXMul0k+ 79mZpO0q0fj+V38HFOMJtFWWFmbagPUBO5HV0JpRtAc8TizNB/bw9bvH5TkQ6A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1649407067; h=from:from:reply-to:subject:subject: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=oISKE5LaMehx2C01N20eUScIwjSSk2eBrc+o245KWv4=; b=kyb36WHbPjNrcEjhfChenUP8UmFtGni5hul51e0kQQ+s63IGL2sfZuz59MpTYh36TKnamP OuIo2ZUSB1JAPmCw== To: Peter Zijlstra , Nico Pache Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Rafael Aquini , Waiman Long , Baoquan He , Christoph von Recklinghausen , Don Dutile , "Herton R . Krzesinski" , David Rientjes , Michal Hocko , Andrea Arcangeli , Andrew Morton , Davidlohr Bueso , Ingo Molnar , Joel Savitz , Darren Hart , stable@kernel.org Subject: Re: [PATCH v8] oom_kill.c: futex: Don't OOM reap the VMA containing the robust_list_head In-Reply-To: <20220408081549.GM2731@worktop.programming.kicks-ass.net> References: <20220408032809.3696798-1-npache@redhat.com> <20220408081549.GM2731@worktop.programming.kicks-ass.net> Date: Fri, 08 Apr 2022 10:37:47 +0200 Message-ID: <87tub4j7hg.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Fri, Apr 08 2022 at 10:15, Peter Zijlstra wrote: > On Thu, Apr 07, 2022 at 11:28:09PM -0400, Nico Pache wrote: >> Theoretically a failure can still occur if there are locks mapped as >> PRIVATE|ANON; however, the robust futexes are a best-effort approach. >> This patch only strengthens that best-effort. >> >> The following case can still fail: >> robust head (skipped) -> private lock (reaped) -> shared lock >> (skipped) > > This is still all sorts of confused.. it's a list head, the entries can > be in any random other VMA. You must not remove *any* user memory before > doing the robust thing. Not removing the VMA that contains the head is > pointless in the extreme. > > Did you not read the previous discussion? Aside of that we all agreed that giving a oom-killed task time to cleanup itself instead of brute force cleaning it up immediately, which is the real problem here. Can we fix that first before adding broken heuristics? Thanks, tglx