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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7261AC433EF for ; Tue, 28 Jun 2022 16:41:09 +0000 (UTC) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KX55bqyK5rluvNHfmTgGs5yjz7SYEUNLnKrP0MglP6s=; b=ihVlwgutz8CZ+X yjYK52tH4RRdXYQRtc3386EZoBVfXNU5RUbuIRNrOZQAQlHXveazkYcuceDICvwRaLnmmNv+7eObr y2qsdFJrhxeIWVj1xOmccxDU29zfpR5dGmu6sr/2v3In+UJSt+e3+/cPSB2sfnc4P/U8mWBFmvp8m /bVqRTfzbJJouX0AR7snhSh8lfi5M2O7vDRv1ou6ijndyPOFbZVMetkiCEeNGxWlr+voDEgsahJ/n gXzRHFkjIYGAYZJ20y/VCxO+93o6/N6z+nciAg8V2XC52qjunKKvKFg9qQ6gctJJYmmmcgYhLLiJB 42EjFoMp+XEgahAuh7ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6EFs-007Ewq-Ki; Tue, 28 Jun 2022 16:40:00 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6EFp-007Ew4-93 for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2022 16:39:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656434397; x=1687970397; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=jnXDJ3dIjSp6xHcVtKny8xhd8b/hK+Z5R6b5A+1lEbk=; b=JgjrTF7//chpNim7YOKzeizBxRJ1SY88C2X/IBErUpniouvKG5YYKyoa GHXFFY0kAxqDRq0NVNUEJSogkHb2cOo8ti/ZjBVC0DC2RkRnspv3tfXSd v8UKmIi2umQ41s5t3nL08YR5js6eKg0BWO7/+ysloij+LEldtUs96v1+x WWlwtXuPl3tB5lrfEF9t63bn5nJGc8aLSxeuGLcP2sNlibkzS73jiz2oS NMEa1DmbagRMkoIr2IWuWrbpEVV8Yp5j/v9NLboxgJYemXQBQV4+9ph4b cFKfh5VJfWzdx8Qa97bXtYUmRNDfzyaRRrfRGITcT4CNt244gUhFzNHkz w==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="280551373" X-IronPort-AV: E=Sophos;i="5.92,229,1650956400"; d="scan'208";a="280551373" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 09:39:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,229,1650956400"; d="scan'208";a="658198138" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga004.fm.intel.com with ESMTP; 28 Jun 2022 09:39:32 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 28 Jun 2022 09:39:31 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 28 Jun 2022 09:39:31 -0700 Received: from fmsmsx610.amr.corp.intel.com ([10.18.126.90]) by fmsmsx610.amr.corp.intel.com ([10.18.126.90]) with mapi id 15.01.2308.027; Tue, 28 Jun 2022 09:39:31 -0700 From: "Luck, Tony" To: "tarumizu.kohei@fujitsu.com" , 'Linus Walleij' Subject: RE: [PATCH v5 0/6] Add hardware prefetch control driver for A64FX and x86 Thread-Topic: [PATCH v5 0/6] Add hardware prefetch control driver for A64FX and x86 Thread-Index: AQHYemdOe4e+BwzSVEeUnZkOYa/FOK1JFpkAgAY1RYCAAArrgIAEgNwAgA+7kYCAAdqygP//t3Xw Date: Tue, 28 Jun 2022 16:39:31 +0000 Message-ID: References: <20220607120530.2447112-1-tarumizu.kohei@fujitsu.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 msip_labels: =?utf-8?B?TVNJUF9MYWJlbF9hNzI5NWNjMS1kMjc5LTQyYWMtYWI0ZC0zYjBmNGZlY2Uw?= =?utf-8?B?NTBfQWN0aW9uSWQ9NzBjY2M1ODgtNDljNi00ZGUxLWJhMmQtMDIyYzBmYmZl?= =?utf-8?B?OWYzO01TSVBfTGFiZWxfYTcyOTVjYzEtZDI3OS00MmFjLWFiNGQtM2IwZjRm?= =?utf-8?B?ZWNlMDUwX0NvbnRlbnRCaXRzPTA7TVNJUF9MYWJlbF9hNzI5NWNjMS1kMjc5?= =?utf-8?B?LTQyYWMtYWI0ZC0zYjBmNGZlY2UwNTBfRW5hYmxlZD10cnVlO01TSVBfTGFi?= =?utf-8?B?ZWxfYTcyOTVjYzEtZDI3OS00MmFjLWFiNGQtM2IwZjRmZWNlMDUwX01ldGhv?= =?utf-8?B?ZD1TdGFuZGFyZDtNU0lQX0xhYmVsX2E3Mjk1Y2MxLWQyNzktNDJhYy1hYjRk?= =?utf-8?B?LTNiMGY0ZmVjZTA1MF9OYW1lPUZVSklUU1UtUkVTVFJJQ1RFRO+/ou++gA==?= =?utf-8?B?776LO01TSVBfTGFiZWxfYTcyOTVjYzEtZDI3OS00MmFjLWFiNGQtM2IwZjRm?= =?utf-8?B?ZWNlMDUwX1NldERhdGU9MjAyMi0wNi0yOFQxMzo0MDo0NFo7TVNJUF9MYWJl?= =?utf-8?B?bF9hNzI5NWNjMS1kMjc5LTQyYWMtYWI0ZC0zYjBmNGZlY2UwNTBfU2l0ZUlk?= =?utf-8?Q?=3Da19f121d-81e1-4858-a9d8-736e267fd4c7;?= x-originating-ip: [10.1.200.100] MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220628_093957_365139_B37C4CA8 X-CRM114-Status: GOOD ( 17.25 ) 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: , Cc: "rafael@kernel.org" , "peterz@infradead.org" , "catalin.marinas@arm.com" , "dave.hansen@linux.intel.com" , "ast@kernel.org" , "linux-kernel@vger.kernel.org" , "conor.dooley@microchip.com" , "hpa@zytor.com" , "will@kernel.org" , "mchehab+huawei@kernel.org" , "x86@kernel.org" , "linux-acpi@vger.kernel.org" , "mingo@redhat.com" , "kuba@kernel.org" , "eugenis@google.com" , "lenb@kernel.org" , "arnd@arndb.de" , "bp@alien8.de" , "tglx@linutronix.de" , "pcc@google.com" , "linux-arm-kernel@lists.infradead.org" , "marcos@orca.pet" , Greg KH , "peter.chen@kernel.org" , "marcan@marcan.st" 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 >> The right way to solve this is to make the Linux kernel contain the necessary >> heuristics to identify which tasks and thus cores need this to improve efficiency >> and then apply it automatically. >> >> Putting it in userspace is making a human do a machines job which isn't >> sustainable. >> >> By putting the heuristics in kernelspace Linux will improve performance also on >> workloads the human operator didn't think of as the machine will detect them from >> statictical or other behaviour patterns. > >In order to put the heuristics into kernelspace Linux, I think it >necessary to consider the following two points. > >1) Which cores are tied with the process? >This is different from the core on which the process can run. It >probably need to combine some CPU resource limit to avoid affecting >non-target processes. > >2) How to derive the value to set in the register? >It is necessary to verify whether an appropriate set value can be >derived using statistical information, etc. In addition, to prevent >the cost of automatic derivation from exceeding the value that would >be improved by it. > >I don't have a prospect for resolving these issues yet. I will >continue these considerations. Another approach would be to make the set of prefetch settings a task attribute. Then set them in the context switch code when the process is about to run on a CPU. But that assumes you can cheaply change the attributes. If doing so requires multiple MSR writes (on x86) it might be a non-starter. -Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel