From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB929C433FE for ; Wed, 13 Oct 2021 13:10:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 69357610FE for ; Wed, 13 Oct 2021 13:10:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 69357610FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id E1C186B006C; Wed, 13 Oct 2021 09:10:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DA49B900003; Wed, 13 Oct 2021 09:10:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1E70900002; Wed, 13 Oct 2021 09:10:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0193.hostedemail.com [216.40.44.193]) by kanga.kvack.org (Postfix) with ESMTP id AF66F6B006C for ; Wed, 13 Oct 2021 09:10:58 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 71D071826B6B9 for ; Wed, 13 Oct 2021 13:10:58 +0000 (UTC) X-FDA: 78691449396.05.6599716 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf07.hostedemail.com (Postfix) with ESMTP id C186510000AB for ; Wed, 13 Oct 2021 13:10:57 +0000 (UTC) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19DCEDkR020938; Wed, 13 Oct 2021 09:10:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=qQZUk3i7MxLdM/AiCQ2hG5/ZKe/FWVR+Uo5yKP9+g/w=; b=sPHC86hCOI4niZAaOQE5/clfmXUoSJ4vqZ/x2gFRKJwNsJhS7NeuCi7KYD8fC+W+KbMj 3irSfP9sUmwAeWFR0cnued+llfCH+p5zyDbm6obE/mKhp1RqPVfoseBEj+6KA2GNX2Sp pGqeQol4xuL+akMYiB4f+AFoF/hVdBaIqzJy8Hnoa0jBahxV6Xuo45S62bvpmnXH2uhi 3bfWXgyK/80H+NNXgwD96j23guC+a+p6VkNs5cGbmRYNgBCv8QNbmEFl6hnW0vVW0czO 0XIngojlgGpQKpzcYyS3ZxdcGiUXgTAPCMiQEvSzV/UMa5zqLj/UNp6wxTeV49j9FO5V QQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bntpwyhkd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Oct 2021 09:10:54 -0400 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19DCovSx005791; Wed, 13 Oct 2021 09:10:53 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bntpwyhj4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Oct 2021 09:10:53 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19DD3ZfS014075; Wed, 13 Oct 2021 13:10:51 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma02fra.de.ibm.com with ESMTP id 3bk2qa0rmu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Oct 2021 13:10:50 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19DD54HK63635908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Oct 2021 13:05:05 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ECD48AE06F; Wed, 13 Oct 2021 13:10:42 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CF72BAE05F; Wed, 13 Oct 2021 13:10:29 +0000 (GMT) Received: from [9.43.38.58] (unknown [9.43.38.58]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 13 Oct 2021 13:10:29 +0000 (GMT) Message-ID: Date: Wed, 13 Oct 2021 18:40:26 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [RFC PATCH] mm/mempolicy: add MPOL_PREFERRED_STRICT memory policy Content-Language: en-US To: Michal Hocko Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Ben Widawsky , Dave Hansen , Feng Tang , Andrea Arcangeli , Mel Gorman , Mike Kravetz , Randy Dunlap , Vlastimil Babka , Andi Kleen , Dan Williams , Huang Ying , linux-api@vger.kernel.org References: <20211013094539.962357-1-aneesh.kumar@linux.ibm.com> <4399a215-296f-e880-c5f4-8065ab13d210@linux.ibm.com> <9a0baa59-f316-103f-3030-990cd91d1813@linux.ibm.com> From: "Aneesh Kumar K.V" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KZWwtnUvCDy7mIR1Z7yOme5SE3z69sKB X-Proofpoint-ORIG-GUID: QEXGOM9ytqnj8cZeq2ubueM60Fg7USs7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-13_05,2021-10-13_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 bulkscore=0 mlxlogscore=953 clxscore=1015 phishscore=0 spamscore=0 mlxscore=0 priorityscore=1501 suspectscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110130088 Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=sPHC86hC; spf=pass (imf07.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C186510000AB X-Stat-Signature: fasoxrz438bgaj53r1aok46t1bae4eqc X-HE-Tag: 1634130657-689061 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: On 10/13/21 18:37, Michal Hocko wrote: > On Wed 13-10-21 18:28:40, Aneesh Kumar K.V wrote: >> On 10/13/21 18:20, Michal Hocko wrote: > [...] >>> I am still not sure the semantic makes sense though. Why should >>> the lowest node in the nodemask have any special meaning? What if it is >>> a node with a higher number that somebody preferes to start with? >>> >> >> That is true. I haven't been able to find an easy way to specify the >> preferred node other than expressing it as first node in the node mask. Yes, >> it limits the usage of the policy. Any alternate suggestion? > > set_mempolicy is indeed not very suitable for something you are looking > for. Could you be more specific why the initial node is so important? > Is this because you want to allocate from a cpu less node first before > falling back to others? > One of the reason is that the thread that is faulting in pages first is not the one that is going to operate on this page long term. Application wants to hint the allocation node for the same reason they use MPOL_PREFERRED now. -aneesh