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 CAEF7C433F5 for ; Fri, 14 Jan 2022 22:06:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 61EA86B0111; Fri, 14 Jan 2022 17:06:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5CD4D6B0113; Fri, 14 Jan 2022 17:06:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4BD466B0114; Fri, 14 Jan 2022 17:06:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0213.hostedemail.com [216.40.44.213]) by kanga.kvack.org (Postfix) with ESMTP id 36CD36B0111 for ; Fri, 14 Jan 2022 17:06:58 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id DA9781826B6C1 for ; Fri, 14 Jan 2022 22:06:57 +0000 (UTC) X-FDA: 79030278474.21.6C138FB Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf12.hostedemail.com (Postfix) with ESMTP id 4D4EC40011 for ; Fri, 14 Jan 2022 22:06:57 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4B29AB8260F; Fri, 14 Jan 2022 22:06:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C13AEC36AE5; Fri, 14 Jan 2022 22:06:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1642198015; bh=/oovxXJXTKtKuvnlkNmYq68O5ONmf4m79qsZGWgSX5k=; h=Date:From:To:Subject:In-Reply-To:From; b=jWNdtpuhK133rjj30s3o+yy1R+uG84R7rynEpeaf0XXpCTeXdFZK2c/zyB23lBS7M RGjN70c670O/kZIIMvZPuwPH5Qiy0Rx+N984cik0rpbrbu/TjNpUVgHn37GPQzZ8tq Hcv8FHYpceicrng+USlsM3iCyojcZUbxJI5hgwyI= Date: Fri, 14 Jan 2022 14:06:54 -0800 From: Andrew Morton To: ak@suse.de, akpm@linux-foundation.org, christian.koenig@amd.com, clameter@sgi.com, greg@kroah.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, rientjes@google.com, torvalds@linux-foundation.org, yinghai.lu@sun.com Subject: [patch 072/146] mm/dmapool.c: revert "make dma pool to use kmalloc_node" Message-ID: <20220114220654.Mqg0T2wlx%akpm@linux-foundation.org> In-Reply-To: <20220114140222.6b14f0061194d3200000c52d@linux-foundation.org> User-Agent: s-nail v14.8.16 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 4D4EC40011 X-Stat-Signature: kp9aqbh3dwbo3naina49hkx1tge316ar Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=jWNdtpuh; spf=pass (imf12.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1642198017-264895 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: =46rom: Christian K=C3=B6nig Subject: mm/dmapool.c: revert "make dma pool to use kmalloc_node" This reverts commit 2618c60b8b5836 ("dma: make dma pool to use kmalloc_node"). While working myself into the dmapool code I've found this little odd kmalloc_node(). What basically happens here is that we allocate the housekeeping structure on the numa node where the device is attached to. Since the device is never doing DMA to or from that memory this doesn't seem to make sense at all. So while this doesn't seem to cause much harm it's probably cleaner to revert the change for consistency. Link: https://lkml.kernel.org/r/20211221110724.97664-1-christian.koenig@amd= .com Signed-off-by: Christian K=C3=B6nig Cc: Yinghai Lu Cc: Andi Kleen Cc: Christoph Lameter Cc: David Rientjes Cc: Greg KH Signed-off-by: Andrew Morton --- mm/dmapool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/dmapool.c~dma-revert-make-dma-pool-to-use-kmalloc_node +++ a/mm/dmapool.c @@ -152,7 +152,7 @@ struct dma_pool *dma_pool_create(const c else if ((boundary < size) || (boundary & (boundary - 1))) return NULL; =20 - retval =3D kmalloc_node(sizeof(*retval), GFP_KERNEL, dev_to_node(dev)); + retval =3D kmalloc(sizeof(*retval), GFP_KERNEL); if (!retval) return retval; =20 _