From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753788AbbIPOtS (ORCPT ); Wed, 16 Sep 2015 10:49:18 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:56015 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbbIPOtR convert rfc822-to-8bit (ORCPT ); Wed, 16 Sep 2015 10:49:17 -0400 Message-ID: <55F9816A.9080405@arm.com> Date: Wed, 16 Sep 2015 15:49:14 +0100 From: "Suzuki K. Poulose" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Yury Norov CC: Mark Rutland , Catalin Marinas , "ard.biesheuvel@linaro.org" , Will Deacon , "klimov.linux@gmail.com" , "ddaney.cavm@gmail.com" , "yury.norov@gmail.com" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [RFC PATCH] arm64: cpuinfo: reduce cache contention on update_{feature}_support References: <1441382651-12058-1-git-send-email-ynorov@caviumnetworks.com> <55E9C999.1090503@arm.com> <20150904195240.GA14679@yury-N73SV> In-Reply-To: <20150904195240.GA14679@yury-N73SV> X-OriginalArrivalTime: 16 Sep 2015 14:49:14.0482 (UTC) FILETIME=[DB0CDD20:01D0F08E] X-MC-Unique: jlGsbt9rRd-BefZT6GKIcQ-1 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/09/15 20:52, Yury Norov wrote: > On Fri, Sep 04, 2015 at 05:40:57PM +0100, Suzuki K. Poulose wrote: >> On 04/09/15 17:04, Yury Norov wrote: >>> This patch is on top of https://lkml.org/lkml/2015/9/2/413 >>> >>> In master, there's only a single function - >>> update_mixed_endian_el0_support >>> And similar function is on review mentioned above. >>> >>> The algorithm for them is like this: >>> - there's system-wide boolean marker for the feature that is >>> initially enabled; >>> - there's also updater for the feature that may disable it >>> system-widely if feature is not supported on current CPU. >>> - updater is called for each CPU on bootup. >>> >>> The problem is the way updater does its work. On each CPU, it >>> unconditionally updates system-wide marker. For multi-core >>> system it makes CPU issue invalidate message for a cache >>> line containing marker. This invalidate increases cache >>> contention for nothing, because there's a single marker reset >>> that is really needed, and the others are useless. >>> >>> If the number of system-wide markers of this sort will grow, >>> it may become a trouble on large-scale SOCs. The fix is trivial, >>> though: do system-wide marker update conditionally, and preserve >>> corresponding cache line in shared state for all update() calls, >>> except, probably, one. >> >> As I have mentioned already, this patch (and the per feature functions) >> won't be needed once we merge my series (which is waiting for the merge >> window to see the public lights) >> > > OK. Than waiting for your patchset. http://lists.infradead.org/pipermail/linux-arm-kernel/2015-September/370386.html Cheers Suzuki