Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp206981rdb; Sun, 28 Jan 2024 22:15:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEp605ORvLZoaQ7v2b+yByEQLTq0OWnwg41BGsJult1gGQ5skejtK/eAFu307IV8A0cLsIe X-Received: by 2002:a05:622a:1714:b0:42a:a715:4182 with SMTP id h20-20020a05622a171400b0042aa7154182mr839733qtk.101.1706508950733; Sun, 28 Jan 2024 22:15:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706508950; cv=pass; d=google.com; s=arc-20160816; b=bmgAC7LuPBy3aAKtfMQeOCg3atsqg5xJoAPZCSkWdwBh8cVLy0yhVaKeCZADjl/zrn gjYmYlTO1KlDnXDB/jVDCEyrylbnP2LN4ZiDXybykeV5zsrcXMjHAHKFcnERf5sxN/Fb dA+8kdbx9lYfOtWBOizH0ASHAIdo6AB5bP5Bu8WWlfuVBuKZv36eQb99qe1b+LlS+OzA TbU4QKFmDOYMSOkYa6ySO+4+vcCmhMhrxCBitIiK0rcy5URs/ojnA4PmUU3nXVvPgGM1 KmmVpZE5h3rHfUYoEL2o8ojxmkfIEODJA9p3uZ88jOWspj7NOoYNpRlWOmRaOMU3f774 LtNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=5zyLLukh63BtFIapGKRY/G6SSuoXwi1VxIoVGF/nmNI=; fh=9XMEllGgo+bYEBK8TijaX/FMEq2NSjodT/25b427BJs=; b=J0uMN8pV+0wxanNOCIZyDVOLkXcBjQAuWSyJrkvkxir4RFDLL72+J/V9x6ofs8+rWD 5xl7FAbykkQnW1xLVzP6ccCRVXg3RJ8wv5TYEiySfievh3/4pRQH2WtKjnDwUkeFEYD/ UwTOMrntJMiQRCOxeL9qC1etROgWK8MkqKhA4nZD04YxVDsPSqRVM/1juX7pl0Nq0nVK 7gfyQJQUZoYh7Wo13Xo1OH+oOA2rwwP+zzxw8CUSOk771HSH1b++dRpe6vu2YEy348t8 8bUH3SfWGveMrjq7bMCbn/wV7PEB1+GAazpmW+X8rKqMqvH6ok8qJK/VfSRNcQiQ4mhn 7OVQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ustc.edu dmarc=pass fromdomain=ustc.edu); spf=pass (google.com: domain of linux-kernel+bounces-42218-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ustc.edu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v7-20020ac85787000000b0042a9d1fd4b1si2619654qta.446.2024.01.28.22.15.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 22:15:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42218-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ustc.edu dmarc=pass fromdomain=ustc.edu); spf=pass (google.com: domain of linux-kernel+bounces-42218-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ustc.edu 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7D7CD1C21CFB for ; Mon, 29 Jan 2024 06:15:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53C8F4CB24; Mon, 29 Jan 2024 06:15:30 +0000 (UTC) Received: from mail-m49198.qiye.163.com (mail-m49198.qiye.163.com [45.254.49.198]) (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 9C7F64C3D4 for ; Mon, 29 Jan 2024 06:15:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.49.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706508929; cv=none; b=kBJvtwEAMMvJ5qZMXVdlGRsUC8nam/zdc5a4zYoFNcVtzVfwZc9WK2Yj0kLAR3ZJqCml4AC0XuqZcwtHL2nmA2WNplxeqz6up6vnObUI8JbHAkWG6VLp7cOOr6PykSloUhX0K69mCNx73kwb8MwA2yvIdZeaN0+SOyKWD0VDGVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706508929; c=relaxed/simple; bh=k0mAZNrg4BsgnhFM7qwsAaKaHvudR4Cu4AygmjqhslY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Rb3KxKfMsWqYdpjjiT/iyYb9YkSD8PcLyRrlYvAIykqeE0pcM8U0S58fiUZVZg7f81+bINgQzJ7c7fWQkzvnXayvsoc0hC8U9YrxJbZg2UKps4wAtUp3YhQHTEkBNyXgXn1psAAYrFlIsabo5EhQcmgGEBDh12cHA9//yTTFG9Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ustc.edu; spf=pass smtp.mailfrom=ustc.edu; arc=none smtp.client-ip=45.254.49.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ustc.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ustc.edu Received: from [192.168.255.10] (unknown [61.151.228.150]) by smtp.qiye.163.com (Hmail) with ESMTPA id 666237E010A; Mon, 29 Jan 2024 14:15:02 +0800 (CST) Message-ID: <0e99b72c-c3d9-424e-8efe-af750da69ebf@ustc.edu> Date: Mon, 29 Jan 2024 14:15:00 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mempolicy: check home_node is in the nodes of policy To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240126132240.24518-1-luochunsheng@ustc.edu> <20240128002942.b0dbede1fcc4b80d2a398d15@linux-foundation.org> From: ustc In-Reply-To: <20240128002942.b0dbede1fcc4b80d2a398d15@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVkaTEtPVh5DGh8aGkpOQhpPH1UTARMWGhIXJBQOD1 lXWRgSC1lBWU1KVUpOSlVJSUNVSk5LWVdZFhoPEhUdFFlBWU9LSFVKTU9JTE5VSktLVUpCS0tZBg ++ X-HM-Tid: 0a8d53db60b703a2kunm666237e010a X-HM-MType: 10 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Pwg6Ojo4KjMPCAEJSyEzPRMN QwwKCQFVSlVKTEtNTktDQktITklLVTMWGhIXVRcOFBgTDhUIEx4VHDsOCA8YVR4fDkVZV1kSC1lB WU1KVUpOSlVJSUNVSk5LWVdZCAFZQUpDTEs3Bg++ For example,  In a system with NUMA nodes 0,1,2,3, i mbind process to node 0-2 and set home_node to node 3, it will not be allocated from node 3, then from node closer to node 3. But i think home_node should be set directly from node 0-2, which makes more sense. So i think it needs to return failure to prompt user. On 2024/1/28 16:29, Andrew Morton wrote: > On Fri, 26 Jan 2024 08:22:40 -0500 Chunsheng Luo wrote: > >> set_mempolicy_home_node should be used after setting the memory >> policy. If the home_node isn't in the nodes of policy, we should >> return failure to avoid misunderstanding. > Thanks. Under what circumstances does userspace trigger this issue? >