Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2984286lqz; Wed, 3 Apr 2024 14:36:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGgfd/rr4ITvpZnh1IVK4ZUoHz36lYffkhcNchZvEFh883aciDb077R6qY6xv16ihm8frUqVaFVjFoKlJ3COqOqJKPL4y2EPUZ27G/Vg== X-Google-Smtp-Source: AGHT+IFwQUHnDaD7++xYwW72Mkf6fVtQCNQqpmtI+hGlFevZV0KgTgkl9MjtLYUS+SszJzKNVmMA X-Received: by 2002:ac2:446d:0:b0:515:d30d:9abf with SMTP id y13-20020ac2446d000000b00515d30d9abfmr484409lfl.7.1712180164081; Wed, 03 Apr 2024 14:36:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712180164; cv=pass; d=google.com; s=arc-20160816; b=UfHSB2hzaSdmyD3cVqN2Vsz4ecGzAwy/VyFyM+sLG+YDKGcArfG9BCvTnZ6VH5hJd2 dpIFJYsU5omYieNwWDvPuGNkba1CEcIxAmWI9mlXU/aFSgeEd8iJ/4Y80EwwPlESYKJB BPtqOzIOR8kRQqaHc4BQkC/Fp6p6AQGBeUAwlcZMg8FsZ20YRLTL7VwPriOlHcR2G+Jd II3W+2D1hfzrb+Vk50yh87S0p+CSB9SLPx+v0rHu7TaQP1gW3RB90JP+zjSLiyoimtbi RqirGkGfXCoHOdjMlGzJhCRDziSr7V2BschPvElNTpbTD1j+Fgq/1ETQie2rveTT3Ec8 5QSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=8jIV8dmYJcvhTdu3ocBcITaZky9aXa1qbesvYNyqi24=; fh=KOP0OZMNPURF43t4p71swGBpM7ToU9PxBUbBOsolmjM=; b=zlDpe+BNggTYhWV2E+5ZxLiGUezTT5l7D8ZL0N6z83Ba9mxN2d1AQApZ2RMbLZPfUt lGwbl/NGJKPJR0cOXlX36xwId55mottiZ5+5VJPzsJ+fXUmEbP6xxKt3aBeEkiFrJWR2 JLf6iH91PJ27iFjBGS+RWc3d58rHZyXhhmWj3WXmnZO7rj1Jmpoabcf9EJIru2P7LVMI HpQ4BhY9cWjIxCqTHfF8/nilUgdtoM7qqK2a12hrWr18tiBzB1tp18MjXaz0QtO3NPk0 Ce8/UfsrrrZ59RYTjdzWuoAY3se7xF0RUFqIbuXK50IO8uQUDwSmfv2NjfJs61MfGSXH 38UA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DIlZmHm1; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-130639-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gs18-20020a1709072d1200b00a4e605a4ecdsi4294065ejc.453.2024.04.03.14.36.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 14:36:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130639-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DIlZmHm1; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-130639-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C67CE1F25D46 for ; Wed, 3 Apr 2024 21:36:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A69B156960; Wed, 3 Apr 2024 21:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DIlZmHm1" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82AA4156867 for ; Wed, 3 Apr 2024 21:35:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712180145; cv=none; b=bJJfe3ppuG5qUKRmbv0cq5epOpgX2q+TVurIkV46W46pwTKVPpGdA8ppUF9HLFHpnkZkSUZBfMwpkNjRZnhWOQxUAUu+Rk8JwsCObr1jiLPp4XohxhkpXia/nDTkGLka8OfbgE7KmhrLBC442dGp3RrzyEZEiTehw4UkkGVxPi8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712180145; c=relaxed/simple; bh=5velOTIExN+yC0MZHPBQnGuRcYai9BnR3d+mvItiUjg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=FkYv2JAO76xxOnSxT6VZVWPWmrprNInovFDj6bfWOnCzOHAIdzcctS3GZfmYkqw8jakNtN5lLS1LO49qzN5P1iNFtBg9E6pEbPw++ITIYLdX25zr1lI9951wHiGGVR2vEIfs+/w9rFeXVHxbN3ugnz8FEArjXWmVrqPh5fCcna0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=DIlZmHm1; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712180141; x=1743716141; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5velOTIExN+yC0MZHPBQnGuRcYai9BnR3d+mvItiUjg=; b=DIlZmHm1kYOV27pnD/PsdeM7mwyFYiDJnJdRkHUj2IBrataYKj83QC+k G+Nt+6rtISKL/n6DKhsD2WgUU6zNcDazkL73OqPiuLhutn1CPg49yK7Hl HXHKzsoZXGiUW0e/1znDS5ZamoJiN5PuRSurczRXYSi5NtCkX0a6rB9SV W8iL1bVTi7vRzWGSPjIFzrwsHBA2ug7AoPDzktOhSRuh6vnHTkLlykTTS SII6yZdFqy9LwaflLCn0LRrzxmId8MbzZukUR8B93IxSDsWDW0LUMrKYb mOGdRjGUYGuyF+xWEt1ylqnOODTxtjq5BoDHmGSlgfTj+90n5MKt+k/gi g==; X-CSE-ConnectionGUID: RWIJNLLDTp2v1LJIVcTx3A== X-CSE-MsgGUID: GxndDhr6TkGKtINF4zufQg== X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="18014660" X-IronPort-AV: E=Sophos;i="6.07,178,1708416000"; d="scan'208";a="18014660" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 14:35:40 -0700 X-CSE-ConnectionGUID: 5SFAvSoTT4u22VlaEsqO8g== X-CSE-MsgGUID: ++kFMv6DS9WbzHYa0SquyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,178,1708416000"; d="scan'208";a="18681402" Received: from jacob-builder.jf.intel.com ([10.54.39.125]) by fmviesa008.fm.intel.com with ESMTP; 03 Apr 2024 14:35:42 -0700 From: Jacob Pan To: LKML , iommu@lists.linux.dev, "Lu Baolu" , Joerg Roedel Cc: Raj Ashok , "Tian, Kevin" , Yi Liu , Jacob Pan Subject: [PATCH] iommu/vt-d: Allocate local memory for page request queue Date: Wed, 3 Apr 2024 14:40:07 -0700 Message-Id: <20240403214007.985600-1-jacob.jun.pan@linux.intel.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The page request queue is per IOMMU, its allocation should be made NUMA-aware for performance reasons. Signed-off-by: Jacob Pan --- drivers/iommu/intel/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c index c1bed89b1026..ee3b469e2da1 100644 --- a/drivers/iommu/intel/svm.c +++ b/drivers/iommu/intel/svm.c @@ -66,7 +66,7 @@ int intel_svm_enable_prq(struct intel_iommu *iommu) struct page *pages; int irq, ret; - pages = alloc_pages(GFP_KERNEL | __GFP_ZERO, PRQ_ORDER); + pages = alloc_pages_node(iommu->node, GFP_KERNEL | __GFP_ZERO, PRQ_ORDER); if (!pages) { pr_warn("IOMMU: %s: Failed to allocate page request queue\n", iommu->name); -- 2.25.1