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 66E41C433F5 for ; Thu, 14 Oct 2021 11:41:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0DAFA61151 for ; Thu, 14 Oct 2021 11:41:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0DAFA61151 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3E6CD900002; Thu, 14 Oct 2021 07:41:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3972C6B0071; Thu, 14 Oct 2021 07:41:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 284F1900002; Thu, 14 Oct 2021 07:41:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0212.hostedemail.com [216.40.44.212]) by kanga.kvack.org (Postfix) with ESMTP id 1BCEA6B006C for ; Thu, 14 Oct 2021 07:41:52 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CC7992DD98 for ; Thu, 14 Oct 2021 11:41:51 +0000 (UTC) X-FDA: 78694853622.40.80FB5E6 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf08.hostedemail.com (Postfix) with ESMTP id AFD9130000A0 for ; Thu, 14 Oct 2021 11:41:50 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 3881721A73; Thu, 14 Oct 2021 11:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1634211710; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rh0ZGjQPNp0pKKoFUKY6R0XSjEWBeH3xw9RvodQm0IY=; b=SzfYhTrBXIKSBFtXHvVKR3CmFFhASeZ7AlR1ngq4Zd55ONjYthizoX3WLtFmz2l42w52DU eq5SYWGIel1Nvb1p/B6eTqCuUOIpXii1Au8d0LHVFt5UZ9GwMHpOzWDTtnEBUKNatolgyS rrZvb+WMQXEv03mDkhIKYgpBme/gcz8= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 155D2A3B9F; Thu, 14 Oct 2021 11:41:50 +0000 (UTC) Date: Thu, 14 Oct 2021 13:41:47 +0200 From: Michal Hocko To: "Aneesh Kumar K.V" Cc: Andi Kleen , linux-mm@kvack.org, akpm@linux-foundation.org, Ben Widawsky , Dave Hansen , Feng Tang , Andrea Arcangeli , Mel Gorman , Mike Kravetz , Randy Dunlap , Vlastimil Babka , Dan Williams , Huang Ying Subject: Re: [RFC PATCH] mm/mempolicy: add MPOL_PREFERRED_STRICT memory policy Message-ID: References: <20211013094539.962357-1-aneesh.kumar@linux.ibm.com> <83483424-e617-51c4-d55c-6106e66e2659@linux.intel.com> <87pms8ymvl.fsf@linux.ibm.com> <49514c97-c540-48ee-0b2f-3cd7bd3dfcf9@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49514c97-c540-48ee-0b2f-3cd7bd3dfcf9@linux.ibm.com> X-Stat-Signature: jqsfpspjabgzoy13r5sh7e5adct53ms4 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=SzfYhTrB; spf=pass (imf08.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: AFD9130000A0 X-HE-Tag: 1634211710-900094 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 Thu 14-10-21 15:58:29, Aneesh Kumar K.V wrote: > On 10/14/21 15:08, Michal Hocko wrote: [...] > > Besides that it would be really great to finish the discussion about the > > usecase before suggesting a new userspace API. > > > > Application would like to hint a preferred node for allocating memory > backing a va range and at the same time wants to avoid fallback to some set > of nodes (in the use case I am interested don't fall back to slow memory > nodes). We do have means for that, right? You can set your memory policy and then set the cpu afffinity to the node you want to allocate from initially. You can migrate to a different cpu/node if this is not the preferred affinity. Why is that not usable? Also think about extensibility. Say I want to allocate from a set of nodes first before falling back to the rest of the nodemask? If you want to add a new API then think of other potential usecases. -- Michal Hocko SUSE Labs