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=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 36C9DC4727C for ; Wed, 30 Sep 2020 22:23:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4B1920719 for ; Wed, 30 Sep 2020 22:23:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="pB7B3hpb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731440AbgI3WXu (ORCPT ); Wed, 30 Sep 2020 18:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730958AbgI3WXu (ORCPT ); Wed, 30 Sep 2020 18:23:50 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B8F4C0613D0 for ; Wed, 30 Sep 2020 15:23:50 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id z13so4249190iom.8 for ; Wed, 30 Sep 2020 15:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=stcuGU/AmuexDn/xDJU4W3SgmvykF2WxUHKZBjdx8/Q=; b=pB7B3hpbwzKCM8OLwFLMu657QencM4uNHvjZw2pf8j8HF9GyE4GLREYAIWJI8nVhVZ sTBV8LBK6dZr6t9MG5fmrIsc1R9KeV50VjzoFfjzFrqjcGmXvbKFi+V6YpFWGkNfuZ+7 HYxsJT8/0LGMNo4ODcISOBKsB1tRFVeDKjWoOOo5GOv6HhDP8G41kzPTCmxNx9DBmURu kTQXB7BqeAoRY+/HIF7uDMajjEghf3uT9eSD3rB9AVQj3bvdrP/zKGRyhXKRhY6rKj4Z y+B3Ym97axaNjv4BO3MmGzmOKs2OrUf5OwCvGivIR4q2MNBWElHSj6n1M5Gwk4RhaRy4 9cOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=stcuGU/AmuexDn/xDJU4W3SgmvykF2WxUHKZBjdx8/Q=; b=e3EQzLCtA/M2Mu6Uozp+mf16stju9+bNmFX/q5cIsEdr9Z++5tWMzOBabnQ1c5QYK7 UcE31yyh4SsJx7acjr0zxs+5f4yleRZZMPpo4n5fhP/AQjmBtf59GaO/rr0mXYO3BUVR 7hdG9ZDQIqrzvsvcKW9X75EOAru8Z1xR/TjIXrxUWQLh715Iu1bvrY6s8ah62930mSum ceMrsZJcJmOBDnitUOuydrgke89O5hRO0iLg0V70yoDXX9OEAT/Z8/flFm8eS5DxaPmy lVS0wTcHkzzqs+otjaCLIDexGjrSd5o+Wa6MLxhLDTuW+L6xxz/YX6EOpvM/3n5fGTU4 C9Hg== X-Gm-Message-State: AOAM531Uwscsu8Uer2er7JBREGNJesGxjE1iPc1uvUY8MwEUbDoIvzoW JtjVZEXNPNf0eCU4vTT7BEB3PHKWj9V8i11l8h2Dkw== X-Google-Smtp-Source: ABdhPJw0s5dS3pBRaUkk/qRn8bsc/omxtWg+5h0+w6X5DYeRtzrIGMmq2LI5GLLwlzDTjlOJnkTCzRRbMIFCUkaybtY= X-Received: by 2002:a05:6638:f07:: with SMTP id h7mr3619834jas.25.1601504629460; Wed, 30 Sep 2020 15:23:49 -0700 (PDT) MIME-Version: 1.0 References: <20200925212302.3979661-1-bgardon@google.com> <20200925212302.3979661-21-bgardon@google.com> In-Reply-To: From: Ben Gardon Date: Wed, 30 Sep 2020 15:23:38 -0700 Message-ID: Subject: Re: [PATCH 20/22] kvm: mmu: NX largepage recovery for TDP MMU To: Paolo Bonzini Cc: LKML , kvm , Cannon Matthews , Peter Xu , Sean Christopherson , Peter Shier , Peter Feiner , Junaid Shahid , Jim Mattson , Yulei Zhang , Wanpeng Li , Vitaly Kuznetsov , Xiao Guangrong Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, Sep 25, 2020 at 6:15 PM Paolo Bonzini wrote: > > On 25/09/20 23:23, Ben Gardon wrote: > > + > > + if (!kvm->arch.tdp_mmu_enabled) > > + return err; > > + > > + err = kvm_vm_create_worker_thread(kvm, kvm_nx_lpage_recovery_worker, 1, > > + "kvm-nx-lpage-tdp-mmu-recovery", > > + &kvm->arch.nx_lpage_tdp_mmu_recovery_thread); > > Any reason to have two threads? > > Paolo At some point it felt cleaner. In this patch set NX reclaim is pretty similar between the "shadow MMU" and TDP MMU so they don't really need to be separate threads. >