Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2445542pxp; Mon, 21 Mar 2022 20:42:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDEmM1jprvaNY0+oAHWmoPYLHptrFGuzo8NmPmyDxBKHyAR78Zp7oAijxxhDAVTd2cS1cX X-Received: by 2002:a63:501d:0:b0:382:56b1:9a01 with SMTP id e29-20020a63501d000000b0038256b19a01mr9660687pgb.393.1647920579253; Mon, 21 Mar 2022 20:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647920579; cv=none; d=google.com; s=arc-20160816; b=eNJZ03NaJ/CxEQ4jnv5RQfDxX6Km9qbSXyF0HtRN1Gi3BnHRf4+haEQpteD72C7rHd 4OlZoYc+03AaJl/7zQoLchS7iyEQPtkbLjbDNAZqptwZbfl/Z821Rz8cINb+tpcVoaWE UhNGoJvfFs9hlec5/uP+2wCt1H/tfY5K8HEgC5/3jr6KmruaBKGeS1jqTVnNXIsnMQrF v2fAjW2kEvFHoUVoHfsKINAqYrWUgq7UvjlJWNJtU6XtsJaAMHmxjb5cMHVrRcAUEgsX L/MidXKUR8FJRDpSwL1pfrZjB2XZlWHdLrjDZg08s49a1TKOZk+EtpRNJO3tB4dHVKqz /2cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:cc:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=DBtHCrAqM8PwKsCvhHfbFfAvk2Wqf5blryM4kHsbRbI=; b=Gahi6mP1/ybmofAcIV7u7Ymd6EdGq3iF+i6zUxpCqeNHlVpoN8B0U4eFKgUCUAGAPv lXrxCUlWV2syFbyA5RHHxzfs163V/jOvwJNsF070zPa8XYUMc7Da13K3JGBVuJ4abu0m /qw0QdAKEsCyrx4ZrbwKve+BuUc21shjc7webCztZMMFzZXDKjo2Ux8SFPx75NgjrhPN WeYml9bCKIHPbT50eYOg4S2LSZn9HF8OpcXnuEkkNBzFPhx4KNcVfH7xJlj8pFBnEUtG EiM9jJxyu4A2ziiPDrc6jbMzfhB7tVs5PUv1VpRLKZ0wcFdnNh0v8bUldLSJxHmeiVoD ejsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RCGELxqE; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n7-20020a17090ac68700b001c64d70ecc5si989581pjt.66.2022.03.21.20.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 20:42:59 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=RCGELxqE; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 058134D260; Mon, 21 Mar 2022 20:09:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236026AbiCVDLU (ORCPT + 99 others); Mon, 21 Mar 2022 23:11:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235997AbiCVDLS (ORCPT ); Mon, 21 Mar 2022 23:11:18 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D0FCB1B7B7 for ; Mon, 21 Mar 2022 20:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647918590; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DBtHCrAqM8PwKsCvhHfbFfAvk2Wqf5blryM4kHsbRbI=; b=RCGELxqEwIljF5MraCQZv2CXmRQeZ1+FlnFwikdbiji12DEUeK+FaydYuCawZZ4t/7N1RM YJb8qaffkOEalnAwr/f425GMKUjkwHryI+vXrA37kJPqdq5AXd4rl8uLXYUAizjqjeI/Q9 XecRUOz2rnn0rM/lhcxYHlyMLl6MCd4= Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-505-3bdkyZwHPUW3pzUPugxRYQ-1; Mon, 21 Mar 2022 23:09:49 -0400 X-MC-Unique: 3bdkyZwHPUW3pzUPugxRYQ-1 Received: by mail-io1-f72.google.com with SMTP id z10-20020a056602080a00b00645b9fdc630so11671210iow.5 for ; Mon, 21 Mar 2022 20:09:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:cc:in-reply-to :content-transfer-encoding; bh=DBtHCrAqM8PwKsCvhHfbFfAvk2Wqf5blryM4kHsbRbI=; b=uoFi69ulSltgQ4oUOayNYpI2kJGASxIew4IDXtmDWlqgaaePRokwINqWeL7+R5NrGU E+024ujGtBcRa6NddBBCJT4DLnblyQagshqLlshKjQ8y4hM3ytq3p0uYZ+23R7fiL2bN gpJRuk4emWh1ktJoIL7cO2ueZ0LaJPhZ7IkR9y/kwXbi/HGtZuu2ZNCYmrXMletTHuGF qXz8V8IBMnmyIx8jvGusEq/pSRYHm6VEouUsPTEBWYuMxKuQDLhBSZVRWaJf9mFjwbxF j0rC/acc+jRvERMOKHagvB5BM9qxSIYjPiaLgEaQ8j9vSDm4tvjMuZLFDJYnFoFCsL84 mPlw== X-Gm-Message-State: AOAM532IXFwU7B7cOlOjPp6BTZUVNaL1sVfB8EFxUa0C3UP4x37fIFAL yrLfpLgLdzoKvaU4+Pwd3Bet5XdodiRh2Re8okHmrzEcixneBIk0PUyTqNMqSF/5ru3HGCq1OmZ RXkj91xu630OINGP7eGyvwShD X-Received: by 2002:a92:9406:0:b0:2be:6ace:7510 with SMTP id c6-20020a929406000000b002be6ace7510mr10721171ili.291.1647918588742; Mon, 21 Mar 2022 20:09:48 -0700 (PDT) X-Received: by 2002:a92:9406:0:b0:2be:6ace:7510 with SMTP id c6-20020a929406000000b002be6ace7510mr10721153ili.291.1647918588534; Mon, 21 Mar 2022 20:09:48 -0700 (PDT) Received: from ?IPV6:2601:280:4400:a2e0:7336:512c:930d:4f0e? ([2601:280:4400:a2e0:7336:512c:930d:4f0e]) by smtp.gmail.com with ESMTPSA id d14-20020a056602328e00b006494aa126c2sm7889638ioz.11.2022.03.21.20.09.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Mar 2022 20:09:48 -0700 (PDT) Message-ID: <0d0fb94a-ff66-ac31-e126-0eaf4dca0d6a@redhat.com> Date: Mon, 21 Mar 2022 21:09:46 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v5] mm/oom_kill.c: futex: Close a race between do_exit and the oom_reaper Content-Language: en-US To: Michal Hocko , Davidlohr Bueso References: <20220318033621.626006-1-npache@redhat.com> <20220322004231.rwmnbjpq4ms6fnbi@offworld> <20220322025724.j3japdo5qocwgchz@offworld> From: Nico Pache Cc: linux-mm@kvack.org, Andrea Arcangeli , Joel Savitz , Andrew Morton , linux-kernel@vger.kernel.org, Rafael Aquini , Waiman Long , Baoquan He , Christoph von Recklinghausen , Don Dutile , "Herton R . Krzesinski" , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Andre Almeida , David Rientjes In-Reply-To: <20220322025724.j3japdo5qocwgchz@offworld> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 3/21/22 20:57, Davidlohr Bueso wrote: > On Mon, 21 Mar 2022, Nico Pache wrote: > >> We could proceed with the V3 approach; however if we are able to find a complete >> solution that keeps both functionalities (Concurrent OOM Reaping & Robust Futex) >> working, I dont see why we wouldnt go for it. > > Because semantically killing the process is, imo, the wrong thing to do. My > performance argument before however is bogus as the overhead of robust futexes > is pretty negligible within the lifetime of a lock. That said, the users still > have good(?) reasons for not wanting the lock holder to crash on them. From my understanding, the whole point of the robust futex is to allow forward progress in an application in which the lock holder CAN crash/exit/oom. So semantically nothing is wrong with killing the futex holder... the whole point of the robustness is to handle these cases. We just have a case were the oom killer is racing with said handling of the futex, invalidating the memory before the exit path (handle_futex_death) can awake one of the other waiters. -- Nico > > Thanks, > Davidlohr >