Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2923648rwb; Fri, 16 Dec 2022 08:05:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf4tXI9F44Ly64MRIAzz+ewylrA8WsGcvLC9Up1sl4pIWbbqajktihRByYG6GvYgeksBTjTh X-Received: by 2002:a17:903:40ce:b0:189:c83f:d5 with SMTP id t14-20020a17090340ce00b00189c83f00d5mr35621381pld.52.1671206734920; Fri, 16 Dec 2022 08:05:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671206734; cv=none; d=google.com; s=arc-20160816; b=R9VseTJNr7EOVT3zDsTd6EPBntXU+u6mowMObN8ysVUYp60ksUwghvupTjWP5VB1w1 M8dJRkL92bI7RHDyENuhwy4yc9QiY+wfZd3AkRqGgKPhy45dTE/yIXAtIPKosOK5k1O+ 58cgUOMff4nD2KkkCNgEiVE+ls2LX7cg0nL/T400wCaIt6EGvuDyzFab3EedJeKp1BkO qKSIFd7EzO5S94uneq3z8Pa4toBgfl8Ql6fJNmcloyx6QqSq4QdpzwwU120rVHIVfRpG vPWm/37Dv3COzd7aVlil3d9zp7tHkwju/mQ+izon3jLADtVLHPxM3+L99qXypsTotuuz IkXg== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=M0TDp9CXE6EJ1v0ndnk2zrjrOeWR6PHCVWrWopj1g64=; b=RkuNUaQ6J0tXAYa4dN/0epClsPDF/KHIycj7zxRu5g1i7DtQpP7AFgelIZvZkar/us UY/5NB1qJcTGF79OpwQ3TFAsuX5CN3r6V7Q2//Lb5bafv4pUjlxxWKcmXZIibqwKW6q9 Vu4cbHfl6NSQ4xMglHkhCD1Yfwl/UsTyuc0K9p2FnGtyoCOLAHvR0TkjnvZzujzd7J6e mv9L0E+nA1w3IsYYgxCtW67PbmUq2XsCRwFWHP+tJ3mKTOtMD3PUpat1pPHyS3X3Y/Nj 9ysUYckevMOWB1Pbf6Nlp+ouROHSYlO8nSR81BRwkepqdhXh3h38d2XJfSQGyANsX7E0 dujg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=yYicdBUf; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=7zJAOWt+; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020a170903121200b001842f465c10si3143779plh.438.2022.12.16.08.05.26; Fri, 16 Dec 2022 08:05:34 -0800 (PST) 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=@suse.de header.s=susede2_rsa header.b=yYicdBUf; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=7zJAOWt+; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230402AbiLPPEC (ORCPT + 68 others); Fri, 16 Dec 2022 10:04:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230488AbiLPPDp (ORCPT ); Fri, 16 Dec 2022 10:03:45 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 856605EDE2 for ; Fri, 16 Dec 2022 07:03:43 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F030C34338; Fri, 16 Dec 2022 15:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1671203021; h=from:from:reply-to: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=M0TDp9CXE6EJ1v0ndnk2zrjrOeWR6PHCVWrWopj1g64=; b=yYicdBUfKyS7bvUq/IIfaKTzLwnGceStF+iWl2iTavJxSG9sOoKdKGE5nKHYqBlWaGScJk PZ0/LWWvPV9UKpniaxt0FzMSO2u9Iryr1vxO/UenvTc4q6A5h5c23lxqUPlSYWUESctZh/ NBFVg//skOalfaq0m1K9vsdpNvDRM90= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1671203021; h=from:from:reply-to: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=M0TDp9CXE6EJ1v0ndnk2zrjrOeWR6PHCVWrWopj1g64=; b=7zJAOWt+YnLi2PcDaI9RaDnxjKu3Tp0XPNfpnN71uVg5Z4QakiwxxoZPpHwS6aLrUDfkmu HZt1mXuhZVsbq2DA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DEE56138FD; Fri, 16 Dec 2022 15:03:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EbRlNs2InGOdewAAMHmgww (envelope-from ); Fri, 16 Dec 2022 15:03:41 +0000 Received: by incl.suse.cz (Postfix, from userid 1000) id 758A829798; Fri, 16 Dec 2022 16:03:41 +0100 (CET) Date: Fri, 16 Dec 2022 16:03:41 +0100 From: Jiri Wiesner To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , linux-kernel@vger.kernel.org, john.p.donnelly@oracle.com, Hillf Danton , Mukesh Ojha , Ting11 Wang =?utf-8?B?546L5am3?= Subject: Re: [PATCH v6 3/6] locking/rwsem: Disable preemption at all down_write*() and up_write() code paths Message-ID: <20221216150341.GA19127@incl> References: <20221118022016.462070-1-longman@redhat.com> <20221118022016.462070-4-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221118022016.462070-4-longman@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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_PASS 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, Nov 17, 2022 at 09:20:13PM -0500, Waiman Long wrote: > The previous patch has disabled preemption at all the down_read() > and up_read() code paths. For symmetry, this patch extends commit > 48dfb5d2560d ("locking/rwsem: Disable preemption while trying for rwsem > lock") to have preemption disabled at all the down_write() and up_write() > code path including downgrade_write(). > > Suggested-by: Peter Zijlstra > Signed-off-by: Waiman Long > --- Tested-by: Jiri Wiesner -- Jiri Wiesner SUSE Labs