Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp206028lqg; Wed, 10 Apr 2024 23:14:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGvjX9tG3jRQZwqZ9ZClPqdAolFPJ+IqBZZ5E9zojcp3F4im44N/b34n5QtN4DIeKUsd4oKBSb84Nil4pi3ahvHN9TC8Py23xOo58nIg== X-Google-Smtp-Source: AGHT+IF0A2shuV+ZNHqpUxoDshLgtJPSXAfV1u42ZDE+ws5i+mpbReVaCJQCsnmZNZfvUJ4B4Ulw X-Received: by 2002:a05:6a21:4981:b0:1a7:5fe0:1c99 with SMTP id ax1-20020a056a21498100b001a75fe01c99mr5524395pzc.46.1712816077747; Wed, 10 Apr 2024 23:14:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712816077; cv=pass; d=google.com; s=arc-20160816; b=OoxsgmT5khAmsMrMDtSL4B/X1DBXlcRIaxFegTVaf/H959NrFgrbQKiBpDBwSQpCK3 kUoFwY8/NrSQFQa5i2bDUeZ1EY41Lr9Fio591xO9WZnj15lb4+PV8Bagk2jItj7UpOOK JUrnw0yqQ0zLsV+M60PbUaM+Ff4h1jTvU+yC6/eum+DIPjX/iEH7vTXUaGpCO0zS9LSm jqFSDocMrKnpVvI1Pk+3yFuZZAW5MrqH7ofCbfghsidET/E3QDPeQHqbDipzmySirMdB 4QLudsD5eTA1OZi2CfULxVBsXg/RzgJxO8NxQS18OntnK+egxinWVZ1tSKkr6Zy63Fur tXjQ== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HAfLv3r3dJxqS56KW4xgDhrH3UO8kBeaQvM76fR2wZI=; fh=lmKdHIWhDS2KI4nKlfw4SAxurWg3wVSWJv4Qhej9zm4=; b=npbL8ytTul9KlZXbT2W/7vY+C2yUlUtsgGu1PK5ZzrWT2ZcOLJtX0ng+3Ynie7U+Hv bsB20d7sTBsLYPILHTE8nNWWnl9ft0jB4/LWAwa1Yju4Q0Ea7ZbYdWYHpYS/xFOXoz1a DP1hdhUkE4/AIyDdbN3R5r9RLJ0dtq9Vy+83LNEJuhow3ko7jwRayfNs0wdwKAEvGevt y3yXnIB3psDdx4pGl2YQ9ecI2EcBeYkmJ1nChRyN13ojqOLH1Nzso9RJwUa2iNQ6BvSt aZ+LoK+LO3o53S2B8wU7RMezyn6QPcZuMyonTz9QntlohJzmd8zHKhrWJMGzZ7VtTCS7 VtuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Zj3Xqoc+; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-139690-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139690-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o2-20020a17090ad24200b002a564dec750si833752pjw.37.2024.04.10.23.14.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 23:14:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139690-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Zj3Xqoc+; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-139690-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139690-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F37BA281D10 for ; Thu, 11 Apr 2024 03:09:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A57913BAE7; Thu, 11 Apr 2024 03:09:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Zj3Xqoc+" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 C2F7013B795 for ; Thu, 11 Apr 2024 03:09:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712804942; cv=none; b=u3B5dgdF3u56U6GVfa8fVQn8Y/ZqKMwIxegXWM8Ku1Vebn4rz9e8TlTmyCWcSUVPVq81vb09Ti648IV8vjtu8Bq1flyIiV+mebXBpipSspJnA1eSkMuz0eqGqujjY80Zh6xcJMCCIqb7kBL5mG6ks8nu04ziaLEm7lac+/iTcsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712804942; c=relaxed/simple; bh=OGnOMxkpin9TYenIr8jNLqVcXysJ8LZw6T1asCHfxQA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ddnfg2dNNhgIAhWcSBiUCS4j8du74rnViqW1nCFfLeCMpzPuZvBWAWZ8DfWPeGvWAgbEzxdnu0pWgJNtHbJ2Hci3OAB0e5Mp2Qh5cW6aYJl0n2B9vKGLbnHqKgOP7ePSdRMNY3BDv94B8l8lhlxcqXiUAj8otPRoJL7s5sFNKMw= 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=Zj3Xqoc+; arc=none smtp.client-ip=198.175.65.9 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=1712804941; x=1744340941; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OGnOMxkpin9TYenIr8jNLqVcXysJ8LZw6T1asCHfxQA=; b=Zj3Xqoc+OJ9ze3/clfGcrAhgCK93eZMLd7ARnjRzAEtoO8w2IqyRW4Gm QmZjOmyotw4yK561QJN2w8uPLDjqob+Cp5LsemROJwUiIF8XPqY0Ln5X5 ScNYcV6GGKSohwIE5IW0Fx5QxvW2Nv1xshy/pXQo7F9X85ClVzBFANrge XyPZ2Kb/mkWy1S92KlqW6JDnV9bCINoKt2Vd4o6342jyBaX2dtjyQ7pVU XLpVOLpuUh4xIQu4PQ1F0BMeFJ9aEikzerOnHiyuU2U8K7+VOo47rWtsd jmbkjPEhRBeWehnyGh2A6xoCgWIHXvOnev3mmTu3LXdfaIgTHjuqgbj6s Q==; X-CSE-ConnectionGUID: HSHb+TRARp6y58sem3PMMw== X-CSE-MsgGUID: aP0GrKg6T32tSWtgKZkTSA== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="30681442" X-IronPort-AV: E=Sophos;i="6.07,192,1708416000"; d="scan'208";a="30681442" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 20:09:00 -0700 X-CSE-ConnectionGUID: c67rkbpHQduq8UVS+RAUvg== X-CSE-MsgGUID: BDA9RDfFQgWOqCEdwfaKcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,192,1708416000"; d="scan'208";a="20822973" Received: from unknown (HELO allen-box.sh.intel.com) ([10.239.159.127]) by fmviesa007.fm.intel.com with ESMTP; 10 Apr 2024 20:08:59 -0700 From: Lu Baolu To: Joerg Roedel Cc: Jacob Pan , Xuchun Shang , iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] iommu/vt-d: Allocate local memory for page request queue Date: Thu, 11 Apr 2024 11:07:43 +0800 Message-Id: <20240411030744.273460-3-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240411030744.273460-1-baolu.lu@linux.intel.com> References: <20240411030744.273460-1-baolu.lu@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jacob Pan The page request queue is per IOMMU, its allocation should be made NUMA-aware for performance reasons. Fixes: a222a7f0bb6c ("iommu/vt-d: Implement page request handling") Signed-off-by: Jacob Pan Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240403214007.985600-1-jacob.jun.pan@linux.intel.com Signed-off-by: Lu Baolu --- 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.34.1