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=ham 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 62210C433EF for ; Thu, 9 Sep 2021 08:58:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1B80A610A3 for ; Thu, 9 Sep 2021 08:58:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1B80A610A3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id A09AF6B0071; Thu, 9 Sep 2021 04:58:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 992CF6B0072; Thu, 9 Sep 2021 04:58:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8334E900002; Thu, 9 Sep 2021 04:58:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0020.hostedemail.com [216.40.44.20]) by kanga.kvack.org (Postfix) with ESMTP id 6D05B6B0071 for ; Thu, 9 Sep 2021 04:58:57 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1ACDF1801D22D for ; Thu, 9 Sep 2021 08:58:57 +0000 (UTC) X-FDA: 78567435114.08.3D7EB1A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf23.hostedemail.com (Postfix) with ESMTP id A51AF90000A5 for ; Thu, 9 Sep 2021 08:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631177935; 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=MgXa3E9KheAJIvA/85tXBY8ME6oQysDtuNcCfpSaY4wGpGYYKtWZ0N2+vIDWDoDEd/OVKI 41rgpELDGNYQ2Kvm2d1jjhdHdGXSyiPyBRmz7qcRM8mjhPWYpZqi4izmnlxDNTpLXgW6cz PM9satdVko7WsbEINCqjwwdD1mpS9ao= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-7AssUkDDM665MGwMYWO51A-1; Thu, 09 Sep 2021 04:58:52 -0400 X-MC-Unique: 7AssUkDDM665MGwMYWO51A-1 Received: by mail-wr1-f72.google.com with SMTP id v6-20020adfe4c6000000b001574f9d8336so284449wrm.15 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=TJTxM4SakqOjIeMlL2oR4bQR1tdybdMek3UaR6pQg56EVUccH7/s6yYBHa3oTv3CX9 TNvnzK1W76XpXoCliZBFNR3iLJmJHPZn6VY4YDFWRxdr0C3fKhRv0eeUMESlpTeSCJ3h OSdbp1i8zfl2erj1mQQ8/OUW+ueR04lCkU3v5CoI2zTJkMJD9FYvpD3TSSBBBegj5yUe ZAQepp8LSKIzlVzErILsfROb6RQGLZa+YyBJ9llAr3CoVZWZqMyeIFa2r3G/izLGj/WD kMQwItds8xoG93u2uJWoXl/DQATVGvLHN/e6ysMic/SUwUDGkl4kH6Ispte+LFfKTDxc 3Edg== X-Gm-Message-State: AOAM533KDMv9q7hbt8D9z9wMff60yqr45iFrV6aFxA3oiOAXPjZL3u4g HuYt3LTij08rox/xV4ht+GQtSj0xWAP14idBwMOfNxofYgFyWcXr23wilex6GhdYKB0z2UJ+Dr8 ZF6xyZxobu74= X-Received: by 2002:adf:e643:: with SMTP id b3mr2263863wrn.67.1631177931564; 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: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: A51AF90000A5 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=MgXa3E9K; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf23.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com X-Stat-Signature: b38395fybzx1oriruhzhea3y7gyop57g X-HE-Tag: 1631177936-525033 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 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