Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2367071pxu; Mon, 7 Dec 2020 04:58:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAhZnbIowoa8g0yhnfncB3A/0KfX/5PD5SUarvAW3tgJ/6UoBNQfzzZ+VFZkeKkXLwa7Rn X-Received: by 2002:a17:906:608:: with SMTP id s8mr18883743ejb.371.1607345931549; Mon, 07 Dec 2020 04:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607345931; cv=none; d=google.com; s=arc-20160816; b=oOkARZaAkaKZpzS+S8CBuFdPTkBWq/KT5uU5FwyNJWJwNu0Rx3O0JQJKybshJotrcK D0KJBKDlE7jq73Ci+O6koqrotVmOmsAjzF176Bkwk0gQFD4jqYwTUD9hSjyi69NaSjw+ p8rXXw/YvpyIg5MOQQueSDajd7/MhOHtjtqYrlirOmk0LcnTwXk+ICLsteGDZ3A9dEne OG4BSTuUScHG1T5VndIi4VD42ssI7/TPL8iG5XqT61qWKI7cQMkDHGCdfN/E9obzqM0z d3sG4GtlzspXxQ2zVxWxOUUbyVG/i2ohVcon5NVrbNsggRsqC8mcLoRA8XD9IbgphWLT kXhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YSUGplj7HrXl3d4m+FRlG+q1bwrz6RtuXMVuVA83zX0=; b=Q5KTB9Eh8ZEMXhT8Bldo7mkx0Ng08DWRJ2cObgvNx4V9DfWaaxC3ezcM9+20A+uBYR p4jseluhtH3lX8BfziJ61biyC5rMDaTyktc37LvtW5+gp/thU5z6TVDW0zqs4BU7Aa4J V/hEExlE6kiuZ+T2UhBwDEwuVV5WCRLHP8C/Fp6IPfKr15lFmTgb8jFe8woEOUmsGkwG VyCOb/ZrzdMovTavyjPeLV4E55bROXPg16BkwjffkczD3TSZkx0Qhc2x3ORUNjpPU03P 3t0vifzXftvifZVLfj3ZOUR3gdXaWUKO2reTvSrHlzlhSwNM4Y104kJloY3JN8R0TL4T ET9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=sJTwpfjF; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do13si6433891ejc.286.2020.12.07.04.58.28; Mon, 07 Dec 2020 04:58:51 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=sJTwpfjF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726164AbgLGM4w (ORCPT + 99 others); Mon, 7 Dec 2020 07:56:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbgLGM4w (ORCPT ); Mon, 7 Dec 2020 07:56:52 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A82C0613D1 for ; Mon, 7 Dec 2020 04:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=YSUGplj7HrXl3d4m+FRlG+q1bwrz6RtuXMVuVA83zX0=; b=sJTwpfjFu/XeZCXuuKMRvg6WKa vOZcrdYm/QO59AkATkF12knuCPWcpX8e0NVmO7wvofmFywTSEyfDfp/BR9CtveMEAseHAegvQeOuk Zm2D72ng64AhHfdj2YYLrKAll5yfby/1sNbblgKQMsBh/HKGAxQkvBiDroVd5HRAqCo4QCpNdtZCo GJud4mNNOyHvOt0PUaBv6VSY8OnonwjsBj+VzQGAHxOYVzuWwu2xshFh4UY+kKjCBfC7e0O2Rmxb/ p0Ewfvb1rgFPSngfA+KtQFDDO/twB88H7KTvawenP6m2nPwGe1iyGzA0AAUO6WIgPAWrHgQIDKVtJ C3WZbZtA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmG3i-0004pU-Gv; Mon, 07 Dec 2020 12:56:06 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id D852D301478; Mon, 7 Dec 2020 13:56:05 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C2ED7200AAFCA; Mon, 7 Dec 2020 13:56:05 +0100 (CET) Date: Mon, 7 Dec 2020 13:56:05 +0100 From: Peter Zijlstra To: John Ogness Cc: Petr Mladek , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH next v2 2/3] printk: change @clear_seq to atomic64_t Message-ID: <20201207125605.GN3040@hirez.programming.kicks-ass.net> References: <20201201205341.3871-1-john.ogness@linutronix.de> <20201201205341.3871-3-john.ogness@linutronix.de> <875z5eof8g.fsf@jogness.linutronix.de> <20201207093419.GH3040@hirez.programming.kicks-ass.net> <87mtyq9blw.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mtyq9blw.fsf@jogness.linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 07, 2020 at 11:09:39AM +0106, John Ogness wrote: > That will not work. We are talking about a situation where the writer is > preempted. So seq will never equal seq_copy in that situation. I expect > that the seqcount_latch is necessary. Interrupted rather, I would think, specifically NMIs? Then yes, latch should work. Gets you either the old or new, but never something in between.