Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2945382imm; Thu, 24 May 2018 19:37:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo4Qsmji5Flhq0wY3bOuzEsWp3Cn5ZjyFlGDcc8eXAQnLcGvqwTQ344yr4CaacYHIx3nvPC X-Received: by 2002:a63:4c8:: with SMTP id 191-v6mr449142pge.129.1527215854624; Thu, 24 May 2018 19:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215854; cv=none; d=google.com; s=arc-20160816; b=lRTrPQgRLz+AyuioOJ7Zo3LOEKHVd8dJmTWl/h8K63C8g96qE4cXbO9pr00VdwkZXm wUli+gtrFbAJY5wZu7VHSFqhj/XgIHD0YMc2NnnyldTTniArRXeV8/DxBhwf8O6IuQc6 lofg+0howHbLG+F2Za0Mh5BEZiYz3duLkoogkN0qO8ZMKA72EyCN7CiTDCgRInjQHCSx 8XgT/3l27PwLg82Seifc+lyvbMtVAhFe9lXglV71rN9kBpW9Q9FZuFWXeNcNmvOAiHS5 sgphCD3SKj1nNlOGPHZP9qtpF/UGgxhfYLpZ4f/6EnCLK5f6A9EL0QiwWiJHhUYQ05/h 3F8g== 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:arc-authentication-results; bh=V//9bfEQJGVnlvFfsmQCHzKjyAHvqtNfFsydEkDgKzk=; b=nptIW8QpLzNxoi5hhrb6hfUSw1hcXE++qkOcVbBYMoG0vLqpw1nYvZA3X/pYt4iu9c iMEpNsAaVKTxhyBUMBhG6H6MKGpyGKChsqYR6GHzDBvctt8cV1VvUbxc7U/M60LMOw4u kgkjN87WACOyn+7+VRKCgX8k3srwh3gotB21t8bMnKsJOR1Br+G8k7Zd2940r3ktDjfd vKZHLSBwPmQu4uJMUVA19I4cNxLdBIUG0IBBE3GAipb8H8wxqtWOaDjHinQCQD5mB16d NudUWa5SApfUPAjwVpkMDEZhsWeq3NvRK8xPhsUdjnEzSTi675XX/lXJxROgiVQ8kQy9 uKdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=V1jYdcD+; 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 b17-v6si17617195pgv.196.2018.05.24.19.37.19; Thu, 24 May 2018 19:37:34 -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=V1jYdcD+; 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 S1032722AbeEXS2T (ORCPT + 99 others); Thu, 24 May 2018 14:28:19 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50574 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032629AbeEXS2S (ORCPT ); Thu, 24 May 2018 14:28:18 -0400 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=V//9bfEQJGVnlvFfsmQCHzKjyAHvqtNfFsydEkDgKzk=; b=V1jYdcD+rjXQxVXp5JLmaj4bO HgvJlvxEctg570kXZsB86BZY6vRTUpCZ0R43pYuFh2Msa5kJdEvC5OkKGosyYm8DGPvlbrrD0Jebx 1A7o4L6q5w13WtaDVt0fJEGX1JMY8vEIIaVCVUVlfrxJdAtqzUkRy+l7vL32Puh1ig7AABxVKwDMq UYloAvDQ8ZcDgsmD2jcepAx7AksOU7V/vFdO60ErrdHZ9c8YMK7+QZqEUU1OXtzd2jr9wBpb6BIcD UaKdM+7EtBYJZGop6HL5GnO9RC5f6i/fjsswWtEFEQtz7AMPpTCept8c7x6o+bUpq3Az19tT3rn1k BNJStViZw==; 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 1fLuy9-0002ag-8C; Thu, 24 May 2018 18:28:09 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C86842029F1CB; Thu, 24 May 2018 20:28:06 +0200 (CEST) Date: Thu, 24 May 2018 20:28:06 +0200 From: Peter Zijlstra To: Sodagudi Prasad Cc: Boqun Feng , Will Deacon , Linus Torvalds , Kees Cook , Andy Lutomirski , Will Drewry , Andrew Morton , Rik van Riel , Thomas Gleixner , Ingo Molnar , Eric Biggers , Frederic Weisbecker , sherryy@android.com, Vegard Nossum , Christoph Lameter , Andrea Arcangeli , Sasha Levin , Linux Kernel Mailing List Subject: Re: write_lock_irq(&tasklist_lock) Message-ID: <20180524182806.GL12198@hirez.programming.kicks-ass.net> References: <0879f797135033e05e8e9166a3c85628@codeaurora.org> <20180523130547.GF26965@arm.com> <20180523153607.GD2983@arm.com> <20180524124928.GH8689@arm.com> <20180524135158.GA19987@tardis> <618c3c6392edb632695ca31d62b319bd@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <618c3c6392edb632695ca31d62b319bd@codeaurora.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 24, 2018 at 10:37:25AM -0700, Sodagudi Prasad wrote: > Kernel version is locked for couple of products and same issue observed on > both 4.14.41 > and 4.9.96 kernels. We can only accept the stable updates from upstream for > these products. > If QUEUED_RWLOCKS works on above listed kernel versions without any issues, > we can enabled QUEUED_RWLOCKS. You want: e0d02285f16e ("locking/qrwlock: Use 'struct qrwlock' instead of 'struct __qrwlock'") 4df714be4dcf ("locking/atomic: Add atomic_cond_read_acquire()") b519b56e378e ("locking/qrwlock: Use atomic_cond_read_acquire() when spinning in qrwlock") 087133ac9076 ("locking/qrwlock, arm64: Move rwlock implementation over to qrwlocks") d13316614633 ("locking/qrwlock: Prevent slowpath writers getting held up by fastpath") IIRC, enabling QUEUED_RWLOCKS will 'work' but esp. that atomic_cond_read_acquire() one is goodness for ARM64. > Can we go ahead with Linus suggestion for these kernel version? > So that IRQ wont be disabled for quite a long time. > > static void tasklist_write_lock(void) > { > unsigned long flags; > local_irq_save(flags); > while (!write_trylock(&tasklist_lock)) { > local_irq_restore(flags); > do { cpu_relax(); } while (write_islocked(&tasklist_lock)); > local_irq_disable(); > } > } First you say you can only take stable updates, then you ask for a gruesome hack that will seriously regress architectures that do use qrwlock which will hence never make it into stable. Just take the arm64 qrwlock patches and pretend they're from stable.