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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BDBDEB64DD for ; Sun, 9 Jul 2023 03:27:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC9576B0072; Sat, 8 Jul 2023 23:27:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C799C8D0001; Sat, 8 Jul 2023 23:27:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B8F716B0075; Sat, 8 Jul 2023 23:27:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AA8F16B0072 for ; Sat, 8 Jul 2023 23:27:23 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 741D980263 for ; Sun, 9 Jul 2023 03:27:23 +0000 (UTC) X-FDA: 80990637966.29.896A06B Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf08.hostedemail.com (Postfix) with ESMTP id BA33B160002 for ; Sun, 9 Jul 2023 03:27:21 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf08.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688873241; h=from:from:sender: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=tRUow8wqELgdroxD8Gb4gP0aAeB6u9yOtLnous3FpWE=; b=myrQ8SW9eF60ZuuI8SfyXe7MR9TNiBxQWKyR02KME1Dqq6M5OGP9LGhU+Rz/DIIo7Yjml8 Vn9I02DSiH6m05tXLClqgoJOzO69UlqzqZB5l8rdzorTQjEK+4F2yw1JyvF3YPQFRy+KFu Nfeq+1atL38D081c3UK/6+Mva9xeiWQ= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf08.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688873241; a=rsa-sha256; cv=none; b=IXkJ5bhlKhEnB3aR0ebEAQPS0zFYCARVskd0n6Xi4DnB3NJQEdB0w0ut8bja/i57p/0mVP EIr+QL359tDT0sGodDkcUupa0hz+eHC4aO/GoYxnReQCcvxowXdbcQW/Uma0UOU54RAq8E hyOiqP0c0or8Do4JbSctJFBe5y5PbR4= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A8E5160010; Sun, 9 Jul 2023 03:27:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 836CCC433C7; Sun, 9 Jul 2023 03:27:17 +0000 (UTC) Date: Sun, 9 Jul 2023 04:27:16 +0100 From: Catalin Marinas To: Amit Pundir Cc: Andrew Morton , Linus Torvalds , Christoph Hellwig , Robin Murphy , Arnd Bergmann , Greg Kroah-Hartman , Will Deacon , Marc Zyngier , Herbert Xu , Ard Biesheuvel , Isaac Manjarres , Saravana Kannan , Alasdair Kergon , Daniel Vetter , Joerg Roedel , Mark Brown , Mike Snitzer , "Rafael J. Wysocki" , Jonathan Cameron , Vlastimil Babka , linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Linux regressions mailing list Subject: Re: [PATCH v7 00/17] mm, dma, arm64: Reduce ARCH_KMALLOC_MINALIGN to 8 Message-ID: References: <20230612153201.554742-1-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: X-Stat-Signature: 1dneyhecomu5iirn8rfqgctxjd9yqe1p X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: BA33B160002 X-HE-Tag: 1688873241-976526 X-HE-Meta: U2FsdGVkX18eyM4pS2BGlQOd15eGZR8lDBnp85UKz4CF3QrkF33s8UKlHS7qCdte8Bq4/sU0S7bYf/9AbAFs8b5c0GtXKsDS7YiQGP950KuZHaPr2SlNJncvnDZQlbNY391465RJHlAGIPMvllGlKx+rmNyh/HsWi+p5BvcHYaawjI29VwRtgHb7zuk4pKvtvjJFwsNMZmJ2R0/6lnVoRuXOWfCdqOyhcrbqlwEzu7UskWLxQqaYV3wfoIN6TmCY0Rds6/bDnW/eOxPL/KX8NTYG20sygoYYj7hoekAUe1rZE912PjqBuv+KVXOeT+gy3xK1bK04K7xu8iLUTivqahXNJJi2+tlUBVnExO2JZ0GuGsMwPvZeUhXS3YIqsEusxQ6RPM6+85Q7TdBTsRV7QCTGcsHTtySpNRsnCoorpeWxUf+kuvdE240Cuk7xo+M0Yv8cZoakKN4++VVUrQ17QYl2Tz2XR8+lh5XMbGkHauOebLp2YL6FPySautYdPUp7Xl7qBzJxck/7UtIbDdnS5txvsQ1wy50sAZQTKzmD5usno1z1GnCmqHKuqtQpPxDT+dXqQEPwCJlv3SGH06viaGl55euSIQxJeYqVS/964c0VxL3hXSsN84xkiX/qK1o8kIeZi7xB3omq/dWJqscMCMdEHJTBtbEEEqu+jcRBsMvvA7lJLfhv5vL4dK6Vbm4grTaCG2FQNKXp+BytzBArL30YISnkn5bd56LE/RXXoVUPPJTXgGWJn8oTRCW91gsGcr0mcYy8jgYIgMywrCbYB2vgJnfms3aLJXgSQbtY6UUE9e68pERFfmhx7mPrRxL0AhmvOAgWx3d5ZN7UG+0bDPEvT0mZTRlBDfzA8qTYL63xCKBE+9idd0xMtTw9ee21tdlLS7ouyXAfRlYpqj0EJaRIlbjvrbWm2W+3Gnd1QKUAf0f03WIzBpNSHErW/8HogPsoyaozWtSnrQ01xfd kY7jhMfT bOEbmkI/YbdouX3+BP766PuGK3LkSQ8iaeYEHRyvCqZZu31ptKO1PVPfQNrpVIJj161UbZa4eFl7bagQ1AP7JUL5zKZnnYFBhQFiVyc0rxLJtevOTTYJA9i83qPTYSi1sFABKj8Sx2eFp2pJmoAUmPQtPbkL1KbVLowOVzRID8dDa/bnGidJBOJ2KdPbWNqCX5Wdn0wTUuoJRgtY6QlbiNUndU//GkvuI2o2GRtkVTyiLvNM1ZMBZJ33bE+U5oPqfYoeNEnq5tIAQbY0Eoal4UHcO/ZBbcZ/rcsw+hGZYsykppkGlQWQmr/vMdhfDFt5cRLJbIN/AbWi7lXQ9zEw0jb/6ZNOvKrMANVSNwgtVOnFKVt8mdqc4kcTZCxdqoQg/LnGloSKWlMcoDxO8xLG5bJ7sOuBbEt7/CJ8QaIE2vUhcGnW2a8zmOViQY38tERjfIYAL8pnZNd7VHuyVbbtU5oLE4Kk59ik2QFpJjPMe6/7ZR8tPUHPeDLRRV7dsCH0VliMNbboLH28iJeQ4iHB5XeFY3F432Z8/BTwKU6w1BKV3aV73SrE85Evu316Rv05/Q45BV/ov9kV25dU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Amit, On Wed, Jul 05, 2023 at 07:10:02PM +0530, Amit Pundir wrote: > On Wed, 5 Jul 2023 at 18:17, Catalin Marinas wrote: > > That's v7 of the series reducing the kmalloc() minimum alignment on > > arm64 to 8 (from 128). There's no new/different functionality, mostly > > cosmetic changes and acks/tested-bys. > > > > Andrew, if there are no further comments or objections to this version, > > are you ok to take the series through the mm tree? The arm64 changes are > > fairly small. Alternatively, I can push it into linux-next now to give > > it some wider exposure and decide whether to upstream it when the > > merging window opens. Thanks. > > This patch series broke Dragonboard 845c (SDM845) running AOSP. > With this series I run into random oops at __kmem_cache_alloc_node(). > Here is one such boot log https://bugs.linaro.org/attachment.cgi?id=1146 > > Reverting "arm64: Enable ARCH_WANT_KMALLOC_DMA_BOUNCE for arm64" > fixes it for the time being. I'm on holiday until the 24th, away from my computer and I don't have much time to dig into this. Are the DMA-capable devices on this platform non-coherent? We'd need to check whether the bouncing logic somehow overflows and corrupts adjacent memory. If the devices are coherent, maybe the DMA spills over the kmalloc() boundaries, now that we allocate buffers smaller than a cacheline even for DMA (no bouncing if the DMA is coherent). Also, are these devices behind an IOMMU? Yet another possibility is a not fully transparent system level cache with a line size larger than what's reported by the CTR_EL0.CWG. If you boot the platform with "swiotlb=noforce", do you still see issues? Or there's no swiotlb buffer allocated anyway. In addition to what Isaac suggests on slab debugging, it may be worth enabling DMA debugging as well (I don't remember the config name). -- Catalin