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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1D27C07E96 for ; Tue, 6 Jul 2021 20:34:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D248161C92 for ; Tue, 6 Jul 2021 20:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbhGFUgy (ORCPT ); Tue, 6 Jul 2021 16:36:54 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:48975 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229781AbhGFUgw (ORCPT ); Tue, 6 Jul 2021 16:36:52 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MkYsS-1lKKh02Qko-00m6u0 for ; Tue, 06 Jul 2021 22:34:12 +0200 Received: by mail-wr1-f52.google.com with SMTP id i8so413426wrp.12 for ; Tue, 06 Jul 2021 13:34:12 -0700 (PDT) X-Gm-Message-State: AOAM5330XiKzO8LyuiwkZ2kWIL+0h92Gl795EpN45//d5TFXLWTVAcGj 7MEMorJoi+froCZNuDJeKAElVTkHsbUMZQxZOvE= X-Google-Smtp-Source: ABdhPJxr8Z9KUUIthRbx8NWpyZJ4RwE3JYLin40N5YqfPo6mCGWEH4smcwk5s62sDCLsLS/J9Ru0N0IBCTiscuPA7Sg= X-Received: by 2002:adf:e107:: with SMTP id t7mr23967237wrz.165.1625603652293; Tue, 06 Jul 2021 13:34:12 -0700 (PDT) MIME-Version: 1.0 References: <20210527124356.22367-1-will@kernel.org> <20210706102634.GB24903@arm.com> <59800d6c-364a-f4be-e341-c5b531657ba3@arm.com> <20210706133314.GB20327@willie-the-truck> <87zguz7b6b.wl-maz@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Tue, 6 Jul 2021 22:33:56 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) To: Yassine Oudjana Cc: Marc Zyngier , Will Deacon , Robin Murphy , Catalin Marinas , Ard Biesheuvel , Android Kernel Team , Linux ARM , Mark Rutland , Vincent Whitchurch , linux-arm-msm Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:ZqDrh4W/x+ErXRApfdKflKkI0AyRw4gQ/i55sDZ1tPYRuwIt0YD O+Dhp0WQXs0j/HjN0V3xuxfm1/uwYB/o4X56HGN4udR7t3EqTlZZCbx2bQ1EBqfn2A5k35j PD0XheaTtO6/nkdtSDzP29cckFb7C9UYt2xNG/aK+QVshaMgm9aKIKTZ2RkqUJlfFYmQhxX 2uEn9LqvOdeoDs+QenAug== X-UI-Out-Filterresults: notjunk:1;V03:K0:6+xdlNhDPo0=:AOZfeQzRGMDhxgHmcWqrm6 ZLdoEtS9q3YGwFVt10T18QMsVfZYpIU50rHzd2MBTxuZAIHWUfxpU3lxaYPglVkJauJvEZiLh Fk70xOvlN25gHGqFdFv2Vmt5hta0OtdaTTMAhz8LToPl9sjYp9W6NDPHiQyFt7bAEtKBQlcHE VRRAVqxSbhLqY/UFHX0C7ZaMDDagya+2ul5y+YGkM/pquRlqENGBJah3CwsXPicMxsA/tZQRi WHxgo2/FfEwP4gm26k+L3IITnUP+p6Qbxt1WtNM1sXr5ncU7FLONmjcuqr3dvbe93y6DkL2Yi FHvNv0z1oE8WxQBIyteGJe6RFkYV+pdmkl4QATsIx4Yxej6rYxneuKIu/BiGaNT7R2MHnaWWz ILyMU1fTZEuh1uBcSyJuQnSFgx2Ch5oZJcBfpWcngORZci/GAs5u0lCfxAIeUfXDxdn9yBxSy VNNHpSrM5VF+Bp79ZDRO+JjMf4rNGe8AbMsqVqB/PTUCzd19FAoEo4CpPT/VBaM9jfOUQ5Grc WjHsPP3AZi3BwgwHzg673X77x+L/b2cYmssH9eLbypmkGqplCZsG4agJX/KuH6qgM7Tr6J7dI zdoWIcrKOYuqdhg0VjAdzxpfixJsRsfMffTQ9GklCXNcjp9Ooier5LMKbbNYBFeFz8nyg18hx wdFasEHjZx6w+P2fMn2Y3jI29UNkmuHMGA0H5WcQ1/IEK+y6l2yUZXCCikjtfAx0xiDU8e1ZG lLPx0eBbaYj4rhC47rnFY2w3TnkESj+tzNXpYlJSghTjiF80Ku4GgGbvlXibqtL7sHbcbfGII O6mdvAInPkajkCDpNQNb/c3Fhh5WIqhGSn7IOvozX/hohhGd7ayl+4+YNDruEC+8a9NTIxc Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, Jul 6, 2021 at 7:15 PM Yassine Oudjana wrote: > > (the numactl command helps run this both on the 'big' and 'little' > > cores without running into migration) > > > > Arnd > > Here are the results: Thanks, that was quick > $ numactl -C 0 line -M 1M > 128 > $ numactl -C 3 line -M 1M > 128 > $ numactl -C 0 cache > L1 cache: 512 bytes 1.37 nanoseconds 64 linesize -1.00 parallelism > L2 cache: 24576 bytes 2.75 nanoseconds 64 linesize 5.06 parallelism > L3 cache: 131072 bytes 7.89 nanoseconds 64 linesize 3.85 parallelism > L4 cache: 524288 bytes 15.86 nanoseconds 128 linesize 3.48 parallelism > Memory latency: 145.93 nanoseconds 4.88 parallelism > $ numactl -C 3 cache > L1 cache: 24576 bytes 1.29 nanoseconds 64 linesize 5.00 parallelism > L2 cache: 1048576 bytes 8.60 nanoseconds 128 linesize 3.07 parallelism > Memory latency: 143.29 nanoseconds 5.37 parallelism This is still somewhat inconclusive, but it does give some hope. The data that I found on random web sites was - 32KB L1, 2MB/1MB L2 [1][2] - 16KB L1, 1.5MB L2 [3] - 32KB L1, 1MB/512KB L2 [4] so none of the sizes really line up. My best guess is that the actual hierarchy 1MB per-core L2 cache on the two big CPU, 512KB per-core L2 cache on the two little ones, but no shared L2 or L3. The older Krait had a 4KB L0 cache, which could explain the 512-byte L1 output. Can you rerun the the 'line' test with '-M 128K' to see if that confirms the 64 byte L1 line size that the 'cache' test reported? Arnd [1] https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_processors#Snapdragon_820_and_821_(2016) [2] https://en.wikipedia.org/wiki/Kryo [3] https://www.geektopia.es/es/product/qualcomm/snapdragon-820/ [4] https://www.anandtech.com/show/9837/snapdragon-820-preview/2 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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C83DC07E96 for ; Tue, 6 Jul 2021 20:36:13 +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 E53C361076 for ; Tue, 6 Jul 2021 20:36:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E53C361076 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HTM/PaPwgVGb8y4LY1F7U+Mj8Rm2w9eM5wh3iCHJNF0=; b=pQIfnYghEsYvpF JcN1IKmxfn2pHR0XHt/Asbt2Gb3UOCdOCfOSQsMQUtZi1fLHkDhOY20ud8umjwt5fM5H33TPnkT8n OmBSPIscFkKUJD2gnEbf4dP2yGdKkwDmAoZ9QBZqA9hoPrGDbQ1OUT6nnZfEM5Eu2SpWLnNtVVPL6 4+V2khxq9cMA0wZIF06ceivXbY9sBU6QLwGuxyYcXqzgu5m/Qr/XbC/RtXwsCMX2mi+3gzditucuB AcGGrOgsVY85loiAyQujDlIOjVRNmVsbiFOKxxKnviIr/ZjnpqhF7R1llTDQ6tCqfbf3b9zMO5pJs UGagAP3ojmO0nd/gVd9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0rlq-00CmI9-Ea; Tue, 06 Jul 2021 20:34:18 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0rlm-00CmHp-KB for linux-arm-kernel@lists.infradead.org; Tue, 06 Jul 2021 20:34:16 +0000 Received: from mail-wr1-f42.google.com ([209.85.221.42]) by mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MD9jV-1lsJCH2dVJ-009Biw for ; Tue, 06 Jul 2021 22:34:12 +0200 Received: by mail-wr1-f42.google.com with SMTP id l5so443757wrv.7 for ; Tue, 06 Jul 2021 13:34:12 -0700 (PDT) X-Gm-Message-State: AOAM532geMvH+QVswvUlLl7UjlLeXYRvfJoXyKUBontPxgVK/XrSQekR xoxgTEoiKldP5zBwPZkZLDfQRUZcLRsul4RB8mM= X-Google-Smtp-Source: ABdhPJxr8Z9KUUIthRbx8NWpyZJ4RwE3JYLin40N5YqfPo6mCGWEH4smcwk5s62sDCLsLS/J9Ru0N0IBCTiscuPA7Sg= X-Received: by 2002:adf:e107:: with SMTP id t7mr23967237wrz.165.1625603652293; Tue, 06 Jul 2021 13:34:12 -0700 (PDT) MIME-Version: 1.0 References: <20210527124356.22367-1-will@kernel.org> <20210706102634.GB24903@arm.com> <59800d6c-364a-f4be-e341-c5b531657ba3@arm.com> <20210706133314.GB20327@willie-the-truck> <87zguz7b6b.wl-maz@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Tue, 6 Jul 2021 22:33:56 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) To: Yassine Oudjana Cc: Marc Zyngier , Will Deacon , Robin Murphy , Catalin Marinas , Ard Biesheuvel , Android Kernel Team , Linux ARM , Mark Rutland , Vincent Whitchurch , linux-arm-msm X-Provags-ID: V03:K1:PXVGlUfCU3oT8tyqwhG7kd0anuRLFaBKuyurpFOsQsT8rJ+hUX3 uMwJcWjSW4W2KHZpjp0nui+5whuBN/PnRqhdXCeTUet2CP7mDgVHzjIUgJ8Zuzrfe1x0jxs wzO2QJMhpcQBJJAtDX/MAMXrlpSyNvnk2Nes4DXTxutYOcUrYfNBLXyIzI1r0UpVwjGZAPB +r9i3E+cWm1hEYH/B5wNA== X-UI-Out-Filterresults: notjunk:1;V03:K0:d+w6JJS/lZU=:iqVX4NifPa2zijEn4B1tb3 xFIoOvbMVjlfMgYa7gXSGdXHKcIdTZvKYkKNz4A59Z7pN9YxoP3kWe2Pr8nZ3JgQHizntUL5m kCM3iJpR2jGZQFrzrPkYrdiWrLJPjONcjCeVcNt8mluP8c1+cKFStyx3iDBAKv9jIir0ONjD/ FLKoDeKeRYesBpDJNOwzl7KYqkT06aIhPPXlff1JYzZ+RfkcTGqRac0xVz/1OTn45P0MubqAA CkSz4+88dir/WdzFQfh07lFOyDwrStTg4OI8hPKeFzAQ2vdkQsatD2yUU3lnMiq9OtHf00iRM kyLdln1fUFF4Ixagg5GL7aat52OMd+rdzSc15LSR2Hdg17fIqhaM9hQbKdaUolwPJozN1FvbF C6cu+eoD4NtnmmLKqXs4l6PHLpAXLz9ZCRdtzpwCQO2hA90q/YaB+opzZv8mQKYCepR5siqZc K8A+GIAyFiUxJMfHpW26tUSnPdrOXq/2SlD+xqbhj55Bj4GLQMEAQRD6wLWHjzQ4RA6ekil7U L0aqd/9yQtUGa+3DPtZ+hCrIRp7cF+igU0rUvWF6bO/qpCc4SasuTW/APn0AaFaG5hLBGMUV3 JOzALFbzjFjRH9c1fxNs8yypXLNK+I/SOIQXawFPHFHt5UPzvUMijPDyECANHo3ZgdRRALFqD U1778zsOXA/Jw3XECVs/SItQbXAf2JPG6wfWXnKHgE8e2XpZToEZNsSQ1hennzvVV9bhcX2Yt V0HcLpIqtCwcZfh04WToNi/MWVqglnCfJXNJqOrZLBIGHuosJNTG/2XeSepT596ya46oMwaez OQGbs2ack9YhytzrZT9Wn3I+3gEuuIIpLhY505D8RSoyZzdLa8CiZgYKjMLxffGnZIdmnpim0 qLKvY1O0S7MRy7dN9qzYd0IlP+uvUZj6frOI2blzqtHiMWiXE1C/zMGsBdVhlzOI4NyRZTauj KQxirI0C8DQ+tE4q5MTyJ6kGDBgacJkfiZsBJkPxMB895UKqGqDQO X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210706_133415_006478_0BAEBEA9 X-CRM114-Status: GOOD ( 15.09 ) 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 Tue, Jul 6, 2021 at 7:15 PM Yassine Oudjana wrote: > > (the numactl command helps run this both on the 'big' and 'little' > > cores without running into migration) > > > > Arnd > > Here are the results: Thanks, that was quick > $ numactl -C 0 line -M 1M > 128 > $ numactl -C 3 line -M 1M > 128 > $ numactl -C 0 cache > L1 cache: 512 bytes 1.37 nanoseconds 64 linesize -1.00 parallelism > L2 cache: 24576 bytes 2.75 nanoseconds 64 linesize 5.06 parallelism > L3 cache: 131072 bytes 7.89 nanoseconds 64 linesize 3.85 parallelism > L4 cache: 524288 bytes 15.86 nanoseconds 128 linesize 3.48 parallelism > Memory latency: 145.93 nanoseconds 4.88 parallelism > $ numactl -C 3 cache > L1 cache: 24576 bytes 1.29 nanoseconds 64 linesize 5.00 parallelism > L2 cache: 1048576 bytes 8.60 nanoseconds 128 linesize 3.07 parallelism > Memory latency: 143.29 nanoseconds 5.37 parallelism This is still somewhat inconclusive, but it does give some hope. The data that I found on random web sites was - 32KB L1, 2MB/1MB L2 [1][2] - 16KB L1, 1.5MB L2 [3] - 32KB L1, 1MB/512KB L2 [4] so none of the sizes really line up. My best guess is that the actual hierarchy 1MB per-core L2 cache on the two big CPU, 512KB per-core L2 cache on the two little ones, but no shared L2 or L3. The older Krait had a 4KB L0 cache, which could explain the 512-byte L1 output. Can you rerun the the 'line' test with '-M 128K' to see if that confirms the 64 byte L1 line size that the 'cache' test reported? Arnd [1] https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_processors#Snapdragon_820_and_821_(2016) [2] https://en.wikipedia.org/wiki/Kryo [3] https://www.geektopia.es/es/product/qualcomm/snapdragon-820/ [4] https://www.anandtech.com/show/9837/snapdragon-820-preview/2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel