Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp643321rwe; Fri, 26 Aug 2022 11:23:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR5hDFioFTgpdjr+mxzd61ns6GtGCfg5bG8FVlXHFp31EfHkuJCELNgi6uLeiI0NKBNYv6/1 X-Received: by 2002:a17:906:6a02:b0:730:9f44:2bff with SMTP id qw2-20020a1709066a0200b007309f442bffmr6217868ejc.209.1661538227226; Fri, 26 Aug 2022 11:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661538227; cv=none; d=google.com; s=arc-20160816; b=S/1LOJ/J5wCfZ07jXztozS+xPHBUogyuNOCGm78P25F+NPbP5A/ZrFc8yF59i2DRyR 59xr6KcyBpl34TGl+2SlHn4FqKlYE/EEqkFEhVndPoHqbf9RRGFvftqL9VN8OVJhNgrX MfhvRoPBxzKrt4+R8zM+R1j+6IwSzxC5ORy7UNnsiwiwNYQi74MDT/37H1iWU90KbErE oRL5W1ksGRW4PTxKf4/tfM7Y0ZpXZu5DRv6PwSNVn66lSHugHIc3z/T1RkWqX5Pc/6kv wrePJZUCJVj1NP+wwwyiawQk0WHmQDI9rdsU9ZLORGEst66Bs1EKl1F5DjYMs2x09gO1 +EAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=o39pC0e0iUZ9ErVjavdMoUqa+PLaf2QN35gNaazBmG4=; b=HNcND/0CsOi1NS4Ee7UokUT/MLp6UFCjnzoO8w6xgxQopSS8gKgb72D28dx97ppWzz 9wyO6I8Fao10sdwcl7BhvWNHBgtPEiHvAlDhOtsJ5e8zOnVV9XHSxDaEXgjfLzOekWFR 2iSRz7qRZ9VoX+LSbWMkaX73uxaZSmS6JwwE1gUPnYlL6uIWZnSNbn1HFeclUJHuGasp XP3dgeEQfPcnLs0euoduBS8hRNdZk6XPVNE5TtDedGKVkEPwFRr7bu9mCjkglsDWbSML gagWy4Lt722fsUwO2Vm9TAlJnM+Wjlv/YuRtrG8MaquW2UcMmRxaAZ6XPqKTNsnlse5Q l9fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dHiviORw; 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 u5-20020a509505000000b0044785ed87d7si1621750eda.404.2022.08.26.11.23.21; Fri, 26 Aug 2022 11:23:47 -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=dHiviORw; 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 S1344766AbiHZRvE (ORCPT + 99 others); Fri, 26 Aug 2022 13:51:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344379AbiHZRvA (ORCPT ); Fri, 26 Aug 2022 13:51:00 -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 C19DC3D5BA for ; Fri, 26 Aug 2022 10:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661536258; 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=o39pC0e0iUZ9ErVjavdMoUqa+PLaf2QN35gNaazBmG4=; b=dHiviORw5RSh7F0Uc7Qh1+y+Qpzi715+FX5NsmUNFOnFcGITzZdoaR25RIgRfkrWVnHdOp p7BaKkGJ5OJeIFS+1h6yW6FV3RGxF6WxkjxWbvSFC+IdYxxdAD5skerudLJouTs10Xbi1r +wuVBts24/HO4FwdxjOPLdX0nMsi89I= 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-446-y91sOu4LNwKQV203oajeaA-1; Fri, 26 Aug 2022 13:50:53 -0400 X-MC-Unique: y91sOu4LNwKQV203oajeaA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5C23F2919ED0; Fri, 26 Aug 2022 17:50:52 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3744918EA8; Fri, 26 Aug 2022 17:50:52 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id 27QHoqeL029108; Fri, 26 Aug 2022 13:50:52 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 27QHopVW029104; Fri, 26 Aug 2022 13:50:51 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Fri, 26 Aug 2022 13:50:51 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Linus Torvalds cc: Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Joel Fernandes , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH v3] wait_on_bit: add an acquire memory barrier In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_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 Fri, 26 Aug 2022, Linus Torvalds wrote: > That code sequence really doesn't matter, but it was interesting > seeing the generated code. Not pretty, but the ugliest part was > actually how the might_sleep() calls in those helper functions result > in __cond_resched() when PREEMPT_VOLUNTARY is on, and how horrid that > is for register allocation. Perhaps, use __attribute__((no_caller_saved_registers)) on __cond_resched() ? Mikulas