Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2708405ybh; Mon, 16 Mar 2020 08:14:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsW+pEQ2uGptrgPWzXyJTy77hSO0TJGiN4lHpUM0/PGMr6tsx4uDRCuiZY4JYeeLmWI4dr8 X-Received: by 2002:aca:ddc4:: with SMTP id u187mr5521793oig.129.1584371694863; Mon, 16 Mar 2020 08:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584371694; cv=none; d=google.com; s=arc-20160816; b=KrPmF+XdK+UJJO0ZZM3Om/oOpZOlHnflqUCLKVFtPr2UYQMX0bFEPxNa92MWE351MD ZUj3jUU4vHNAh5lSbplzplC+1FlLsrGcuaqjRXpRQWjviabcG8L3UfmUTSnlRDe2bzGX d7mpNK30ATUIQ52qeeHla69cYIvbkM3/5LPR5ScVpDg39Ueshfko+6AXvmDMk3lA6W2G 8MdObP3rqUHZNI0X8PaDFyZlJRT16elNUazZDUAOJvKxY0g/bmgnd2INBWMzcVVqJIks 2po+BzNYpYuXqb+rYpWnCdVxOtF33FzzI8FfvoljLsUkCu1Zkls5f02ywE6MGcFB55vF piNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Vl+Cf0ZuC3XZwjG76c59VMt7RhS7EZIRiTRbmqe9zmk=; b=TsnLmknzwIJ5ihYHp9OVojAGRQzk/M0xiXHcNipo1nSh48SkCEptPefYZOZtNHrRD7 4FBUDO3EHxA1JxkUVWy4HEMdcaY6Xe/yLkyIR1d04iiI47Q8HULClBTyjAssOKqLpq5k ocYqmwU0OxuCBK4RHm/u8nzjDyhi5jEflfOSYcb1/aYyehMxec2++d7jZHe4GLLbiSbH zsDM9Xq23OaRX1aFUFf8L0X9paJ+utRuD0YcR7Qf+XaYU5CQE41c45HKeJYTr9Zx5fu2 adCxKS1B9Dtva0xrgriPMEYTXnZppTHIGP/8rJcxOl+ZrSj/F45MyM92udKlKzYbZhZN 8HOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SdlmuNY8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si108345oth.143.2020.03.16.08.14.41; Mon, 16 Mar 2020 08:14:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SdlmuNY8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731770AbgCPPNq (ORCPT + 99 others); Mon, 16 Mar 2020 11:13:46 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52986 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729964AbgCPPNq (ORCPT ); Mon, 16 Mar 2020 11:13:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=Vl+Cf0ZuC3XZwjG76c59VMt7RhS7EZIRiTRbmqe9zmk=; b=SdlmuNY8kTO/HYkpoRHXV+09Fz ognI1JqujrUhRwxTTQN8bOgapO3nu5lae7DP0HW5ZRCwPCXWywqTso62Tz4lWV1L/lQymObYvU78W 3XdvW7ZftBP4Rkgi8BmsiSmVAuJeBAXfDDZJmQ3XZQ4KqV70WDvNVp/aF06k5YRF/GhDwy5yh/wfi v3QVIH56XZjyRAvCgmRXfn0yox6Zb03IvOsEQCL5opmy6yH0rYwUiXdpGbwiAUl3L6FMe0fEzhdUg JAjbxC7nLls5BYm2fjEbriAEDpaj3JYnIED6DYqgR5ldcEkg3qvGOCycrW8WYD8j4eVrmhfBadu02 QgmLKdeA==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jDrQz-0004GC-GF; Mon, 16 Mar 2020 15:13:41 +0000 Subject: Re: [PATCH 1/9] Documentation: Add lock ordering and nesting documentation To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Will Deacon , "Paul E . McKenney" , Joel Fernandes , Steven Rostedt , Linus Torvalds , Thomas Gleixner References: <20200313174701.148376-1-bigeasy@linutronix.de> <20200313174701.148376-2-bigeasy@linutronix.de> <2e0912cc-6780-18e9-4e4c-7cc60da6709f@infradead.org> <20200316103454.iodi65uzbpat4kv5@linutronix.de> From: Randy Dunlap Message-ID: Date: Mon, 16 Mar 2020 08:13:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200316103454.iodi65uzbpat4kv5@linutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/16/20 3:34 AM, Sebastian Andrzej Siewior wrote: > On 2020-03-14 15:57:24 [-0700], Randy Dunlap wrote: >> Hi, > Hi Randy, > >> A few comments for your consideration: > > I merged all of you comments but two: > >> On 3/13/20 10:46 AM, Sebastian Andrzej Siewior wrote: > … >>> +rwlock_t and PREEMPT_RT >>> +----------------------- >>> + >>> +On a PREEMPT_RT enabled kernel rwlock_t is mapped to a separate >>> +implementation based on rt_mutex which changes the semantics: >>> + >>> + - Same changes as for spinlock_t >>> + >>> + - The implementation is not fair and can cause writer starvation under >>> + certain circumstances. The reason for this is that a writer cannot >>> + inherit its priority to multiple readers. Readers which are blocked >> >> ^^^^^^^ I think this is backwards. Maybe more like so: >> a writer cannot >> bequeath or grant or bestow or pass down ... its priority to > > So the term "inherit" is the problem. The protocol is officially called > PI which is short for Priority Inheritance. Other documentation, > RT-mutex for instance, is also using this term when it is referring to > altering the priority of a task. For that reason I prefer to keep using > this term. OK, I get it. >>> + on a writer fully support the priority inheritance protocol. > … >>> +raw_spinlock_t >>> +-------------- >>> + >>> +As raw_spinlock_t locking disables preemption and eventually interrupts the >>> +code inside the critical region has to be careful to avoid calls into code >> >> Can I buy a comma in there somewhere, please? >> I don't get it as is. > > What about > > | As raw_spinlock_t locking disables preemption, and eventually interrupts, the > | code inside the critical region has to be careful to avoid calls into code > > any better? Yes. thanks. -- ~Randy