Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp233662pxb; Tue, 31 Aug 2021 20:09:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1igITKJ6r7K3uPGEoWRHniSy15CT0TKnMGqBBlp3ivWiX+W0FzpdIq4kxdTL5zJ0z9zDE X-Received: by 2002:a05:6e02:805:: with SMTP id u5mr21879283ilm.223.1630465753725; Tue, 31 Aug 2021 20:09:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1630465753; cv=pass; d=google.com; s=arc-20160816; b=UVe6/WJeq9mP87WlNrjys59DKbOQij5Yo1IvVs2g5o+Os42IR49CgcvyJEpUsoojaq 8wJc+Nn/X0t9l2H7r+B9rL3upJ5I6xLjj+ZzI2d2Hx2REI6HHxhxxrpgZSFUc6EeZk78 B5uyMfPrOuZn8qAcE5xZ0V3N0dkw00lR2Tll8cswssGQ0f7YWinH+B3j2Tm2FlnLv+98 FhbIPkthJSe+0OiNQhRhwaavazGrcY1SwlT/kPAeLTEj5pJ9r0ztvUNj4RxKAWBwXdNY KR7WkYaWWEMXrmN4hJm8uz4su/xhH28E7Ee6rS7X0mvWSuLqyXMB6qxC8YBq+YItOHg7 VmQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :user-agent:date:message-id:cc:to:subject:from:dkim-signature; bh=vf7Goqqt+zoHwhfJBFspaJ3whsb8WqOYIs4e6d6Qj8I=; b=A6nCrtlNphYc2hccsjr3H10AgxjB5xssfAWRWMbcDFfLUGehvRaRDgHJpGnJ1URk1U 71s+5SvWuyfHKUmjUzs1ZILJc779IOqYyAmSLo5TtX4sVB/4D+j+rNiZJX7fNzPFok5r W9ehSmb3soCYqQX1r/hYnKIy2qwDKb5omGkYV63+XKQGKBBJc4lKg0LylHWEcseJgGXh x/6c8KVRhK5XGbnqMm6NIcK2xxmSwyhyVYnfQqmwYodKzNkWv74yGZChKv/wRTkpjdWA RiV3gq+GfznHaSXgR11s2kk0xTrdPSU4Vxd/HzFyNG2uo25TjyG6CuAm7aw2pzEVBAjp mhtg== ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@amperemail.onmicrosoft.com header.s=selector1-amperemail-onmicrosoft-com header.b=zdgXUKpo; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=amperemail.onmicrosoft.com dmarc=pass fromdomain=amperemail.onmicrosoft.com); 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si19394090jac.86.2021.08.31.20.09.01; Tue, 31 Aug 2021 20:09:13 -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=temperror (no key for signature) header.i=@amperemail.onmicrosoft.com header.s=selector1-amperemail-onmicrosoft-com header.b=zdgXUKpo; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=amperemail.onmicrosoft.com dmarc=pass fromdomain=amperemail.onmicrosoft.com); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231712AbhIADIu (ORCPT + 99 others); Tue, 31 Aug 2021 23:08:50 -0400 Received: from mail-bn8nam11on2129.outbound.protection.outlook.com ([40.107.236.129]:57344 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240843AbhIADIt (ORCPT ); Tue, 31 Aug 2021 23:08:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oVIT82nN5jQYZb5z+BRfFr1gIm0UQ4+oBfLnMiIi60zfL8Muym1PONXSTgVf1KNGCxKm4O/Tk/KagtXELGA2XdwME9DVaOZLGmjQO8cg3FBld5m1AtBFutPwYq3cyQCuxD3ZA2+tDUPKMKZa/XKP/Qc/Z6w+DbVQ7PBe5OkHCAOlakMqzPMjy3Xof36s8SPVagaDvoDbhzPMzFW4WH5x6RkeY7/x1BLRjkIPCF05K9sfLFLMawJo234oxPORm0vD/GsTZqIDcQ9epr8a+MtPQzuDx6DZrA4y5hMCO7jwkb8RPlCC5AEr/MCOBZ6uu9Rv2526dHAVO0uUR5qUnV8tvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vf7Goqqt+zoHwhfJBFspaJ3whsb8WqOYIs4e6d6Qj8I=; b=Zv7TOCxQjemP1LT+giQnrKbSTx+laUETJ9Isv8tZ03kLZ6sQFI3DSx3Qg6wu8y2/8Y629MNveVeRisr6D3krXNksrMED4/lMLFE/ZA+WWm0AANVfgt5CqpRa5fxDrAi2koeiW7HAAnk5O6VgPBT3QKc3l36n6MQOBNRpIRPl/b4UE9h78KxqYI3jUF9qKTdedjGkB470n6YT4RgzEn1mo/gQ/CaXwE9CrNZNaHziH4GInYBX6zt1/F7Op5LpYDlw/l0L+1a7XjaRe07qLly6kI9nmAVsOJLFJyZtawPCYTZeZPCZ/bsTpYhnBA1PPEwDsDn3m91fAZXtorn1c+TFTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=amperemail.onmicrosoft.com; dkim=pass header.d=amperemail.onmicrosoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amperemail.onmicrosoft.com; s=selector1-amperemail-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vf7Goqqt+zoHwhfJBFspaJ3whsb8WqOYIs4e6d6Qj8I=; b=zdgXUKpoeJOAdFpTKBgBr+e0SZhnHqwwucc4iHei71IfMk1qpBYotliZrQa1It4hA1GQZeASjVQiOG2V2+MC2imm/8ktt6TidxAymzQtWOxNQt3xNsyXn85/nQ4nsbVrnvx0tFcsS4/TPONKbjFzx4IpD9DLV4Dz/kaGXeCRl6c= Authentication-Results: amperecomputing.com; dkim=none (message not signed) header.d=none;amperecomputing.com; dmarc=none action=none header.from=amperemail.onmicrosoft.com; Received: from MWHPR0101MB3165.prod.exchangelabs.com (2603:10b6:301:2f::19) by MW4PR01MB6132.prod.exchangelabs.com (2603:10b6:303:7f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Wed, 1 Sep 2021 03:07:50 +0000 Received: from MWHPR0101MB3165.prod.exchangelabs.com ([fe80::ed89:1b21:10f4:ed56]) by MWHPR0101MB3165.prod.exchangelabs.com ([fe80::ed89:1b21:10f4:ed56%3]) with mapi id 15.20.4457.025; Wed, 1 Sep 2021 03:07:50 +0000 From: Shijie Huang Subject: Is it possible to implement the per-node page cache for programs/libraries? To: torvalds@linux-foundation.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, linux-mm@kvack.org, song.bao.hua@hisilicon.com Cc: linux-kernel@vger.kernel.org, Frank Wang Message-ID: Date: Wed, 1 Sep 2021 11:07:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: HK2PR02CA0170.apcprd02.prod.outlook.com (2603:1096:201:1f::30) To MWHPR0101MB3165.prod.exchangelabs.com (2603:10b6:301:2f::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.30.33.15] (180.167.209.74) by HK2PR02CA0170.apcprd02.prod.outlook.com (2603:1096:201:1f::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19 via Frontend Transport; Wed, 1 Sep 2021 03:07:48 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df315fab-8baf-4746-f198-08d96cf5ae7c X-MS-TrafficTypeDiagnostic: MW4PR01MB6132: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JyXwQvM9/bpr5eHQm+f0aMBd53ug3uH5NF4kBxJYwqhdTNJB2OR2rzx7vKajN2dpliT3hqu03LFCZLFH8yWumQxAv9F/fI1pKqd8qEQ8a72GAe6HSu/yT86q/uTOJyBfh6JB1U4mAWJZI5hlSGEy4IkUfgEU5HryXyyWfd6s6oWx70id7awWZHioG2eyBxBmyP5oL9oAjJ67lb5DtUqeVxYVBIDvOQ/L055JrtQubYbgLRZdsIay1E7pz48Ja4ax/gSv4zaitT0kAqMspbw5Z3PrBaz23REaItgcU4INp6gNVkhTKQmNeawr25yOUS1UD8GLRFEpPDAcYAvYMID+OZyvMffBoOB4YRsGJKbKG41mHxWqENGm57F+McQypmjAKU400ji27L0g6ajfjjn4Y6ESwG+ybqfC7MYlvn75nA4cMSQUNvM5gppKUe1sS6vPF3rg1v/4MaeaUNSuP/VuxuJmVdOqANg5Yf+JZFNf6G+pARHT5TqKOvMk0XmPLBZ8MwFJgxoq7YbK4siwKFs8w8Rx/p+RGjquDktorwFpG/Fkr59ygJgkxlbb1EIUYEjMLIUpuiytx0xHsWNVAnQdIo9cmSMYyZ5hwctTUk7tx0N9WTNuw9aG/FXCTbW47GGWGesj2Ij4nrQSuwOWLSiBsQF6odaPsmBnbOYJphVBten6iwuF/dzcAk+jkxgAXzpSW5gbNo9eEYmathPIQeZD6JlJ0FKVuSV0ilDXQKg6ViESXI1cqgSKpMwugBYOb4n8jztuOBFuNbuefOjnmQR4oQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR0101MB3165.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(31696002)(6486002)(26005)(42882007)(83380400001)(5660300002)(83170400001)(186003)(66946007)(4744005)(316002)(16576012)(38350700002)(508600001)(38100700002)(66556008)(66476007)(8676002)(956004)(6666004)(2906002)(31686004)(107886003)(52116002)(2616005)(8936002)(4326008)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dXNqcTc1ci84YmRIYjh1SVZSbUlQYWNDQ3ppZTNuN0lMNEJmQzE4NVh6V3dZ?= =?utf-8?B?dXRSSHJ4SndiLytwdlh3cm80TWxycHcxZW5lRUhjWGNHVXVsTVFEMnVkYzhu?= =?utf-8?B?WW5OYzBiK2kxNmFWYjZuNEYxZXRDbnJsMCtVV3ZYTXNLQmFsMnp1U2wzM2RT?= =?utf-8?B?NFJFV2xQSkVuL1A0VlNmdFF1V0hSNkJ4ZVJ6d20wci91T3FQak9iNzhDK2Ix?= =?utf-8?B?Z3lDUjlBdU5BSGowNG9TeGhMZGtLMC9BS0hWaXFJcXh0MUFNQXp1ZjlQaFZP?= =?utf-8?B?czR1L1Ayek9PNEg2N3dvTk0yT1drdFFRUlMwV3liUHdQSHU2d05sUzlGN2xw?= =?utf-8?B?TXZuTS9rdEtKQ2dJbkRFTXZwM0tMTDFjVGdEUjJ4VUJXa24rVjVjN0hHLzcv?= =?utf-8?B?SXlpU3c3SEZHR3RoMlRsZCtTV0Q0TGtPSmM0eXkya0pnejViV1RoODYxRGQ0?= =?utf-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KYkF0?= =?utf-8?B?c3BzSWRZdlNQSjN1SW45Qk1uTEdDTnV6SkFONzhGNVJFN09TZXlKUExWb3Ja?= =?utf-8?B?aUl2ZS83eTllMVVrM0hJUnc1ZnNsWklPNklrQTNpWmVHMy8vUG9SZVdzWnI0?= =?utf-8?B?WjlVNTlMdldjQWFmUitOUFNwRXg0QUdtVUVEZm5icm5tNGlCN1RyWkFHSk8w?= =?utf-8?B?c2prejFKU3lxOW9oTDRXNCtQalVhVVB6SzB5RHZnbHZVMk5aMWxvMnN1UDk0?= =?utf-8?B?NkkxVXFXWjE0TU4wM0hxSjkvWFR6MkhhZVVJWHpCOVJSZTVSV21CMDhWMWRB?= =?utf-8?B?VmR5dk1TcVFEL3c3UUVwbzgzN0I3NmkrWU4xMEdkTXJyR2pQQzVYbkRRalk4?= =?utf-8?Q?bdoQrc2WKft8NQSCpsDkGa84wEqFQUuPMjfWamq?= X-OriginatorOrg: amperemail.onmicrosoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: df315fab-8baf-4746-f198-08d96cf5ae7c X-MS-Exchange-CrossTenant-AuthSource: MWHPR0101MB3165.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2021 03:07:50.2945 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sSnx1+1k7QJh+EK0FMGJo/1Oml5F0qMuBrFG9NxiTQBVTMoQVI1mNToIg56IX5jUG5kYI3SLYoYuLK0B/oSrDraW/oOwlFJzD4s4x7q1IJVX88FC2pgq3SJCQUPd3nZI X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR01MB6132 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Everyone,     In the NUMA, we only have one page cache for each file. For the program/shared libraries, the remote-access delays longer then the  local-access. So, is it possible to implement the per-node page cache for programs/libraries?    We can do it like this:         1.) Add a new system call to control specific files to NUMA-aware, such as:                    set_numa_aware("/usr/lib/libc.so", enable);             After the system call, the page cache of libc.so has the flags "NUMA_ENABLED"         2.) When A new process tries to setup the MMU page table for libc.so, it will check              if NUMA_ENABLED is set. If it set, the kernel will give a page which is bind to the process's NUMA node.              By this way, we can eliminate the remote-access for programs/shared library. Is this proposal ok?  Or do you have a better idea? Thanks Huang Shijie