Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp710298rwr; Thu, 4 May 2023 08:37:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6vGzcAs0yU3LC9x1D0Y8wyuMO44T3sli6yIenbvgKosN5tX56YWD86Hw7MTmUk5kd1TsS4 X-Received: by 2002:a17:902:e88b:b0:1ab:1241:f671 with SMTP id w11-20020a170902e88b00b001ab1241f671mr4891357plg.29.1683214646938; Thu, 04 May 2023 08:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683214646; cv=none; d=google.com; s=arc-20160816; b=K3Y7cnktzsVEgLLbA8lgdqy9t+Ue74ge1URcZiBmLJlcXQak9XHM2t5gnn9ymRj7qa TCQXNBTfU1Ojtu/V8vmGTbV1tg/ap7wES/WEdx6NkWvYa6K384v+gS+/e1wW8sfVNjq5 jAzi0J/FMjwDCNE8hyluSIbGjz3QjiXvMKYUSO+d5nANlzCkEPtIuoYH9QYThiRp8LMJ kiofRNlhp/QVEuLbzyNCG+Lca/4aq/qj7syJLasBv8HYX5qnZWMF6F4G7+kBXftD4Kyp +lnTyhbVuYQ/sN7n6qEasDsApqRzdo2sK+UZxJc4TQkUlr44YOieo7CMyjgdYYW6URc2 g6Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Jnl2toVgwwItvy6XtFHZnmUDaDwxr0L/Z3lg2dwhqx4=; b=LAdCGeq/Erd5/j0NSQn2k9f4XJKJu5teacjnxLXWxBLGh4wIxUL1uKBklWrbM7qVEU IXBNqy9DOqVf3JOpefwd4F5+qAebECWRlFF/GGEJhv9QtKg/QxHu0kEybQlHIfRZbSD8 omI7+MjHdG9Bj+I1Eho/66SeBPk73NVZfaEn7jp2GKy2g1KgEBWq+r/+wRdlmBK2evVQ LBm/GmRDYsjSSzQhGbc6a+tLkT3knt/EGR3bdApu19STd0GQ7pt3lOAaemwz5jcZecab L811yvnxogyO7PtN/vslJvkTCNvk3OR7o+NzZLDsot/atGz+ZrCq8GJ0Wg3Vl+XX3cpv gLLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KfdFBcuC; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e23-20020a170902ed9700b001ab147e4543si5461850plj.418.2023.05.04.08.37.15; Thu, 04 May 2023 08:37:26 -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=@redhat.com header.s=mimecast20190719 header.b=KfdFBcuC; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230403AbjEDPYV (ORCPT + 99 others); Thu, 4 May 2023 11:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230218AbjEDPYT (ORCPT ); Thu, 4 May 2023 11:24:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 256654698 for ; Thu, 4 May 2023 08:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683213810; 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=Jnl2toVgwwItvy6XtFHZnmUDaDwxr0L/Z3lg2dwhqx4=; b=KfdFBcuC2gQHWJnDJ7jFEuVNXG70Fm6hkLxlS94bc4/QmjqSLmJw3tfv+bofy+q3aGzZM0 AMySwcYEGryVm/dGkG8QA/SeIoWZ9IXbQ3S+ik/A8oQu4ijRCtpI423aRzU8ErxYXBsRDY MbZ/gfBhIwm3pCGN/SX2FMS664YVq6g= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-512-6LWlnIc6OTKYxoO-Dh0TuQ-1; Thu, 04 May 2023 11:23:29 -0400 X-MC-Unique: 6LWlnIc6OTKYxoO-Dh0TuQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 58DFA3810B19; Thu, 4 May 2023 15:23:27 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.225.24]) by smtp.corp.redhat.com (Postfix) with SMTP id C171B40C2064; Thu, 4 May 2023 15:23:19 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 4 May 2023 17:23:15 +0200 (CEST) Date: Thu, 4 May 2023 17:23:07 +0200 From: Oleg Nesterov To: Wander Lairson Costa Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Will Deacon , Waiman Long , Boqun Feng , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , "Eric W. Biederman" , Brian Cain , Kefeng Wang , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Christian Brauner , Andrei Vagin , Shakeel Butt , open list , "open list:PERFORMANCE EVENTS SUBSYSTEM" , Hu Chunyu , Paul McKenney , Thomas Gleixner Subject: Re: [PATCH v7 2/3] sched/task: Add the put_task_struct_atomic_safe() function Message-ID: <20230504152306.GA1135@redhat.com> References: <20230425114307.36889-1-wander@redhat.com> <20230425114307.36889-3-wander@redhat.com> <20230504084229.GI1734100@hirez.programming.kicks-ass.net> <20230504122945.GA28757@redhat.com> <20230504143303.GA1744142@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 05/04, Wander Lairson Costa wrote: > > On Thu, May 4, 2023 at 11:34 AM Peter Zijlstra wrote: > > > > static inline void put_task_struct(struct task_struct *t) > > { > > if (!refcount_dec_and_test(&t->usage)) > > return; > > > > if (IS_ENABLED(CONFIG_PREEMPT_RT) && !preemptible()) > > call_rcu(&t->rcu, __put_task_struct_rcu); > > > > __put_task_struct(t); > > } > > > > That's what v5 [1] does. Yes, but as Sebastian explained CONFIG_PROVE_RAW_LOCK_NESTING won't like it. https://lore.kernel.org/all/Y+zFNrCjBn53%2F+Q2@linutronix.de/ Oleg.