Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp335759pxb; Thu, 9 Sep 2021 01:59:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXNsPMsZBAWAcmG+oGRSOPR/NDGK0LTqGv5mtPLMnxYOA3QRDgJxm4C3ZkOXj5+uRs1Nti X-Received: by 2002:a05:6e02:1bc5:: with SMTP id x5mr1515135ilv.83.1631177990338; Thu, 09 Sep 2021 01:59:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631177990; cv=none; d=google.com; s=arc-20160816; b=XpoSo3FwOWHpYAE5N797IAWvXjFd1vCSyxHxCQ+IzCiJhsBMIEH8Nd24kQFFhZiojL AWvJ9pOgBoVg8EV4Gz+75yCO8jN25C+DxvK1Iot0D9qKuWM52qK5EjVmTcsOiswzQoK6 c3pRFjcyi9k2PShYJ8CQOiMFLS1RZwqigWX0FPrsXrpbiuNabjMgY1+rA4NISVmiECfR y9j1WsEdphIxLXsxgHaxV4srOxG925mp3YCxOOXE5Ih/OoXFC5SAeVWLi22cH+hGcpct N6pxrlxguotiGGAj6KRVRSMA0XqlBlDfbgQ06O9q0rj6gr3KVGk+ZWadW+iObqrJVw9O wpfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=B/XpMR8IW7n50hqBRiVqU8UBvztjlF9h6rtat9Sfp/0=; b=x2ts+OcdDRK9BIfq+rl56ksDs38492q4+cAIhnkH570R+0H5M74fJXkzXma10KsBFX zPr4eTcm87r3mQumpxAIPY0SPa3u9/dT9coh5TG5hxEU9aluNQmutNC/NKA18jNIdcCA Vu60wGnJ4NEu5wgDkL1AFijRJn+QN+RwmijEJ/Jy/Rg9myMqnc+MdvK3X2j/TaZ093oG HvnPvapjs+S3A9HhH2qucfIYD/TCUBDVnyEwVHz42jW5DlxY46b37L7cVPx95NyWOo1H Ocow4Rw1NsOWat5XmHdlKn04+kaPen6DwKE/csofW1qOoN9bB3LhLafAqm28iixwNkav BZ0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aoFWILU3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si1252470jat.54.2021.09.09.01.59.39; Thu, 09 Sep 2021 01:59:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aoFWILU3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231281AbhIIJAE (ORCPT + 99 others); Thu, 9 Sep 2021 05:00:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:35865 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231825AbhIIJAD (ORCPT ); Thu, 9 Sep 2021 05:00:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631177934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B/XpMR8IW7n50hqBRiVqU8UBvztjlF9h6rtat9Sfp/0=; b=aoFWILU3hUDOmlcdvoq2n9BEjwtVdaSCTvybAuVFnVu4SB7W7QwMavJMXcpzWvwLbIlvbv +8tsrTgwK7P3RdTxYw0MDB67koCeThwUDzHfv/glZKfGDiKFel+Cli0l9Vcgy+Ga3ccU0X mraHXOGiFTDpMkMl4G0vilCy+dOOyIQ= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-328-u1rBS1MhMpudenNhKLRu9w-1; Thu, 09 Sep 2021 04:58:52 -0400 X-MC-Unique: u1rBS1MhMpudenNhKLRu9w-1 Received: by mail-wm1-f70.google.com with SMTP id v21-20020a05600c215500b002fa7eb53754so453772wml.4 for ; Thu, 09 Sep 2021 01:58:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=B/XpMR8IW7n50hqBRiVqU8UBvztjlF9h6rtat9Sfp/0=; b=tX8ciev3tTuXBiRAucB6SdN4T+qb0/xzpfsoMsqHGDKYEJUViAWABQyZA70f2ZXyNq G2MrJPLQQvyhU4XneGvkWjWJDk6+G2vyWzAmq2FykbEbbCZXe7ixbJx1B/iFEdliyukq /GGgl8EzGGfYg1b97gxTa2E9eHa2My5aQxxOmzNYw/YKYNq42/FOvJkn10I4Wr8Nc7qh 0K+0AV85zTJwB2sgaFI/aTpqXZZRKEmMr1oe+jDRHAqXMAcH5UvXMHZF+Ue3k8KJ+OMB mMACRaPuEAzLL7jX8v9+Qu3k/DTJhaEbFj/tjI2m4u27MevUvB2na49bfe0/vY7BwhCp 6thQ== X-Gm-Message-State: AOAM530gKJwkz1ggC9UEw1fXiJU59Rfp5AaiLuwP+PRN19V+QqOVuIwZ UObuy1a6MqduPDVce/G8WuB8kuPGTK0uBj0T8fga4mGALQcSboadA9A96NFgov3YO8e7zoxV+Hr aXVVIvlQK8CiISbisC8J5cUxn X-Received: by 2002:adf:e643:: with SMTP id b3mr2263871wrn.67.1631177931566; Thu, 09 Sep 2021 01:58:51 -0700 (PDT) X-Received: by 2002:adf:e643:: with SMTP id b3mr2263848wrn.67.1631177931410; Thu, 09 Sep 2021 01:58:51 -0700 (PDT) Received: from [192.168.3.132] (p4ff23fe4.dip0.t-ipconnect.de. [79.242.63.228]) by smtp.gmail.com with ESMTPSA id y1sm1029619wmq.43.2021.09.09.01.58.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Sep 2021 01:58:50 -0700 (PDT) Subject: Re: [RFC PATCH] fs/exec: Add the support for ELF program's NUMA replication To: Huang Shijie Cc: viro@zeniv.linux.org.uk, akpm@linux-foundation.org, jlayton@kernel.org, bfields@fieldses.org, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, song.bao.hua@hisilicon.com, patches@amperecomputing.com, zwang@amperecomputing.com References: <20210906161613.4249-1-shijie@os.amperecomputing.com> <2cb841ca-2a04-f088-cee2-6c020ecc9508@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: <1c115101-a549-0e88-7bbb-1b0a19621504@redhat.com> Date: Thu, 9 Sep 2021 10:58:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.09.21 11:46, Huang Shijie wrote: > On Mon, Sep 06, 2021 at 11:35:01AM +0200, David Hildenbrand wrote: >> On 06.09.21 18:16, Huang Shijie wrote: >>> This patch adds AT_NUMA_REPLICATION for execveat(). >>> >>> If this flag is set, the kernel will trigger COW(copy on write) >>> on the mmapped ELF binary. So the program will have a copied-page >>> on its NUMA node, even if the original page in page cache is >>> on other NUMA nodes. >> >> Am I missing something important or is this just absolutely not what we >> want? > > Please see the thread: > https://marc.info/?l=linux-kernel&m=163070220429222&w=2 > > Linus did not think it is a good choice to implement the "per-numa node page cache" That doesn't make this approach any better. I don't think we want this in the kernel. If user space wants to waste memory, it can happily mmap() however it wants. The advisory is to not do it. -- Thanks, David / dhildenb