Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1873343rwb; Thu, 8 Dec 2022 16:50:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf6vyBrA6VEDNfsoo6s+y/VFLv6JaRz20af+3TobSuWbtCX9+G+KuIXHKz8UYsenfP++6DCC X-Received: by 2002:a05:6a20:659e:b0:9d:efbe:2062 with SMTP id p30-20020a056a20659e00b0009defbe2062mr5067623pzh.24.1670547049322; Thu, 08 Dec 2022 16:50:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670547049; cv=none; d=google.com; s=arc-20160816; b=IQxWhUmTf3HiTu4eHapw2Fk55tcsrQD4wLt4wct6ye4mdwifdhsAb8Zg9TPqJBgFK+ 1gqR4/g4e1s00uSD9zNWfkwAEcECKAr6VMuEwxcQ3/QSQr9r1Jf7+YctY07LWHOSmUci N9qVoOBV7wgRovQr3KXBcJlcPJPm718xZSpwDt+eMyEPYvFCUq9B/St38MQh7H9gr8rB +MCreAeEM6wr2lxrpmUsER9i11yyTvblZTPDIpA+OC7+nz/1K7f5pg24QkC2A9ZLNGFq t/WfdcDEilNdoUi2oOBtobagU2+2nUdav+jVg6EnRmbrfoJ2V6UH8dWg2b7eyhiz5D+v zo/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fxo/Qa2g2l5VwByXQSAcUiX+7JZ8E7yRjzkXLItllwk=; b=rkr4/+p9QhGNmavdsTtR9BBf3CJ3rcwzyvIey0VGLx03aQJAO/5Yi1oh6GlTVXZRzV coPrlcgoCgWMcpDkgzR7LKrS9Yzg6Bq1QJXu/th1wyQKIKpmwzJe2c8CDUJdiohQzAAw bXmv+QVFGvwguza3RLrr4XtDu8ijLEgyQJalEsqemiRLw9dOq9DUenSZzpvD2XOzawhk PPz1Jo30fcmbKd74H9n3qjenznsirvvT8794k9fiqXDQpd7S3KgVNKdL4kMIggL6GH5D PcEGIwo0AJybhpobJru3H1uo3pXQKAh6wCmyKTk1T6vgWVSeTWRPcpQeWT/dWX3jYdlo PT0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qKjtkIGo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a63360a000000b00457f4e8e21esi5763pga.731.2022.12.08.16.50.39; Thu, 08 Dec 2022 16:50:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qKjtkIGo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229678AbiLIAVY (ORCPT + 73 others); Thu, 8 Dec 2022 19:21:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbiLIAVW (ORCPT ); Thu, 8 Dec 2022 19:21:22 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E51092305 for ; Thu, 8 Dec 2022 16:21:21 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id s196so2482655pgs.3 for ; Thu, 08 Dec 2022 16:21:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fxo/Qa2g2l5VwByXQSAcUiX+7JZ8E7yRjzkXLItllwk=; b=qKjtkIGolnxH4WQLk5BeM6RGyuoRDEz1A5QgTyVPsR8QSZFl27gYnjBlvXDkAHSyOW MZx2qfFtLT5e6aTghd4D4gmW9bu4t6a+LFmw9TFol6K3x7RNjy7Aji2UTGul7jwIHz3n +PaZjIntMEGywi09J51pTA3N8FuaiT9KVh3L3OBRvMDNSq2q7Y7k7I6GiCH8A/CcG4ta /GonOItmYjyNbpzRPeCl3MwDufk9IkaDhFJ+QF+3AWT11lhtinv4uJGpMSLiZQiYMwUU 0uO3LXJpHil3u2bxOmoTR7zLRqlVddn9Mh2Ja6hMiMwpxu9SWFKem7EsuywtvfIOEmGA 05Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fxo/Qa2g2l5VwByXQSAcUiX+7JZ8E7yRjzkXLItllwk=; b=i05n0zlI5zQ0un55G/K9NzBolOKzsrargv6Lkvi875USoWzLeWI4etlN8faM/g3KNF eSgXOviVzSUCDIeOvZ3RFPFZjCwEk+JFcMU5rtlPwNC00nfGyFk+cwMm8eh5+nTRHIXy UvMZK7lTB+Jj7ufchnXBAI4C1jnj65aaVoc+2pNcU8ekBPL+uvVuQ3O5AFUKh60hbMIQ 570NPE/BNhWtxyNp6+/WD9tNkBkj676QYEakFiB50O+7bNIfKdZNPsufIgek0JACBUbT 1cIDqVkyZbDCVe0I665HQSKWxfW0ebnz2xMOlFraobl2cICMF3mVfhmdveUDczFD/K24 HNjw== X-Gm-Message-State: ANoB5pnzuMuLxTb7e1yJriBWMbVuPs7PjsW/J4iwfA6enD/jHCHOV/A3 Q/SXqzL+a8/PzXQ3Ff1vPjwzkA== X-Received: by 2002:aa7:8656:0:b0:577:509d:df80 with SMTP id a22-20020aa78656000000b00577509ddf80mr4159355pfo.24.1670545280691; Thu, 08 Dec 2022 16:21:20 -0800 (PST) Received: from google.com (223.103.125.34.bc.googleusercontent.com. [34.125.103.223]) by smtp.gmail.com with ESMTPSA id h12-20020a056a00000c00b00575ecd1d301sm68162pfk.177.2022.12.08.16.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 16:21:20 -0800 (PST) Date: Thu, 8 Dec 2022 16:21:15 -0800 From: David Matlack To: Vipin Sharma Cc: bgardon@google.com, seanjc@google.com, pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Patch v2 0/2] NUMA aware page table allocation Message-ID: References: <20221201195718.1409782-1-vipinsh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221201195718.1409782-1-vipinsh@google.com> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 01, 2022 at 11:57:16AM -0800, Vipin Sharma wrote: > Hi, > > This series improves page table accesses by allocating page tables on > the same NUMA node where underlying physical page is present. > > Currently page tables are allocated during page faults and page splits. > In both instances page table location will depend on the current thread > mempolicy. This can create suboptimal placement of page tables on NUMA > node, for example, thread doing eager page split is on different NUMA > node compared to page it is splitting. > > Reviewers please provide suggestion to the following: > > 1. Module parameter is true by default, which means this feature will > be enabled by default. Is this okay or should I set it to false? > > 2. I haven't reduced KVM_ARCH_NR_OBJS_PER_MEMORY_CACHE considering that > it might not be too much of an impact as only online nodes are filled > during topup phase and in many cases some of these nodes will never > be refilled again. Please let me know if you want this to be > reduced. > > 3. I have tried to keep everything in x86/mmu except for some changes in > virt/kvm/kvm_main.c. I used __weak function so that only x86/mmu will > see the change, other arch nothing will change. I hope this is the > right approach. > > 4. I am not sure what is the right way to split patch 2. If you think > this is too big for a patch please let me know what would you prefer. I agree it's too big. The split_shadow_page_cache changes can easily be split into a separate commit.