From patchwork Tue Dec 21 11:07:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 12689525 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 E0456C433F5 for ; Tue, 21 Dec 2021 11:07:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 191146B0071; Tue, 21 Dec 2021 06:07:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 140DF6B0073; Tue, 21 Dec 2021 06:07:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 02FC86B0074; Tue, 21 Dec 2021 06:07:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id E409C6B0071 for ; Tue, 21 Dec 2021 06:07:27 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AB764180E9365 for ; Tue, 21 Dec 2021 11:07:27 +0000 (UTC) X-FDA: 78941525334.31.0BBC9CA Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by imf08.hostedemail.com (Postfix) with ESMTP id EDA9D160024 for ; Tue, 21 Dec 2021 11:07:20 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id v7so18826459wrv.12 for ; Tue, 21 Dec 2021 03:07:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=M5nj+gBvQdZROHMnLR6jxrg8l7EBQjNMsTgxyewyXUU=; b=io5cAXMS5UqaOiSu6i7Yu72xUCmiP6/25wgJ2ecsrCYURA2QDdGtEA4RMAK9Qgp3EI GxY9sjivPZ4kthZ9ArnxD85NWydWugFVIXTKij2HjjNw4YKSms86DgPgUjQwy1tSMn7W 2B72VtQFLLeqSmp9onrzLIZQAJZ5vTjFVYn/itsv5qIjmPn+Nbcx6g3lnCrvpVJ2ZJoK DRHA/8cmXPQBR5WaYePKZEK9gpkabLpPpPjfI+R3qrEGYGiwSnU6GBXX6Gpnc/FRg3iy 8qJdq35gRumj7UFZAKAPofsg6S535rchXWPjINeqgSSafWEKt2WJipi4i9QGVHTmEZRz 9WHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=M5nj+gBvQdZROHMnLR6jxrg8l7EBQjNMsTgxyewyXUU=; b=q3mqdn1wzQGc8XPLmaTIO3xD8nt04gk4MDU2bgFjq7rdpcQI/9Yjhvf5UGVK5gNlMh bqwhiZqPKKHLggoSfdjTG81Qx38Rl6b56YcjOzMyK+EmwV9BlcehVXxc1TlMY7TjYbp9 e5zf2Xz4rklH5MGYTb+bxDtvLo7RdAPBV5soxb3YjBFBEei9Jsq0zSowuuved3ZwHJSS ja49nTxw8GcxYUVNgXE/2WVfPosuL6LVNMYWUHB1F0QNvc6bX6Tu2QHvbNSDQ+6z7iZ0 aytrx2ePqLac86dyPDe2h9aLa/hQqsq/fxN9iHp88T7+7QfVNG+0iFfW/oAhyHH76zrR S8AQ== X-Gm-Message-State: AOAM531YBlMFpSYd8c+666uxzjk+y1sXQ1cOd+aPBTaKfPH3HWOp4KmT fnXZMCuwVY2aVh+Ib/E70ls= X-Google-Smtp-Source: ABdhPJwDCCyprFCtxmBhJnotrdlSlZ2i0c4q5M7XL2cw3TYABXW5kGTbXS+bcu+52TBee7PUFp6TOQ== X-Received: by 2002:a5d:6d41:: with SMTP id k1mr2193127wri.134.1640084845897; Tue, 21 Dec 2021 03:07:25 -0800 (PST) Received: from abel.fritz.box (p57b0bff8.dip0.t-ipconnect.de. [87.176.191.248]) by smtp.gmail.com with ESMTPSA id n7sm2138483wms.45.2021.12.21.03.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Dec 2021 03:07:25 -0800 (PST) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=C3=B6nig?= To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, hch@infradead.org Subject: [PATCH] dma: Revert "make dma pool to use kmalloc_node" Date: Tue, 21 Dec 2021 12:07:24 +0100 Message-Id: <20211221110724.97664-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: EDA9D160024 X-Stat-Signature: psjgkruonspxdin7d3e6cg8q31ui95u6 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=io5cAXMS; spf=pass (imf08.hostedemail.com: domain of ckoenig.leichtzumerken@gmail.com designates 209.85.221.52 as permitted sender) smtp.mailfrom=ckoenig.leichtzumerken@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1640084840-961707 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: This reverts commit 2618c60b8b5836b73e8deb385a036820744d256d. 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. Signed-off-by: Christian König --- mm/dmapool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/dmapool.c b/mm/dmapool.c index 64b537b3ccb0..a7eb5d0eb2da 100644 --- a/mm/dmapool.c +++ b/mm/dmapool.c @@ -152,7 +152,7 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev, else if ((boundary < size) || (boundary & (boundary - 1))) return NULL; - retval = kmalloc_node(sizeof(*retval), GFP_KERNEL, dev_to_node(dev)); + retval = kmalloc(sizeof(*retval), GFP_KERNEL); if (!retval) return retval;