Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp918422rwr; Fri, 5 May 2023 06:53:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5dY8z+Iq9r0C4cEfo5FaAtzq6vRJYbHswxaJp1hDuojgQyQ2JHEoG9vOWy4Lkvewll2JW6 X-Received: by 2002:a17:902:e5c3:b0:1aa:d6ad:4eaa with SMTP id u3-20020a170902e5c300b001aad6ad4eaamr2367318plf.2.1683294809280; Fri, 05 May 2023 06:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683294809; cv=none; d=google.com; s=arc-20160816; b=aIvzct5GQJvInhFRpBlj+DYy+S4+D2x6LlP0I/2ofh01WIQQvv+ya3k/f19OiWZ2Pz 2Ckg36EgQwlMuMSIlifruDwX46+TH6zTEHAel04a+2kxvadiayd2Dxj/nqqlWik3Ga4u Uv7AqJgzUd1QtzYQsVJUtRHlSWVoG0u9HpcUoGCeWDboNwWvn98aiOZ2R65dmo/naCHo rA1O962g4fyK4K3t1IrzRhTlawtRI312kCr4D7f00h7HSssdy1rX+VQI560rXtTKjpVJ 86PL5AAj3YmlUJcWwyULnZPss8OkPsbMxKOEBH0M/1c4vXcBADMOBIjeTHRt/7mGLcqd QgCA== 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=066HoPG8L7DWq++F/dgN3CWaa2WyV8VEsCWGN+J9Cbw=; b=z1OvUVsA7Cecg3QkA63+4D8qyrgcYU7QN2jL1vwPeuhYHAMFD/K3D73PnAbXYXLKJ1 hLlhOpMrw7Z+Apb81xaHE0vH6OVEbQ4mi01tBlzev6JdTtMNGe+/XYwu8HiraAUlmR/2 ZWPcf8Ji1i8cGs4vlu43t4BA+nsHRgjna4DZNVmyJ9Apx2kjYzO/L6XAO4qrwadUrjID w//3sARbL497yX4XG8jmZKm7aIFqWriabQVWV7AGPmAbLr7OFs2O4MLWsZcFJuHKOjCK dmrY4U/gkhlUKl55v3pHs09LXxPtcgcANCwaDDqanUBDirF6bo1FLNOud4mYAt4Q9CuW Ijvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=nb5bvxpC; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m4-20020a170902db0400b001aaf4d2eef6si1877313plx.370.2023.05.05.06.53.14; Fri, 05 May 2023 06:53:29 -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=@infradead.org header.s=desiato.20200630 header.b=nb5bvxpC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232680AbjEENj7 (ORCPT + 99 others); Fri, 5 May 2023 09:39:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232569AbjEENj6 (ORCPT ); Fri, 5 May 2023 09:39:58 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B704120744; Fri, 5 May 2023 06:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=066HoPG8L7DWq++F/dgN3CWaa2WyV8VEsCWGN+J9Cbw=; b=nb5bvxpC+oeV8cZk6KZfCT3vZb gIXQremTJT2YJeYKJMY9hrvU69IXUBDVchzTwpNf+LR5XRoE1o9K5u6A63TZizTiQvaolVCP9aVZ8 5w476mazT9ddUcAXuTUjvk4+tgJj+7jGTYXPFffpElC/ig2HaU129w1JI+0Baoeu5LwS1TsNym98i 9nNYtxA9LUWWmqr4DerVwLuiltds36JCy7d69qfkcPVa44r1hIp1UbQ9u84uCV7PWJWMo6vcB2O2D 8K+RmAvSHqadux/g0L+yNlVjefULYZKieYrNgjC7hkZe4w8H7gCX96DSVM+a1C497LBID+3iTiFOW EIHqw56g==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1puveK-003GP7-0N; Fri, 05 May 2023 13:39:04 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 2D15B3003CF; Fri, 5 May 2023 15:39:02 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0D20C21353003; Fri, 5 May 2023 15:39:02 +0200 (CEST) Date: Fri, 5 May 2023 15:39:02 +0200 From: Peter Zijlstra To: Oleg Nesterov Cc: Wander Lairson Costa , 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: <20230505133902.GC38236@hirez.programming.kicks-ass.net> 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> <20230504152306.GA1135@redhat.com> <20230504153057.GI1744258@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230504153057.GI1744258@hirez.programming.kicks-ass.net> 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_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 Thu, May 04, 2023 at 05:30:57PM +0200, Peter Zijlstra wrote: > On Thu, May 04, 2023 at 05:23:07PM +0200, Oleg Nesterov wrote: > > Yes, but as Sebastian explained CONFIG_PROVE_RAW_LOCK_NESTING won't like it. > > This can help: > > https://lkml.kernel.org/r/168303194177.404.8610123576035502891.tip-bot2@tip-bot2 Explicitly: static inline void put_task_struct(struct task_struct *t) { if (!refcount_dec_and_test(&t->usage)) return; if (!IS_ENABLED(CONFIG_PREEMPT_RT) || premptible()) { /* * ... same comment as the other patch ... */ static DEFINE_WAIT_OVERRIDE_MAP(put_task_map, LD_WAIT_SLEEP); lock_map_acquire_try(&put_task_map); __put_task_struct(t); lock_map_release(&put_task_map); return; } call_rcu(&t->rcu, __put_task_struct_rcu); } Should not complain since we tell it to STFU :-)