From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68440C433EF for ; Wed, 10 Nov 2021 08:34:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45E30611C0 for ; Wed, 10 Nov 2021 08:34:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbhKJIhA (ORCPT ); Wed, 10 Nov 2021 03:37:00 -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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A250C433F5 for ; Wed, 10 Nov 2021 08:35:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D8D5C61076 for ; Wed, 10 Nov 2021 08:35:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D8D5C61076 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hyZKoHJwrzLl/QaturYABWN5cg7bX3ydPYaz+X1f1ro=; b=PCGUoZpjTRs7na ImRfgUDJlnhc5yRouEu8EBWSlmi/cXacsiVbWaGYj679fMIme3gvp0vCWG37/Bs2TEny8TDYX1Wqk bDXg3NpjL4idN/Y9WPkuyI6YMxrIr7RVHdavaN6Afk0VOba+SwZiKn1ScdplC2DZLrMMEuwWan4nE BQo8qXJSbt5M0+6phEZ2JjZ7w+Ta/iJvVCkqBqMfbnQwMZps8ENch/PYN0R2zPzqSIddw32jiI/o4 5ktNKgs/aoXnfKyEL/Op0xtvYU/JwJNiQmZHHnS06vaWVoGznFWZHi5VIqxgQICnOI/Ms6FZxrzwb mVbFziGY2V5WeGbMx7pQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkj3j-004orq-OV; Wed, 10 Nov 2021 08:34:20 +0000 Received: from mail.skyhub.de ([2a01:4f8:190:11c2::b:1457]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkj3f-004op1-Lz for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 08:34:17 +0000 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_003415_932193_5A749F08 X-CRM114-Status: GOOD ( 23.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel