Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3791210pxa; Sun, 9 Aug 2020 11:46:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydHstJuFHW9wSRJkbqXVe3nx51R0HWUemPCDFxIHj3JgvalZNhGccNowOaWHEsUKbAfe2w X-Received: by 2002:a50:ee0a:: with SMTP id g10mr17201616eds.289.1596998799874; Sun, 09 Aug 2020 11:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596998799; cv=none; d=google.com; s=arc-20160816; b=UMnZsPouFE6wQP31IcZw7lQcTYSiZc2zB0PXmSbchYRLIYBrk3M695dg5w2AyKIBN2 m4Cu6BgZmOZesemMwW5gnZhoVirFT47OHKCGImKWn/qAxm+HuJzen/LubTwfmQJNDOQ5 Lxs8qucQ3/ow22pkICHJSPk+zKOXx8sNOLheLzra/uIAmWXKUftXyHZlwfuxd0T2jq+y LXIa3UyIlmMu1p0PARq8IA1ZUheG+T2QJErvQhxOIgnRDqL295BO3G68AI1wLtcTONo7 aY3I9uI3YOKYZrGeksYJ2fdG4ALTMqKfjPmBzE4HNE4FrIwDvJHi0uk6q/TK/oD4kHdi 55VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:dkim-signature:date; bh=WFLB3TBK6fJfIcKCoZtE+lRNYpp7h26frAFau4FZd5U=; b=pXBnNghKut8C0sBYmHToLrURRxLfOUGPdKKa7FiuWWKYEQiOnBW/cNa1LsA83tXIWY jdHE+sPQ5U44qqFvm0qpFLi78+GLxuUvZLfM1YHdtYL5dyx6Nn9mEr5ZihhUIOq7OtFM Th/BnntaQ7srqBfEQ8GuCjesVgkFfrySinel2DRL1iRfpQUKiVogyhj1vAbF4oCGbzD2 Som3yquErB/77lT0PpwHKgBaF3reL/pueNzU8qXhtMVUtsOwvUTqezti865yQWGThk47 ilJSevI0vvpDSZsseTe6qe5inLjUj5vnBaLiT7ah/pgRcijRbkgmViar5+my9+TekKW+ LCag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Bzp4nvwY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Fsv0VzaB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p7si9284807ejc.96.2020.08.09.11.46.16; Sun, 09 Aug 2020 11:46:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Bzp4nvwY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Fsv0VzaB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgHISmv (ORCPT + 99 others); Sun, 9 Aug 2020 14:42:51 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:46754 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726199AbgHISmv (ORCPT ); Sun, 9 Aug 2020 14:42:51 -0400 Date: Sun, 9 Aug 2020 20:42:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1596998569; 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: in-reply-to:in-reply-to:references:references; bh=WFLB3TBK6fJfIcKCoZtE+lRNYpp7h26frAFau4FZd5U=; b=Bzp4nvwYV/adkunmZqjDgzm4J8ZvNK0+EFM3qznN9T/r/eIHKQJMbE6dRcRkY2gk1CWp6n zC3/SiPizr67T9Q7KnmPsn0bf4F86l8695uf+wd6sb9nKQgx6QjpUD0uhAKNlRvfC9OkZE bUN6Xir+Y8wlwSbmKXtGWDphp+TuBcjE4kkx5KiBLe1vhyikx6L8kyZXlX6BByRIye7Eh4 xb9XmrIaof/SvLhq9xxwGnDX4VmPwWATxy2bdoBhT5lUzMK4FqcbqSBQ0iO0/zKVCm/Zd7 OdiG0Hi9W8FYGiVNJbZIDSX4X6sVR++IM+2wHDDgn4MkTDhEV13MLhdgVe76Zw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1596998569; 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: in-reply-to:in-reply-to:references:references; bh=WFLB3TBK6fJfIcKCoZtE+lRNYpp7h26frAFau4FZd5U=; b=Fsv0VzaBJjZ4X6r+zG/tgnVyugFlwIw3Kj34YpoG5f7cNhBrZuKTX6ef63RuHoyR3pJ6GM hDfvoRMkmlG6WvBw== From: "Ahmed S. Darwish" To: Guenter Roeck Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , "Paul E. McKenney" , "Sebastian A. Siewior" , Steven Rostedt , LKML Subject: Re: [PATCH v4 08/24] seqlock: lockdep assert non-preemptibility on seqcount_t write Message-ID: <20200809184251.GA94072@lx-t490> References: <20200519214547.352050-1-a.darwish@linutronix.de> <20200720155530.1173732-1-a.darwish@linutronix.de> <20200720155530.1173732-9-a.darwish@linutronix.de> <20200808232122.GA176509@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200808232122.GA176509@roeck-us.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 08, 2020 at 04:21:22PM -0700, Guenter Roeck wrote: > On Mon, Jul 20, 2020 at 05:55:14PM +0200, Ahmed S. Darwish wrote: > > Preemption must be disabled before entering a sequence count write side > > critical section. Failing to do so, the seqcount read side can preempt > > the write side section and spin for the entire scheduler tick. If that > > reader belongs to a real-time scheduling class, it can spin forever and > > the kernel will livelock. > > > > Assert through lockdep that preemption is disabled for seqcount writers. > > > > This patch is causing compile failures for various images (eg arm:allmodconfig, > arm:imx_v6_v7_defconfig, mips:allmodconfig). > > In file included from arch/arm/include/asm/bug.h:60, > from include/linux/bug.h:5, > from include/linux/thread_info.h:12, > from include/asm-generic/current.h:5, > from ./arch/arm/include/generated/asm/current.h:1, > from include/linux/sched.h:12, > from arch/arm/kernel/asm-offsets.c:11: > include/linux/seqlock.h: In function 'write_seqcount_begin_nested': > include/asm-generic/percpu.h:31:40: error: implicit declaration of function 'raw_smp_processor_id' > > Reverting it fixes the problem. Is this being addressed ? > @Peter, I think let's revert this one for now? Shall I also send you a version of: [PATCH v4 09/24] seqlock: Extend seqcount API with associated locks https://lkml.kernel.org/r/20200720155530.1173732-10-a.darwish@linutronix.de/ with the problematic "lockdep_assert_preemption_disabled()" removed? > Guenter > Thanks, -- Ahmed S. Darwish Linutronix GmbH