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 8306DC7EE29 for ; Tue, 13 Jun 2023 09:46:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9DD0B8E0002; Tue, 13 Jun 2023 05:46:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 98F1A6B0075; Tue, 13 Jun 2023 05:46:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 854DD8E0002; Tue, 13 Jun 2023 05:46:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 712486B0074 for ; Tue, 13 Jun 2023 05:46:36 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 3B8F6A03ED for ; Tue, 13 Jun 2023 09:46:36 +0000 (UTC) X-FDA: 80897244792.02.69E6C9F Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf24.hostedemail.com (Postfix) with ESMTP id 0B293180004 for ; Tue, 13 Jun 2023 09:46:33 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=DlSwloEp; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=9ImWj0dl; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686649594; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nOjdZHy7SkZ5nNR/rFz4YNlsYGMEyS2W9tpviTJyj3o=; b=Yi03z65N+gGABACWj9e+aK1vIKHnFUWWIvtPqABs9PKCjJTd78gISGiBdSP5rs6wzbHvEY 0UdGnPtW1dBzjUyYwCyhugkWYDWZlzl1FvTiZxGycc8iKFgVM0AGykr7dlNnnBPjAks3eV KjT/StM3JpCR7N0tHBLLFri5qJYZugE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686649594; a=rsa-sha256; cv=none; b=mWns5aIJWooKQGvKoSe8TDxnjwdkLZDYrhVEHL3vnwlzgwHckGojb6HWZGePE2CxE6x6B+ 2CvWLne5niZhoUPzBGx3OsOxu8ZKpkimJ4LmlKQRNtsVxbJZ1Bo776rsQQHUPwo2pcRc35 BmET72jfUFfG3+n40apGKfBUTTkUfuI= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=DlSwloEp; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=9ImWj0dl; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 471731F38A; Tue, 13 Jun 2023 09:46:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1686649592; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nOjdZHy7SkZ5nNR/rFz4YNlsYGMEyS2W9tpviTJyj3o=; b=DlSwloEpACBSDI+q0fl2oK/zZmthjDQChc8LU6CNu52QPGkMZjv59Q3lo/kA3qewoyLmhj tgfSydA6q7STuEiKjnHhG2vk1Dj5HCFukioHwEspQffucZR5SpCGRUAw2btHztGjz3oVu6 Px9lsB1SPecKsrubMnqpIVet8ZbBImE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1686649592; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nOjdZHy7SkZ5nNR/rFz4YNlsYGMEyS2W9tpviTJyj3o=; b=9ImWj0dl6xm/UL0I1+WAa/E/PotfKxEtqSQ1oCHh8BQa2oVQCBSCvKkcOECXM5aFpEK8lt CRdAJAWs4xmxNtCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EF84C13345; Tue, 13 Jun 2023 09:46:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sdbfOfc6iGTDXQAAMHmgww (envelope-from ); Tue, 13 Jun 2023 09:46:31 +0000 Message-ID: <5faed13c-43f2-66ef-c42c-7d7bebb224d8@suse.cz> Date: Tue, 13 Jun 2023 11:46:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v7 01/17] mm/slab: Decouple ARCH_KMALLOC_MINALIGN from ARCH_DMA_MINALIGN To: Catalin Marinas , Andrew Morton , Linus Torvalds Cc: 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 , linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org References: <20230612153201.554742-1-catalin.marinas@arm.com> <20230612153201.554742-2-catalin.marinas@arm.com> Content-Language: en-US From: Vlastimil Babka In-Reply-To: <20230612153201.554742-2-catalin.marinas@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Stat-Signature: 584i7ap7cwdyydmtmccx8xtohkdr5cis X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 0B293180004 X-Rspam-User: X-HE-Tag: 1686649593-317644 X-HE-Meta: U2FsdGVkX1/0Hn5kLf4XnpLPag6uj7S2PuDvKvb/+S8QkOF/Vy3ffbMRcMLjaO7mKqRm6H6RmXrUzmblRdDtl43W+L7UwmH/50aHEUBIetUe4EVUAFreFPYOmG0Ki6HdqwQXObkkoihw9gRca4AZGDOt+9mrsMcuEP8Akc03KU7f7XUKyDUgNwuUiKw1h3aXxR/grTt+G1z0AyZ+OOW++dItkPWQyNxGqHnrL2eheXSvoL9VOeA4pSNxrf4oI3U50+q7czo26jYmezjnufwrOq0VU9oZ0bGfmTZTOqCmrMHfbX/BrPFt7/s19n5zVu+BpPZWnV+zSCWP6tUcWB9ZxnVrKfXk5E72PjFtMDjo7Dh4EGFfIaYMgB5GiVnU/TwzuIbDKV/3/yGOHI42/zn06zDsmrlkarXEDTk5MUJoyGYAzktQEaXF3e7sgMDfVH6yHNaOP+FxuXiHO2eOE2MvZOWNdjxoL8DPV0vAawgJ3l1pJbShIdL9eUzmz0PGN6vhCu4zUFjzWcjciPwRLEVk1J9ZyrwK+V51Ar8rPDf44rPE59XHEURZxJxTq1Y6EFdQiHN92ApCnlP6LNRrXuXdbTTs77OEshuUZFMnSzy72C0WPWviHaz6qEAOnU2+Y10/4uu3wiKSFwebJyLA8KLbacHq3CDCINr+no7JoE1QWeVnhGheX5UWMp9ets/fNB/t+G+YkOZadY42HqmcjA7qgHnhPrWfkunhOGSYJ9uifRitJLk1mpIL5lQj5aMpp93bNAaVxbUpfjM2/Wlu2J3GFKW3ZTrVCvg7LOmwme4kzpLsqkdHKJBaQKc6hy4nexEQndnUKI9od/pRP2OE3RSSMyPZuzUYJt8bly/nItDgxb0YEr4XQQsd3i12Dr8yFtgTN/dCZckfgGb3gu3P0NvWyOcCeLoQnGgein+VFEs8HqypAhdE3dBVUBoSwwahBqMQyl3L4EEqtvgUopFBjtO QBrRObMs /2gFOUn19YpM8s/m3y7jvwY5pkFWv8LR51Npj/JqoDoXB/qApusImPeOH8eRhHG4lpDlwLaDzq6JO3kIKU9A91Eq6g+PM2Y1ujcO90roicSvsbIi8Ec4R8JYR0VR8HkdjODaDhsMUJhowctwp52nFRqmWFQn/HjGO9K/7YQv0jroYuKgpRTHSKZBawxzynaZQL1BxyIqbuslkd1s+qALWdnlbWNcwdH941BUodq9qdWdh67vxyVcohcdduTVU0bLssAyrWUYE33S6b4Eb7rWiWh/TPbqLR08ndLrUeSf2rmDN9uAxp+IxFZBZRruROYEfSFZPvJJcBiF7OMrYkbcACOOSj18B+itNUb8O6d3/KHeyvqh0VamODHSROzrqQWk+SQVs 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: On 6/12/23 17:31, Catalin Marinas wrote: > In preparation for supporting a kmalloc() minimum alignment smaller than > the arch DMA alignment, decouple the two definitions. This requires that > either the kmalloc() caches are aligned to a (run-time) cache-line size > or the DMA API bounces unaligned kmalloc() allocations. Subsequent > patches will implement both options. > > After this patch, ARCH_DMA_MINALIGN is expected to be used in static > alignment annotations and defined by an architecture to be the maximum > alignment for all supported configurations/SoCs in a single Image. > Architectures opting in to a smaller ARCH_KMALLOC_MINALIGN will need to > define its value in the arch headers. > > Since ARCH_DMA_MINALIGN is now always defined, adjust the #ifdef in > dma_get_cache_alignment() so that there is no change for architectures > not requiring a minimum DMA alignment. > > Signed-off-by: Catalin Marinas > Cc: Andrew Morton > Cc: Vlastimil Babka > Cc: Christoph Hellwig > Cc: Robin Murphy > Tested-by: Isaac J. Manjarres Acked-by: Vlastimil Babka