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 X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50115C433F5 for ; Thu, 9 Sep 2021 08:58:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32FC361051 for ; Thu, 9 Sep 2021 08:58:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232165AbhIIJAF (ORCPT ); Thu, 9 Sep 2021 05:00:05 -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-Google-Smtp-Source: ABdhPJzHd9tbvGHuH/vI+YA9CIrNsSVEbwqy9yOD6TU2JuSw3sjsuiEtnZ1Wqc75iLPK+6kOv9kJ0Q== 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