Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5479584imu; Mon, 26 Nov 2018 00:41:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/VuLR+ew6CdMJrDV5JF5flL7sd8/pUaZEZ3EqgZ80Xjnm3Acv4mlJkoPuXBUJrt1bA0OXLE X-Received: by 2002:a63:8742:: with SMTP id i63mr23693033pge.298.1543221704641; Mon, 26 Nov 2018 00:41:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543221704; cv=none; d=google.com; s=arc-20160816; b=YxYLyw9I4p+p9AOnkdXdccspeqnZM846quSY4xCFhcTBHoyReUkreQYbCqHn2Gf5G9 LHqWyitmmT9y7tLor4BDK29AeJem6SZuq1QrmotClJNJSKfzKsw9VP2cKQiKfoVDLcbQ wDMO6ro4LDQJnRW7V/Wl2m7Vz6HVnk1eF9k0x7svAdHnzgSNuIv3ZVZUM2yQRm45nEvc zv/T81HBKZ/ajlNzPK5uV6Nq1FZ1koiY96ZXrA+3wJXP6NcJzNVDUlBjrhyfclqI5It7 xDmea8K6SJd5vkGNk/2S6ietqbKL64BJvEQLbRa79pLE0tv8ComKeu1tjrGnkNfHHvI9 GabA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dFfCRLDk1yob2SgCd+1I3aUGQ8QQYq7LIE7duVE0qvI=; b=B/mBy1M06s4ampjwIBJD9mNKAX1M0i8/ANU90HCCQ79vG87FHfS1Co1pOREvllaIK9 LW7anqsHf0lwtJSNBMFb0CHlMldBf7AUjTmmVJjJKc+biSPyYMKmEwwDRWgCbn6ESi/4 FHGM+ds5NYwekncjgf3+eA5gFtqPb5/yznNLetaEOhu0v8r0k2nkenKyfh6n4RLw7kQ3 bEfEnqkCUBP5ryCC4rEX65NxW9ukt9NFRan6DaL6z0cwY5JQ7G0J4mrt8C17IcIxwQka GQlZCgfMvZR283Zogds+LG4OcTcnVb0g/wf3lVxMf0cyrQCAee3ieteO9NPy5sWbVek2 2BIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UATschJS; 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 c10si63555505pgj.416.2018.11.26.00.41.29; Mon, 26 Nov 2018 00:41:44 -0800 (PST) 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=UATschJS; 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 S1726282AbeKZTeN (ORCPT + 99 others); Mon, 26 Nov 2018 14:34:13 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36066 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbeKZTeN (ORCPT ); Mon, 26 Nov 2018 14:34:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dFfCRLDk1yob2SgCd+1I3aUGQ8QQYq7LIE7duVE0qvI=; b=UATschJSxShFT7IxiJ7jXlQ8N 5fMMMj2K30Isa1o0nO+HbuRB1pBoqpCB0mgty7P9LvOrwQYvJKvguqH9cvjmrhmoUgc0AZ0VqQuht upqHweYjyKoSrz2/QBtQnSPexRyZqswQyTGaUjpDIH6zulZNZ3crjyho+UNcj9wacWCQ1/6a00/Gj 3/53O6Sqj+NcqA/yt3ZaxIwInwswd6REMyBzMVsi6L8tGeZq0Rq5J3Ak28BqtLXWFFQYpxV4MWkAn ir0jY0cW2lvfBJ5EdciWxZSxGEXqsSqI9s96PgKQdUa5TgCf7Yr1+J6MkJGj5Yp2TiXYrRysOY4tV hWgTT3lZA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRCRg-0002IN-0R; Mon, 26 Nov 2018 08:40:44 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 09C6B2029FD58; Mon, 26 Nov 2018 09:40:42 +0100 (CET) Date: Mon, 26 Nov 2018 09:40:42 +0100 From: Peter Zijlstra To: Sebastian Andrzej Siewior Cc: Andrea Parri , zhe.he@windriver.com, catalin.marinas@arm.com, tglx@linutronix.de, rostedt@goodmis.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, boqun.feng@gmail.com Subject: Re: [PATCH v2] kmemleak: Turn kmemleak_lock to raw spinlock on RT Message-ID: <20181126084042.GK2113@hirez.programming.kicks-ass.net> References: <1542877459-144382-1-git-send-email-zhe.he@windriver.com> <20181123095314.hervxkxtqoixovro@linutronix.de> <20181123110226.GA5125@andrea> <20181123110611.s2gmd237j7docrxt@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181123110611.s2gmd237j7docrxt@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 23, 2018 at 12:06:11PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-11-23 12:02:55 [+0100], Andrea Parri wrote: > > > is this an RT-only problem? Because mainline should not allow read->read > > > locking or read->write locking for reader-writer locks. If this only > > > happens on v4.18 and not on v4.19 then something must have fixed it. > > > > Probably misunderstanding, but I'd say that read->read locking is "the > > norm"...? > > > > If you don't use qrwlock, readers are also "recursive", in part., > > > > P0 P1 > > read_lock(l) > > write_lock(l) > > read_lock(l) > > > > won't block P0 on the second read_lock(). (qrwlock somehow complicate > > the analysis; IIUC, they are recursive if and only if in_interrupt().). > > ehm, peterz, is that true? My memory on that is that all readers will > block if there is a writer pending. Since qrwlock is the more strict, all users should use its semantics. Just like we cannot 'rely' on the unfairness of some lock implementations.