Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp554750ybi; Wed, 19 Jun 2019 04:08:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZW7zlgOruhwScUUl924sh7SyaCf4Q2fbMh379VS9kTybW1FfeMicNmaifYaj8uFSqJ3T/ X-Received: by 2002:aa7:8201:: with SMTP id k1mr946768pfi.97.1560942539187; Wed, 19 Jun 2019 04:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560942539; cv=none; d=google.com; s=arc-20160816; b=Ia5mIoJPCCzMS7+Ijp6lriY11TCjh9/XzYa1SBj/+Qa/He1VE2vgljAdZzzQv8bj04 nLwEeNvDPmGHkmPGMkU/BN/IzvmITByLMJvoTUjpsjhC1/AQvPTCCfMRmdL4DV3XZQfF bbdWxhe/aZsmBiV+/tqydtd3FjVoLIgkGR7mmbFt5D63XY0eY1fmw1PYdrA/1Zq3iWjW BWYyRqNKYpoxDo5wGiZHs+Ya8TUubjGdsxIe23YNlG6wYeWIKxTthgvBF05H7+LXvpjf QfRVtyE0T00pEXJ9S4p7o4HNFu9T9xQ9QilMX55nRtkkURDMImCXTTp2wlm1TWTHTnc9 gDBQ== 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=6Ec+cpW1DHs3m2oEbfIqgjbz3u/gomBHl30sxKp5V8I=; b=nLiXqeknCRy1CRrlxLqXB8UmHnG5nKMkEl56IGj7mpTTZkqzYNdJulAc+AbYGVFA7p j5OeYJW8jaaPB3qjs+9gNIM3i6c55Y4JfjNDzgtu5ZOl0NFo+8J9QKA93ft0SkN1JrSk E5WXsq3GV0W12W9KVpgZ0xsCQso0PBVNBoq24GMD5n4vLEMquAW4PaILcTq+pSGFkWdb E7+V3RWp2LikFQ2OTKH25beUHq5+mOg/ZdEZV0Ns1Q4bx6VZCPqKJGnEZy/CEFr0rIwH 2V2vZqdSEPjGN+3+MssJv/2W+WcILxgt0owKbWwe+Fg3aqS7//B/l419a0sQDdk5wtR2 CPQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=MU5uoHUW; 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 p12si15331106plq.331.2019.06.19.04.08.43; Wed, 19 Jun 2019 04:08:59 -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=MU5uoHUW; 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 S1731595AbfFSLIO (ORCPT + 99 others); Wed, 19 Jun 2019 07:08:14 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:36218 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbfFSLIO (ORCPT ); Wed, 19 Jun 2019 07:08:14 -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=6Ec+cpW1DHs3m2oEbfIqgjbz3u/gomBHl30sxKp5V8I=; b=MU5uoHUWJOA6NEPJEbF9iJzeu fmEFrooPpTzM76Ab7xhrDriXftUivgtVRJCGSXD6yp13o8xxb2y9FsAE7EFsQ6vrKmpngg9NN8721 gUeB2synIzlMlAVSC6EWDlY3uSptIF0NxgU3TVNMitLreK2fC4OC+lrx2+LYIhv+A0RPH2z7Wig9n JCftDtBOEZapEtK78t1WxfeHDRElW+Ps4EjduW1nicDlLQzZ8cnwToE73WShGkUuyrWPJDyyZaBQL d4OFT5VOsCrsGzTUYLfH5ul39aaiC49pmxMNnVUK7VbOHak0L90TEY8QKjFrQ2xT/Aib9Ru37izm5 t+YETuhew==; 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.92 #3 (Red Hat Linux)) id 1hdYRf-0007CN-Jz; Wed, 19 Jun 2019 11:08:03 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 81A4520245BD9; Wed, 19 Jun 2019 13:08:01 +0200 (CEST) Date: Wed, 19 Jun 2019 13:08:01 +0200 From: Peter Zijlstra To: John Ogness Cc: linux-kernel@vger.kernel.org, Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Andrea Parri , Thomas Gleixner , Sergey Senozhatsky Subject: Re: [RFC PATCH v2 1/2] printk-rb: add a new printk ringbuffer implementation Message-ID: <20190619110801.GS3436@hirez.programming.kicks-ass.net> References: <20190607162349.18199-1-john.ogness@linutronix.de> <20190607162349.18199-2-john.ogness@linutronix.de> <20190618112237.GP3436@hirez.programming.kicks-ass.net> <87a7eebk71.fsf@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a7eebk71.fsf@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 Wed, Jun 19, 2019 at 12:30:26AM +0200, John Ogness wrote: > On 2019-06-18, Peter Zijlstra wrote: > >> +/** > >> + * DOC: memory barriers > > > > What's up with that 'DOC' crap? > > The separate documentation in > Documentation/core-api/printk-ringbuffer.rst references this so it > automatically shows up in the kernel docs. An external reference > requires the DOC keyword. > > Maybe the memory barrier descriptions do not belong in the kernel docs? So i'm biased; I don't much care for Documentation/ -- code should be readable and have sufficient comments; I hate rst and I think that anything that detracts from reading code comments in an editor is pure evil. Personally, I've stopped using /** comments, live is better now. YMMV > Sorry. I really have no feel about what (or how) exactly I should > document the memory barriers. I think the above comments make sense when > someone understands the details of the implementation. But perhaps it > should describe things such that someone without knowledge of the > implementation would understand what the memory barriers are for? That > would significantly increase the amount of text as I would have to > basically explain the implementation. > > I would appreciate it if you could point out a source file that > documents its memory barriers the way you would like to see these memory > barriers documented. Yeah, I was going to read the implementation and make suggestions; just haven't gotten there yet.