From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 279B6C38A2D for ; Wed, 26 Oct 2022 01:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232489AbiJZBo1 (ORCPT ); Tue, 25 Oct 2022 21:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231628AbiJZBoY (ORCPT ); Tue, 25 Oct 2022 21:44:24 -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 50020DED02 for ; Tue, 25 Oct 2022 18:44:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666748662; 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=0dBwPisoLvc36FK8QiBJFlUXPREVTjgSq7b7Ap6qvWM=; b=UzVz5/3EPkfVueShUPNHYewdWuefg/202Vk8LG6eKV289t6kujPcneuYrxd6bW2/sPRjqe CyabRZxS8pGqvubRGwTAZSXSYBqF6DasYynbpUL06O3C3EdPqlb7sPpOAotsNZBnaRakq1 c2OOINi2BhCTTG+O8fHKoDM4AWqMfHA= 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-212-gtPx5h9vM1SI6ktIT9DBzA-1; Tue, 25 Oct 2022 21:44:18 -0400 X-MC-Unique: gtPx5h9vM1SI6ktIT9DBzA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7CFFB1C05EA1; Wed, 26 Oct 2022 01:44:17 +0000 (UTC) Received: from [10.22.8.133] (unknown [10.22.8.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id 223ECC15BAB; Wed, 26 Oct 2022 01:44:16 +0000 (UTC) Message-ID: <5d834f7a-dc62-308c-1017-1fb92c0efc62@redhat.com> Date: Tue, 25 Oct 2022 21:44:15 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v3 2/5] locking/rwsem: Limit # of null owner retries for handoff writer Content-Language: en-US To: Peter Zijlstra Cc: Ingo Molnar , Will Deacon , Boqun Feng , linux-kernel@vger.kernel.org, john.p.donnelly@oracle.com, Hillf Danton , Mukesh Ojha , =?UTF-8?B?VGluZzExIFdhbmcg546L5am3?= References: <20221017211356.333862-1-longman@redhat.com> <20221017211356.333862-3-longman@redhat.com> <980d882c-01b8-2ce1-663f-41a8a337f350@redhat.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/25/22 16:14, Peter Zijlstra wrote: > On Tue, Oct 25, 2022 at 03:55:09PM -0400, Waiman Long wrote: > >> That is quite a number of changes spread over many different functions. That >> is the kind of changes that may make it harder to backport to stable >> releases. > Yeah; don't care. it's the right thing to do. It also doesn't need to be > reverted since it's a sane and good property for lock-ops to have. I am sorry to confuse you. What I am saying is the original patch 2 of the series, not what you have proposed. I am fine about disabling preemption while running in the core rwsem code. As a counter proposal, I will suggest modifying patch 2 to disable preemption for the reader rwsem code as the writer code already have preemption disabled in the most critical parts. Then I add another patch to complete the writer side conversion for symmetry. Are you OK with that? Cheers, Longman