Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp228447pxh; Wed, 10 Nov 2021 00:36:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJoqL8sFla3OC5MRSazhaXZi6+wfc9dCH4c8P0TcZCITHlRCyo4QsuXcgHIdgV15y+3Cvb X-Received: by 2002:a05:6602:2f01:: with SMTP id q1mr9336684iow.157.1636533396634; Wed, 10 Nov 2021 00:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636533396; cv=none; d=google.com; s=arc-20160816; b=p2gi8fVGlqEy0NAOjeoXD7y/6oJXafodsrSoyzH4xMI9D+9grBJN7UfXQ/97vd96R/ WfcTxSKKocZFF7JhmdRWDnM/BmNeiQGttnqKA9HwP/SE3HaEf3qmOhYYTk16V8bQxX3O xjjY1imcU7pYivI4EqWjEqF5paek/szYXTiykbUuVgKFdqL3evIAbbveEa94aH/syJtJ kSqIKA14wCKpgmqlv5pNT0MyTPETfGkJcz2egGuDKzk0yNs1aTny9l8JoucTNyqJunGA UJDZ21KRHrD0Kn1aoiiiOhquu5UxOMnNSn3ETcq7Rx9P1MW6XNAaXpXV9Rnk1EeTt1rx aqWw== 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=SPZmtZcn45Qf/3yC2FzsLNHIF0feCAyEo3hwMKuUAV8=; b=V+F1ZWwkkN+eaO58ulVKNzB+Q82CPPKbUOAukVBq6kgzlqYIpqL7eyK/YOhmJAyoyA 1MKTl8DRlP8SeKDm92t3/4z6ghuPMjzoWSEUbRHPTTcn/PaAYw/0O1fif1dU2tawwczk gqvgrQZpQ0fgAwlDkl7mSfLjJzP2sz+ERxschc5+rsRpMJS1ppVZ8P4SIBlSXCz0AQEZ 621DLqaBQjqfEdZvE9pZZHMPyBzqvr4ZWTaekwmSSX/v7mNP1yR8ST2Opy7jEkhiTvZE bvypb8T55DKefRmxuVFGl9W0GCSqxVkUmxs0TKbyIOXvQXedZit3MB36IiKAs7bRWkxn M4gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=ONWoLaWO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f13si47883349iow.59.2021.11.10.00.36.23; Wed, 10 Nov 2021 00:36:36 -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=@alien8.de header.s=dkim header.b=ONWoLaWO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbhKJIg7 (ORCPT + 99 others); Wed, 10 Nov 2021 03:36:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbhKJIg7 (ORCPT ); Wed, 10 Nov 2021 03:36:59 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 310EDC061764 for ; Wed, 10 Nov 2021 00:34:12 -0800 (PST) Received: from zn.tnic (p200300ec2f111e004e08fd5d8baa7a9c.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:1e00:4e08:fd5d:8baa:7a9c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id DEA101EC0567; Wed, 10 Nov 2021 09:34:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636533250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=SPZmtZcn45Qf/3yC2FzsLNHIF0feCAyEo3hwMKuUAV8=; b=ONWoLaWOjvvhzyhXot+EKqczHNF73MO9bnkB7fJ9q9RLfhBy4fQaWDFVNgYy/UMApazUmD XPl+A2ttQ54n41pG5oxwMRh4AsgCDxSE2XZ8sUPKZyiHhMKv2y4v7rf7SP3SDEfJScU1TK NJT2upULS0+QJT/ybkE9NOqWm+jR99w= Date: Wed, 10 Nov 2021 09:34:02 +0100 From: Borislav Petkov To: "tarumizu.kohei@fujitsu.com" Cc: "catalin.marinas@arm.com" , "will@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH v2 0/5] Add hardware prefetch driver for A64FX and Intel processors Message-ID: References: <20211104052122.553868-1-tarumizu.kohei@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 08, 2021 at 02:17:43AM +0000, tarumizu.kohei@fujitsu.com wrote: > The following performance improvements have been reported for some > Intel processors. > https://github.com/xmrig/xmrig/issues/1433#issuecomment-572126184 Yes, I know about that use case. > For these reasons, we would like to add this interface to the > upstream kernel. So put all those justifications at the beginning of your 0th message when you send a patchset so that it is clear to reviewers *why* you're doing this. The "why" is the most important - everything else comes after. > > I'm not sure about a wholly separate drivers/hwpf/ - it's not like there are > > gazillion different hw prefetch drivers. > > We created a new directory to lump multiple separate files into one > place. We don't think this is a good way. If there is any other > suitable way, we would like to change it. Well, how many prefetcher drivers will be there? On x86 there will be one per vendor, so 2-3 the most... Also, as dhansen points out, we have already /sys/devices/system/cpu/cpu*/cache so all those knobs belong there on x86. Also, I think that shoehorning all these different cache architectures and different prefetcher knobs which are available from each CPU, into a common sysfs hierarchy is going to cause a lot of ugly ifdeffery if not done right. Some caches will have control A while others won't - they will have control B so people will wonder why control A works on box B_a but not on box B_b... So we have to be very careful what we expose to userspace because it becomes an ABI which we have to support for an indefinite time. Also, if you're going to give the xmrig example, then we should involve the xmrig people and ask them whether the stuff you're exposing to userspace is good for their use case. And so on and so on... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette