Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4819409rwb; Sun, 13 Nov 2022 14:43:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf7znQhOMKg4eYRzB7IpsIi7ZAfTOe00o7Bvn9T1h75TZd9aHUuyEi3x2MYghOB6A7aVOetj X-Received: by 2002:aa7:8d12:0:b0:56d:384:e13a with SMTP id j18-20020aa78d12000000b0056d0384e13amr11412032pfe.75.1668379423416; Sun, 13 Nov 2022 14:43:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668379423; cv=none; d=google.com; s=arc-20160816; b=yiKW8CVGFJPgaDXAv0KRJ18TyWCCUdqpuN7CGr7nLORcvfzcJb0VkOH8MAGqzDBceD u44rKymKD8ANIWjrrrotGzK12fzQEimyM75PQfO0mzAquirYpSsXBUBSwVkbHg+CzQso tLfKWszbWGv3bOr7qrVpPZdjinsT7LWcTrMI5pSn833Vf3Kyas4edpHlcZDfLe1ex3Iv C9UKptX3qRGMcH9Te/qfP9MgllptnGvDrnFuOO2Yvqs6MzUVHoLY3WLR95/eoM/1cLU5 jRhCAZ7Yf7381PGCU84l8T2GaceodMcS54kXLuxjfyyOIKc6vf0tK7RX31o2tI4CeDKx NvpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=lxypfjZjKN3sqyT/gDAq0Ikhzsg/bzQCjAzzAF2LAFM=; b=zzmCB5ZsZn+sJiVeFDW//omSMxGpmoz2VB35/duYVLjuAlVuVRhY+jhNK72DCjIAnt bc3KwM3BWZru+8a3Qgp7GCCdYXr0tS/WhUqwJ1JmA8Ew9ZmZTPiyzXgf/lXldx2aj/EW maNYNVaUVjtihvhFP6rbnV1HDiUtkdsci0Nya22DqmN1/hxgAdjNzwSKRBEqhDvKG+h0 0+zvIXdu2DBdgfD5VBcQTxdlcZH8eEyX7xucbzWXubG7H/A/YVE1B9D0l1uaAe0XTFM+ VP9hbJyhKAjY/ezTowIq/QS6/VvTTNG8MHdYxvVuVKkwMoEQOcTZMS1Phndx6UaUcEP2 BTDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C5JNhKyy; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k14-20020a170902760e00b0017f8d9b7e5fsi7851898pll.133.2022.11.13.14.43.30; Sun, 13 Nov 2022 14:43:43 -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=@intel.com header.s=Intel header.b=C5JNhKyy; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235014AbiKMVwA (ORCPT + 89 others); Sun, 13 Nov 2022 16:52:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233930AbiKMVv6 (ORCPT ); Sun, 13 Nov 2022 16:51:58 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF7BDF81; Sun, 13 Nov 2022 13:51:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668376318; x=1699912318; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vwi5xI+ZgoQ66Zhsx8mRj2liZIMevDJUF4Ly/3/uLCg=; b=C5JNhKyyIGIdqAA/Iqe+ewtaZccMU66DtlIkfqSkcpi0VZP99dxg5TNg pRg0le28hf0hpGvJEBE21ntI3rCDCePNMBuurEpJDtECp2D6CO52uYZFp WhgyNtR45vLizYUGC6wpNLTtG0y/DO4MxdOWMbVPB/ShAmJsILdFXpS5s 8HRJRMbRld85TyRQ8Eq3p5+6xDtlemAR33FnY1ZqpEZON/fk8xWR3gWeM syXUyUKpIiusi1UOz8aYW4s7BCfpLi6oSDm8rw/7PiDLCnkWSuLfI8bib fwdpE6AVf56sMur2n6aUPRpzMgq5jMa1G9RyYoJjPTe9Z5DsvZDOQI6MC Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="299359698" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="299359698" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 13:51:57 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="780702723" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="780702723" Received: from perwin-mobl.amr.corp.intel.com (HELO tjmaciei-mobl5.localnet) ([10.212.163.208]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 13:51:56 -0800 From: Thiago Macieira To: "gregkh@linuxfoundation.org" , Borislav Petkov Cc: "Luck, Tony" , "Joseph, Jithu" , "hdegoede@redhat.com" , "markgross@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "Raj, Ashok" , "linux-kernel@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "patches@lists.linux.dev" , "Shankar, Ravi V" , "Jimenez Gonzalez, Athenas" , "Mehta, Sohil" Subject: Re: [PATCH v2 12/14] platform/x86/intel/ifs: Add current_batch sysfs entry Date: Sun, 13 Nov 2022 13:51:56 -0800 Message-ID: <2537334.Lt9SDvczpP@tjmaciei-mobl5> Organization: Intel Corporation In-Reply-To: References: <20221021203413.1220137-1-jithu.joseph@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 Sunday, 13 November 2022 03:48:40 PST Borislav Petkov wrote: > > You can't do it with a three-line shell script, but we're not > > expecting that shell scripts are the means to use this feature in the > > first place. > > I consider it a serious design mistake of having to have a *special* > tool. A special tool is *always* a burden. You need to build it, supply > it, make sure it is installable on the target system and so on. > > And I'm telling you this with my Linux distributor hat on. It is always > a pain - trust me. > [cut] > IOW, I really think that designing our interfaces with user friendliness > in mind should be of much more higher importance. And requiring the user > to remember or figure out anything she doesn't really need to, in order > to run the test is a burden. We agree that it should be operable without a tool. If nothing else, we will run into situations where we need to debug what's happening and the tool is not going to work for those conditions. Having a direct access to the API right there in /sys is great and is one of the things that Linux excels at and differentiates itself from the competition with. However, I am saying that we shouldn't have to go out of our way to make the extreme corner case easy if it comes to the detriment of the 99% case. Anyway, we can update the tool to print "%02x-%02x-%02x-%02x.%s" instead of "%d". That's trivial to us. I just don't think it's a worthwhile change, because four of the five placeholders there are enforced by the kernel and therefore the kernel must check them again (maybe it does so anyway when it opens and validates the file). What REALLY matters to me is that the current_batch file be readable and I can get the last batch that was loaded, in a well-known format. Without this, we go from "inconvenience" to "major design change, must talk to customers and customers must adapt their workloads". Please help me out here. -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software Architect - Intel DCAI Cloud Engineering