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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 02710C07E96 for ; Tue, 6 Jul 2021 22:27:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D033B6199C for ; Tue, 6 Jul 2021 22:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbhGFWah (ORCPT ); Tue, 6 Jul 2021 18:30:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbhGFWah (ORCPT ); Tue, 6 Jul 2021 18:30:37 -0400 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24764C061574 for ; Tue, 6 Jul 2021 15:27:57 -0700 (PDT) Received: by mail-oi1-x230.google.com with SMTP id z3so239000oib.9 for ; Tue, 06 Jul 2021 15:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xoyK2QzlCZt8bi5diUk8cj153VxP+YLKzFJZf6Qe5Xc=; b=apVFqHowsFKnl/eESrEbefgya/IgviBHmDOD1jyq4Y8+IzH8UQCJieCGNF4idzkDQ9 sHIaaZqQ8v/yb7bXWCKe6f4bN8xs7xIprzqJaNTDf3BvjUzp9TRYpzOnQTB2w1QkKVoM Ys8XhDhIHtXuGbX6EsBZ4qPbQEVUxaBmsZ6Bvi16R7zlUMYWydcp2UqgSgEU283zKv+9 EDELXnDI+EOhN5aB1s7Xa8LtUqQsoeYLRhQW8fh18Hdzhjw2NjzdAB40d2Yy3Ppqevmt NtyB5VjcTJSn1XnQr/UYr5GrqVqN+gbkAndG8uqyz8NqgVthFqUCbE7GNo9jyqFSIw8C HHQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xoyK2QzlCZt8bi5diUk8cj153VxP+YLKzFJZf6Qe5Xc=; b=QG9VAQJmtGYetGPsaeuBkSX8qILkfTVX8VGWUeJDBdqjrr7jTHiw7aOj3zRjrvDemL MLYhHIf//mn7PuKt0JVXFJK5hN7Q/IOhm0e+HOdaWaNu7x6MK/1Gtz/sC0lxbJVJhxnQ o9ITfDPWa6Gr5sUtVoiKoM/MspP8dHbtcomEjAl/zngDv6opABCs6eGLHzp01M0ySwrn 9QePU1NyXdN0NFHZCEsveu1jgj9Bm8g+JncHNdIA1Cy7q7hlDlhajIjK48nsetep6Q6y MxEt+8kUipdwXHQCktva4Z7IjYT4zS1H9pjVC0LyKQYOlQAoCFymSMu/DHi063L02aFC RdYg== X-Gm-Message-State: AOAM533i/sgd0pqHhc3SBRUmn5hfXLUn+jxMwen/5sfacJdr1a2uu6J+ +OhRLH/rrsFwJjkzTrQCgdQxXw== X-Google-Smtp-Source: ABdhPJwqRWePe9Ly0r4VcYKwxKaiW4uAOzS/FR1dhiDVLCX0oJ+OV6IK1DmYgXsfLCDkMEDX7ZHZCg== X-Received: by 2002:a54:4d98:: with SMTP id y24mr16335106oix.18.1625610476475; Tue, 06 Jul 2021 15:27:56 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id f20sm336018otq.35.2021.07.06.15.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 15:27:55 -0700 (PDT) Date: Tue, 6 Jul 2021 17:27:53 -0500 From: Bjorn Andersson To: Arnd Bergmann Cc: Yassine Oudjana , Marc Zyngier , Will Deacon , Robin Murphy , Catalin Marinas , Ard Biesheuvel , Android Kernel Team , Linux ARM , Mark Rutland , Vincent Whitchurch , linux-arm-msm Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) Message-ID: References: <20210706102634.GB24903@arm.com> <59800d6c-364a-f4be-e341-c5b531657ba3@arm.com> <20210706133314.GB20327@willie-the-truck> <87zguz7b6b.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue 06 Jul 15:33 CDT 2021, Arnd Bergmann wrote: > 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? I can confirm that MSM8996, and a few derivatives, has 128 byte cache lines. Regards, Bjorn 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 5B2DFC07E96 for ; Tue, 6 Jul 2021 22:29:39 +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 1514361C9C for ; Tue, 6 Jul 2021 22:29:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1514361C9C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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: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=Zpps1ta44qDwd61mYzfP+b0P1vAY77Bw4fS9dOQY/DU=; b=NyR51wdRyZUGXF bMNwUdsp9CfNiYmLFE4jJPDdR/HPWm/RmxI/I2mYSUAUAM9T61iWS39QNsTRQeNZsHDus7lB2rSso UhwWtXsH+7Kx3hRyiIxeQxTUNcqAV/E5qJKi00R+yq5c9IDbpgsCV6a8+FRardf7CeqITCOt+Aa50 6cUiwnNEoML/LyQ5Ff4RfNX9fYQnMqk0MUQtYsrSeUpL+0nW8fmSTsz1ioITdcWdzSv9zZQbEdyTi dS9fl+r9YItM52G/oA1D8VB5nKH8gxDgk7QLccn5jyty78sSW55d2AYiuaNxfdbxx1E8qNxoCd1/g GB6Ppy22o2fP8Dup5vIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0tXs-00Cx3I-C9; Tue, 06 Jul 2021 22:28:00 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0tXp-00Cx2r-6D for linux-arm-kernel@lists.infradead.org; Tue, 06 Jul 2021 22:27:58 +0000 Received: by mail-oi1-x22a.google.com with SMTP id l21so1107473oig.3 for ; Tue, 06 Jul 2021 15:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xoyK2QzlCZt8bi5diUk8cj153VxP+YLKzFJZf6Qe5Xc=; b=apVFqHowsFKnl/eESrEbefgya/IgviBHmDOD1jyq4Y8+IzH8UQCJieCGNF4idzkDQ9 sHIaaZqQ8v/yb7bXWCKe6f4bN8xs7xIprzqJaNTDf3BvjUzp9TRYpzOnQTB2w1QkKVoM Ys8XhDhIHtXuGbX6EsBZ4qPbQEVUxaBmsZ6Bvi16R7zlUMYWydcp2UqgSgEU283zKv+9 EDELXnDI+EOhN5aB1s7Xa8LtUqQsoeYLRhQW8fh18Hdzhjw2NjzdAB40d2Yy3Ppqevmt NtyB5VjcTJSn1XnQr/UYr5GrqVqN+gbkAndG8uqyz8NqgVthFqUCbE7GNo9jyqFSIw8C HHQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xoyK2QzlCZt8bi5diUk8cj153VxP+YLKzFJZf6Qe5Xc=; b=NJMssYTdfHEA2fXH+Ot9l4FPUDx2ChbCNaztm3UQT7tc9SGMK+QA6Xigit+2Z8xcb+ VP5gaTQ0+ST+sb7K76pJFItxdzpoihi3zo6esHSicBcEEAbQC+pJfli5rdB9cj2RXxa1 9WuL9+9VYeJBOOLm9edTHiNmTOvxZ5YXsQL9gBW+M6nsAQYWKGrdb4UoT7DXwEE5S4CQ 0WbiTvB2M2k7slGUeqdLY0EjekSYzYLnfd04wO5iTKoZMFN9cGg5mQCDYrMPuR3x9bvX PKeKvfHHkzJZ9MfuSrXUoP9/mHt+Ma/SJrZ4vn7JTqsMkROIi9Ro5apdNDr81H937bC+ jy/g== X-Gm-Message-State: AOAM5325Haf96wKakHPKxpzpsHFuDt/PlBcaZ1wR0bxAfYdxScx4vWHP hJZB8bT7KFOO0CQgoEEVf7zS0A== X-Google-Smtp-Source: ABdhPJwqRWePe9Ly0r4VcYKwxKaiW4uAOzS/FR1dhiDVLCX0oJ+OV6IK1DmYgXsfLCDkMEDX7ZHZCg== X-Received: by 2002:a54:4d98:: with SMTP id y24mr16335106oix.18.1625610476475; Tue, 06 Jul 2021 15:27:56 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id f20sm336018otq.35.2021.07.06.15.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 15:27:55 -0700 (PDT) Date: Tue, 6 Jul 2021 17:27:53 -0500 From: Bjorn Andersson To: Arnd Bergmann Cc: Yassine Oudjana , Marc Zyngier , Will Deacon , Robin Murphy , Catalin Marinas , Ard Biesheuvel , Android Kernel Team , Linux ARM , Mark Rutland , Vincent Whitchurch , linux-arm-msm Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) Message-ID: References: <20210706102634.GB24903@arm.com> <59800d6c-364a-f4be-e341-c5b531657ba3@arm.com> <20210706133314.GB20327@willie-the-truck> <87zguz7b6b.wl-maz@kernel.org> 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-20210706_152757_280742_7A4D1CE3 X-CRM114-Status: GOOD ( 18.49 ) 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 06 Jul 15:33 CDT 2021, Arnd Bergmann wrote: > 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? I can confirm that MSM8996, and a few derivatives, has 128 byte cache lines. Regards, Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel