Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6294200rwl; Mon, 9 Jan 2023 06:41:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXt2jt8CrJEFwTMeFgxKqj8VzBn6LwX9Sps5MyJBO8IRGxnOl2n+t5IBwiEvJTFwlgGSxLoc X-Received: by 2002:a17:907:d38c:b0:7c0:b0f9:e360 with SMTP id vh12-20020a170907d38c00b007c0b0f9e360mr56337336ejc.16.1673275302782; Mon, 09 Jan 2023 06:41:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673275302; cv=none; d=google.com; s=arc-20160816; b=0D0fUsLqFReVZXzZ8DShNZleXieeggOv3EOiFxWjLBiM0jw25wNW9H8MwmPZflTe7w j+NVTQNQ0+75TZPfamTYvRj14x1K/VlHOU6ixQwngh/sC3bWv8rnJTgg/5xtiEwb9KLb BgDG2S+5PZB4jtY1erS60jo7vncLhNONuhj89WwDTd7biC+a+TyD3309ia81lbf2vX7w E5V6EwPuuqzyjJzZxeNYVDj7g4gQpHK7JVH7ieaDMwUFlKMxLn2zRENVCH9QcoG713z+ gCnOS0Kxr7q/b7/1JwnmDfI68CxFgw9tP7FZn0sE+QJtXlg+MRAR5N5922cGx6x6g1sM uAlw== 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=skQuqxcc4cMluAbQQawa8WrbYBm9bOi8GVo5XKsdGaY=; b=e6/+uR53Y4eW25OOJzJxbmVUv/m+KNHB52urwSxp3zs985p21UQ+WCqZ46YnB0C4jg /x7QRokwn0YlQWJPrp2yifwMkUU+Vf47IZcrz14KkSXXxltVS6zUbcNmnvl0mGvEE3o6 0yuJRAnRRl6oSDn7y4/trIMQC9lso+RYg87zv78xgR/32+ROiHwxnaderX1UvLDtened pu9/ehXH92c8JdNJ2nTMimMCZq0V6gvlqMmp4qhktKtjMQJfG36Y6fsFeLYyjOoda5fp uEs6M0Egt76omcfof8lxZcHZ/G02C4lKF4jF2Oaps+iHsEpwJ7zAC7b1/jgvRbzP1B86 ewVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=SpzNdoBa; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga10-20020a1709070c0a00b0084d7c9a5e5esi1191035ejc.101.2023.01.09.06.41.29; Mon, 09 Jan 2023 06:41:42 -0800 (PST) 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=@suse.com header.s=susede1 header.b=SpzNdoBa; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231830AbjAIOXo (ORCPT + 53 others); Mon, 9 Jan 2023 09:23:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233297AbjAIOXm (ORCPT ); Mon, 9 Jan 2023 09:23:42 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3804713F2B for ; Mon, 9 Jan 2023 06:23:41 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id CA40B383A9; Mon, 9 Jan 2023 14:23:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1673274219; h=from:from:reply-to: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=skQuqxcc4cMluAbQQawa8WrbYBm9bOi8GVo5XKsdGaY=; b=SpzNdoBa52nxI9nvql0+B3NwUwW1RCKTWGXi1IHmvtdolKWtF+GajJi3MC59tpIwSZc+UW gvuffz/nfC2gMYyHkFGDwtIEdt6awvliexeaSSb937JDJN2y3YIOWTH9uUFCq4rhz2kil6 u7okS3odp2YoG4iaPrnpkXjtH0X65/M= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id AA0C92C141; Mon, 9 Jan 2023 14:23:39 +0000 (UTC) Date: Mon, 9 Jan 2023 15:23:39 +0100 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH printk v5 7/8] printk: use printk_buffers for devkmsg Message-ID: References: <20230109100800.1085541-1-john.ogness@linutronix.de> <20230109100800.1085541-8-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230109100800.1085541-8-john.ogness@linutronix.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 Mon 2023-01-09 11:13:59, John Ogness wrote: > Replace the buffers in struct devkmsg_user with a struct > printk_buffers. This reduces the number of buffers to keep track of. > > As a side-effect, @text_buf was 8kB large, even though it only > needed to be the max size of a ringbuffer record. By switching to > struct printk_buffers, ~7kB less memory is allocated when opening > /dev/kmsg. > > And since struct printk_buffers will be used now, reduce duplicate > code by calling printk_get_next_message() to handle the record > reading and formatting. > > Note that since /dev/kmsg never suppresses records based on > loglevel, printk_get_next_message() is extended with an extra > bool argument to specify if suppression is allowed. > > Signed-off-by: John Ogness Reviewed-by: Petr Mladek Best Regards, Petr