From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout03.his.huawei.com (canpmsgout03.his.huawei.com [113.46.200.218]) (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 6DBBD39448D for ; Mon, 16 Mar 2026 12:10:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773663051; cv=none; b=V+criNDrtm7dVtxK9JdFv1rs5nCIjuXMXDxMDPrHxcHsNZ6VR9NE/8j41hTRhZE92NyoMGUdMXgBKLrhw7Ci/JBpFr3YoRXLHFJLK1vsfDZ0qJ3LwJDj9Sk6kNRNrsEPPIy4qU7K55x8HtFlHePaWS/2TyD9d0V1rHTSWb0Hmzo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773663051; c=relaxed/simple; bh=FqwcAxOJCbhiZeuFzL04Msz0qZf3BQQOe/PDfE7dioc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=hA+MYb8kpYW7MVFkQAcinkVzWwhvs6SEPcgiaw3BhWzjejUWIIaiPrjWAEYqvL6PO5of+GWzsaQtiPx67G1yiVmv/1P/z2pHFo01XNwMgl1a+FKEo7ny7UjzT+bRFoY8+LxAZtnWLloFBsH5M1RWMmqOo5XAFVXmEltsdfcVei8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=THijrbDZ; arc=none smtp.client-ip=113.46.200.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="THijrbDZ" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=FqwcAxOJCbhiZeuFzL04Msz0qZf3BQQOe/PDfE7dioc=; b=THijrbDZdCGyGhrRRLCS821D0s6pyScm/Ffm6mjNo5y15g+8tQMYJopPEWaf0bRzM7q2Wy9t3 uapbLli0ceFZ1D7gMbOeSBlyXD5MkrEVdDZ7VYnS9zw4IVlvpe7oOYHu3houTABfRjdTq/Zd0gF Sp4KyBLMd6AzBLdI4BT0MVI= Received: from mail.maildlp.com (unknown [172.19.162.144]) by canpmsgout03.his.huawei.com (SkyGuard) with ESMTPS id 4fZDLY3kLHzpStq; Mon, 16 Mar 2026 20:05:25 +0800 (CST) Received: from dggpemf500012.china.huawei.com (unknown [7.185.36.8]) by mail.maildlp.com (Postfix) with ESMTPS id E7E7A40538; Mon, 16 Mar 2026 20:10:45 +0800 (CST) Received: from huawei.com (10.50.87.63) by dggpemf500012.china.huawei.com (7.185.36.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 16 Mar 2026 20:10:45 +0800 From: Lin Ruifeng To: , , , , , , , , , , , , CC: , Subject: [RFC PATCH] mm/mempolicy: NUMA mempolicy mismatch during remote access Date: Mon, 16 Mar 2026 20:04:24 +0800 Message-ID: <20260316120424.1535575-1-linruifeng4@huawei.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To dggpemf500012.china.huawei.com (7.185.36.8) I'd like to report an issue in the SVA I/O Page Fault (IOPF) handling path: a NUMA memory policy mismatch caused by deferred workqueue processing. When hardware triggers a page fault via the IOMMU SVA mechanism, it's handled asynchronously by a kworker thread. Although the fault handler correctly uses the original process's mm_struct for address space mapping, the physical page allocation (e.g., in do_anonymous_page()) still depends on current->mempolicy. Since current here is the kworker, not the original user process, any task-level NUMA policy (e.g., set_mempolicy() or numactl --membind) is completely ignored. Instead, allocation follows the kworker's default policy, which may run on a different NUMA node. A similar issue was also discussed in [1]. I was wondering if you might have any suggestions on how to address this issue. Link: https://lore.kernel.org/linux-mm/e2d5f3a5-f6f1-4567-a162-a0e814292738@asahilina.net/ Signed-off-by: Lin Ruifeng 2.43.0