Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2085403rwl; Thu, 6 Apr 2023 05:49:02 -0700 (PDT) X-Google-Smtp-Source: AKy350bpPoWYJKCIgqx6fedHj/ZvzMLh4NjNrc0mbOpCmsNmoZvzfOLONEpzTdj3KkfdYhF1ycse X-Received: by 2002:a05:6a20:6da2:b0:da:62c2:6402 with SMTP id gl34-20020a056a206da200b000da62c26402mr2594318pzb.30.1680785341807; Thu, 06 Apr 2023 05:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680785341; cv=none; d=google.com; s=arc-20160816; b=OlqmV753+L9j8er2SEGrfNxrb8T+WN3zIysu7hI7riDApr7YoAm+fE7EY2QhZ2aYbB bzud7+a06EdiOVwgYL636xh6OcDs0y8dkrOFXqaHqSOWdV9uWktxRNG2WyFTY6AcEzwF hGreR1QetUSp/DctuWieSKQiyNTxvGrSSuS52EL9YQxC1kua37dr7ABl01YIS2sqHdgT KlB+4Uuv6h4mhV2ZSoNqzG0WOfT/8tfReah5nWb+LnnCao69wK9BhVywwyB0s9mlCEql g1lGhLQ9HbmtWZldKJl02DW8Lo0ckRZLZQb/QNeFO4MuNM37igIFUBz7pxnh10vMxCtR fP9w== 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=6G0PeHjBucaMpcTqS+MbmLttXP4X+8vdHS54iSMHEkE=; b=J92Za41Ja90obsPGMQ2Jx3vNL3RdRsXNyyE197MES4sxAdyaXLmkWS7aHMrCvk4HfM 7nvo9yU9NpKae5/HrixemXGf8wfKl9vLguGRgqy+NOB4ddZCmOvZHiwz/KXuoLIT5YqZ n8Btj/c7jeYiQSPSY3qjl7IMo0P2cvGTCcl6qlByuC8yrdaDAz5w8gq9xpwZx2QhG/24 6/ObQ4HJcA6Oa92rKkAJPsaeOZQY20QGZNs+LYUGRpowLmt26g1UvkKuGtaX+LBETyvX Bjdf7t5g7qWwD2PBxG0Uw1iDXt/nbLprBMfhYmevSiggVQomt9cNWtwbsKWuusQLbj4q HAug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=pocCnMFj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c133-20020a624e8b000000b0062ae6345c75si1261513pfb.400.2023.04.06.05.48.50; Thu, 06 Apr 2023 05:49:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=pocCnMFj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236593AbjDFMis (ORCPT + 99 others); Thu, 6 Apr 2023 08:38:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjDFMir (ORCPT ); Thu, 6 Apr 2023 08:38:47 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 366CF76A9; Thu, 6 Apr 2023 05:38:46 -0700 (PDT) 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=6G0PeHjBucaMpcTqS+MbmLttXP4X+8vdHS54iSMHEkE=; b=pocCnMFjveWReclFnOvNIHXaFy 3GrG9RU1yLbNQTlpqnucYYV6Vo765+4G1vrs+PrS2z6+TblszZYRJ0sAu9sAolqPHY8Tp8KAhAx4r oiWVOzNoX/o/MUudT1aKAAs0W8mSmuV5tz0uUB76tbxk8uF8Dc6OZ728w1kpE3i8o+u/GJAXDJYtC oVXXOKLTsGSCzdjzmTQbivx8VQ2VymC+L+sxhHMvJd6L4TX5oxAtAITYIbtut0ZzqL2LVmIkmxa2U 3PUdMvlbPRNC9SfEdWT8zsC2K/IBJQQxdtLcWHsBft4T43Qj0OBiFHHMshHhOO5qBZIAb4+XkKIh5 Vf6HDY5A==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pkOsI-00HPw3-BW; Thu, 06 Apr 2023 12:37:58 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 11D04300194; Thu, 6 Apr 2023 14:37:55 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 903182CB641A9; Thu, 6 Apr 2023 14:37:55 +0200 (CEST) Date: Thu, 6 Apr 2023 14:37:55 +0200 From: Peter Zijlstra To: Jiri Slaby Cc: Paolo Bonzini , Lai Jiangshan , Dave Hansen , linux-kernel@vger.kernel.org, Lai Jiangshan , "H. Peter Anvin" , Andi Kleen , Andrew Cooper , Andy Lutomirski , Asit Mallick , Cfir Cohen , Dan Williams , David Kaplan , David Rientjes , Erdem Aktas , Jan Kiszka , Joerg Roedel , Juergen Gross , Kees Cook , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Linus Torvalds , Mike Stunes , Raj Ashok , Sean Christopherson , Thomas Gleixner , Tom Lendacky , Tony Luck , kvm@vger.kernel.org, linux-coco@lists.linux.dev, x86@kernel.org Subject: Re: [RFC PATCH 0/7] x86/entry: Atomic statck switching for IST Message-ID: <20230406123755.GC392176@hirez.programming.kicks-ass.net> References: <20230403140605.540512-1-jiangshanlai@gmail.com> <19035c40-e756-6efd-1c02-b09109fb44c1@intel.com> <3591487f-96ae-3ab7-6ce7-e524a070c9e7@redhat.com> <20230406101254.GI386572@hirez.programming.kicks-ass.net> <26be2c81-9431-6b43-e3e9-52d7d184750e@kernel.org> <20230406104750.GA392176@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 06, 2023 at 01:04:16PM +0200, Jiri Slaby wrote: > Definitely it _can_ defeat the purpose and be heavily formatted.But it > doesn't have to. It's like programming in perl. > > What I had in mind was e.g. "DOC: TTY Struct Flags": > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/tty.h#n261 * TTY_THROTTLED * Driver input is throttled. The ldisc should call * :c:member:`tty_driver.unthrottle()` in order to resume reception when * it is ready to process more data (at threshold min). That whole :c:member:'tty_driver.unthrottle()' is an abomination and has no place in a comment. > Resulting in: > https://www.kernel.org/doc/html/latest/driver-api/tty/tty_struct.html#tty-struct-flags > > Both the source and the result are quite readable, IMO. And the markup in > the source is not mandatory, it's only for emphasizing and hyperlinks. > > As I wrote, you can link the comment in the code. But definitely you don't > have to, if you don't want. I like the linking in Documentation as I can put > the pieces from various sources/headers together to one place and build a > bigger picture. > > > I really detest that whole RST thing, and my solution is to explicitly > > not write kerneldoc, that way the doc generation stuff doesn't complain > > and I don't get random drive by patches wrecking the perfectly readable > > comment. > > Sure. Rst _sources_ are not readable, IMO. Only generated man pages or html > are. But code comments are read in a text editor, not a browser. Hence all the markup is counter productive. Why would you go read something in a browser if you have the code right there in a text editor?