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=-13.2 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,URIBL_BLOCKED,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 8ADDFC433EF for ; Thu, 9 Sep 2021 20:28:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 725906113A for ; Thu, 9 Sep 2021 20:28:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345390AbhIIU30 (ORCPT ); Thu, 9 Sep 2021 16:29:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345211AbhIIU3Y (ORCPT ); Thu, 9 Sep 2021 16:29:24 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2869AC061575 for ; Thu, 9 Sep 2021 13:28:15 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id j2so1862737pll.1 for ; Thu, 09 Sep 2021 13:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KkIQUN6UVWVDGVs7gQUvenivKjOnMibWM6lN26FSefU=; b=FVbJMuxsPdMboW3fGRpeknq9uQRgiNFYMkfTDCp+yIJU/r8SnfixFRLOMHCuS02TXV RwGohEECz7j1XeRtYg7gQzlcG+vLV6rsHNncc7O4uYVacKrMziWXHeyXi3ToHSI5Krci dAtD/keu37A2un94zex2UJJKhbPBH+ZA+1B3gpOkZmfN9W4RivrlV4R9/tQ/9cnZUrgu RzQYH2dMHu7mQiJ40p9ZTab+fVOUV0+TFBglNS4NUUQKTHkf9HLIB/mCNlTcORWAPzSS K/4cGRMB01MOZSLT6KTLNPsQp2b002EpBhgBufLFsJW1FvkHgofIBfja7U+61OoYFw47 vXng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KkIQUN6UVWVDGVs7gQUvenivKjOnMibWM6lN26FSefU=; b=AnXWVcxX/YpkuQiAqa5qkcT5+UCNMJyQQuHdXko4ynbvPyVtYqaTDaPNp7N54KnQgV jm8IEc1RXFsPW/REkBVq1jzQxDGT5T5lkscd4Sls9v8iVtP9wn/f+4feSAZWVRYgCR9C DOd09u3GaVwBHhwnVjRSpbJTmZPe95KfkJCjkXvc2Y1slkOmi0qE0FsRzrhkmhvEG9kP 3qaMdZbkzOWLdzx1P8DL0DKgOl8oQHRWw4dmZH9UoJLLBzAYGi/mc6QQshyqUFrkX+sP eQUzfo2JuMW/Zyz7UrMf5zstKsv7pBR4J+hFc724Vr/SmhpD8ta4DqSUbyfx3BPe2VSP MBCg== X-Gm-Message-State: AOAM532EV8vx5/2iynEyn05fK2WjkfnBjGd/NTHjjId87tMaxY+oABvR KpTvl1+FKPXtaG3GaduCy4Cqww== X-Google-Smtp-Source: ABdhPJyAc4CRr9tF0y4feLojYbdHTKlOemQgA2iiZMpEO+mvtfr+51OjqPfvtnvGWSxrmgXGK89LBw== X-Received: by 2002:a17:90a:428e:: with SMTP id p14mr5632154pjg.92.1631219294432; Thu, 09 Sep 2021 13:28:14 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id b4sm3124696pga.69.2021.09.09.13.28.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 13:28:14 -0700 (PDT) Date: Thu, 9 Sep 2021 20:28:10 +0000 From: Sean Christopherson To: Marc Zyngier Cc: Juergen Gross , kvm@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ehabkost@redhat.com, James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH v2 5/6] kvm: allocate vcpu pointer array separately Message-ID: References: <20210903130808.30142-1-jgross@suse.com> <20210903130808.30142-6-jgross@suse.com> <871r65wwk7.wl-maz@kernel.org> <37699e98-9a47-732d-8522-daa90f35c52f@suse.com> <87eea2c9zu.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87eea2c9zu.wl-maz@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 06, 2021, Marc Zyngier wrote: > On Mon, 06 Sep 2021 05:33:35 +0100, > Juergen Gross wrote: > > > > On 03.09.21 16:41, Marc Zyngier wrote: > > > > > At this stage, I really wonder why we are not using an xarray instead. > > > > > > I wrote this [1] a while ago, and nothing caught fire. It was also a > > > net deletion of code... > > > > Indeed, I'd prefer that solution! > > > > Are you fine with me swapping my patch with yours in the series? > > Of course, feel free to grab the whole series. You'll probably need > the initial patches to set the scene for this. On their own, they are > a nice cleanup, and I trust you can write a decent commit message for > the three patches affecting mips/s390/x86. It would also be a good idea to convert kvm_for_each_vcpu() to use xa_for_each(), I assume that's more performant than 2x atomic_read() + xa_load(). Unless I'm misreading the code, xa_for_each() is guaranteed to iterate in ascending index order, i.e. preserves the current vcpu0..vcpuN iteration order. 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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 1B1D3C433EF for ; Thu, 9 Sep 2021 20:30:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D9A976054F for ; Thu, 9 Sep 2021 20:30:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D9A976054F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Fl5msr4qoAZSZ4csts3+6uegjEzZaHp5AnzoNJjz7B8=; b=TNNgXQnH+Bwer6 qrB2LJPYJbT1gipzzH7rWHjTQYdS8a1FODULQiOL0Qj4ywO0QzeHVWyNRHgJL6ekFveNfz5JTmcf3 N3Gs6Jlvn/3XJvllJMVsjiN7gxy0N4k1bN/ZBVICieV/e9q7fOrsfs+D2lWTcuk57HpKroi97KAZL UYomICZ3xbMfM33F7x3PAgSyTseF5jw59hVbe2vDbMjdikYAggR+a7cb8rnUetDxeWPPio4dF4QrI eIa9g+oA23PlpKxAQsoOy66BY0cKC2VWXiiaupmeKBjXwfP3bhfbzuT7Osu5grMyotcYsWXA3YFWH B+PfMP6pZDoLpOLUYZaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOQek-00ApKU-5F; Thu, 09 Sep 2021 20:28:22 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOQeg-00ApJ5-EM for linux-arm-kernel@lists.infradead.org; Thu, 09 Sep 2021 20:28:19 +0000 Received: by mail-pl1-x636.google.com with SMTP id q3so1854942plx.4 for ; Thu, 09 Sep 2021 13:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KkIQUN6UVWVDGVs7gQUvenivKjOnMibWM6lN26FSefU=; b=FVbJMuxsPdMboW3fGRpeknq9uQRgiNFYMkfTDCp+yIJU/r8SnfixFRLOMHCuS02TXV RwGohEECz7j1XeRtYg7gQzlcG+vLV6rsHNncc7O4uYVacKrMziWXHeyXi3ToHSI5Krci dAtD/keu37A2un94zex2UJJKhbPBH+ZA+1B3gpOkZmfN9W4RivrlV4R9/tQ/9cnZUrgu RzQYH2dMHu7mQiJ40p9ZTab+fVOUV0+TFBglNS4NUUQKTHkf9HLIB/mCNlTcORWAPzSS K/4cGRMB01MOZSLT6KTLNPsQp2b002EpBhgBufLFsJW1FvkHgofIBfja7U+61OoYFw47 vXng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KkIQUN6UVWVDGVs7gQUvenivKjOnMibWM6lN26FSefU=; b=oHJYuO5iOU2VqKSd8En4dlrDC88ZMU8P2++HkIcIQtm4BYwso8msnKQ85PTxbPm1aR lCDK6MiDHH8gt0O1LLtPJWE6+tGo4aBswhI53VogMn616awNLEYKyl5KCihoBlCrW1HD eB42afi4DJLDNgDeUU//JD2KfzNZAwbf7nVAv7wwGdllGuAKXFj2sAdMDufYacAu+kXq iNb7oDA1hHYq0uPaEt0clLVsoVrVJXx1miHOrrRqWzEilq8oYQZS6k5NssTMdQUv8bu3 wj8ubZlWQ+FjEEorbELnoC9RqfOr5Sfn5iQLcyZeF/MsmECV0fk4Mt7PPfKlMBIL16uO AmcA== X-Gm-Message-State: AOAM5318ymEZQm9i6Tn/5CFYRrNP78w2KGJEhejMMC639mSwPeSkHV1z EbxSvAYC3cpaeqVZ32aI8Jxs4Q== X-Google-Smtp-Source: ABdhPJyAc4CRr9tF0y4feLojYbdHTKlOemQgA2iiZMpEO+mvtfr+51OjqPfvtnvGWSxrmgXGK89LBw== X-Received: by 2002:a17:90a:428e:: with SMTP id p14mr5632154pjg.92.1631219294432; Thu, 09 Sep 2021 13:28:14 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id b4sm3124696pga.69.2021.09.09.13.28.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 13:28:14 -0700 (PDT) Date: Thu, 9 Sep 2021 20:28:10 +0000 From: Sean Christopherson To: Marc Zyngier Cc: Juergen Gross , kvm@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ehabkost@redhat.com, James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH v2 5/6] kvm: allocate vcpu pointer array separately Message-ID: References: <20210903130808.30142-1-jgross@suse.com> <20210903130808.30142-6-jgross@suse.com> <871r65wwk7.wl-maz@kernel.org> <37699e98-9a47-732d-8522-daa90f35c52f@suse.com> <87eea2c9zu.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87eea2c9zu.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210909_132818_514690_5A0AF6D3 X-CRM114-Status: GOOD ( 18.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 06, 2021, Marc Zyngier wrote: > On Mon, 06 Sep 2021 05:33:35 +0100, > Juergen Gross wrote: > > > > On 03.09.21 16:41, Marc Zyngier wrote: > > > > > At this stage, I really wonder why we are not using an xarray instead. > > > > > > I wrote this [1] a while ago, and nothing caught fire. It was also a > > > net deletion of code... > > > > Indeed, I'd prefer that solution! > > > > Are you fine with me swapping my patch with yours in the series? > > Of course, feel free to grab the whole series. You'll probably need > the initial patches to set the scene for this. On their own, they are > a nice cleanup, and I trust you can write a decent commit message for > the three patches affecting mips/s390/x86. It would also be a good idea to convert kvm_for_each_vcpu() to use xa_for_each(), I assume that's more performant than 2x atomic_read() + xa_load(). Unless I'm misreading the code, xa_for_each() is guaranteed to iterate in ascending index order, i.e. preserves the current vcpu0..vcpuN iteration order. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 C060AC433FE for ; Sun, 12 Sep 2021 16:33:09 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 49D3F61076 for ; Sun, 12 Sep 2021 16:33:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 49D3F61076 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D4C0E4B1B2; Sun, 12 Sep 2021 12:33:08 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HKuUdp3733I3; Sun, 12 Sep 2021 12:33:07 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9CFD54B1FC; Sun, 12 Sep 2021 12:33:06 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 77F294B163 for ; Thu, 9 Sep 2021 16:28:16 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JyVz4-T+y6ev for ; Thu, 9 Sep 2021 16:28:15 -0400 (EDT) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 6B5D34B152 for ; Thu, 9 Sep 2021 16:28:15 -0400 (EDT) Received: by mail-pl1-f175.google.com with SMTP id 5so746047plo.5 for ; Thu, 09 Sep 2021 13:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KkIQUN6UVWVDGVs7gQUvenivKjOnMibWM6lN26FSefU=; b=FVbJMuxsPdMboW3fGRpeknq9uQRgiNFYMkfTDCp+yIJU/r8SnfixFRLOMHCuS02TXV RwGohEECz7j1XeRtYg7gQzlcG+vLV6rsHNncc7O4uYVacKrMziWXHeyXi3ToHSI5Krci dAtD/keu37A2un94zex2UJJKhbPBH+ZA+1B3gpOkZmfN9W4RivrlV4R9/tQ/9cnZUrgu RzQYH2dMHu7mQiJ40p9ZTab+fVOUV0+TFBglNS4NUUQKTHkf9HLIB/mCNlTcORWAPzSS K/4cGRMB01MOZSLT6KTLNPsQp2b002EpBhgBufLFsJW1FvkHgofIBfja7U+61OoYFw47 vXng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KkIQUN6UVWVDGVs7gQUvenivKjOnMibWM6lN26FSefU=; b=ZJ9wJoF8bGpqvpHjv442lAhLXaRpbtw3MstQu/pma/e9ASvCiD4dnDNAxzi4+yp0De qxtMjuxkg6h+toxZTN1l0zLFFj6E+YoACIAn3BwfRw9wdi7sJ5ZouGcnMNCAVfWdCA9s 3acnjEHdVL8VVUHPMrwcl1f6tCArik0MbdojkjpS/Zbbvpa1CcVn9qMzlpfEVsTSphXG igKoNntpiTqSIJ7c7RtQaDO8qc1atgV1VGbkr4pobTNKBX70IB0JNnqrtfGlCrDvusx9 3+rRNtdpmqRvLR9SynL1w0CBXlHmrVBNWJpIw4CZZx9Wh0psjzYl/FnO3q8c9nOd3LDk vJ/Q== X-Gm-Message-State: AOAM532jjw9Eg3wCl1geCK1XsaeqYfqtdldNzaj+pRylCqf5ifsUQKYi SHeJKJ7PUduzs82HgDxSCETNTQ== X-Google-Smtp-Source: ABdhPJyAc4CRr9tF0y4feLojYbdHTKlOemQgA2iiZMpEO+mvtfr+51OjqPfvtnvGWSxrmgXGK89LBw== X-Received: by 2002:a17:90a:428e:: with SMTP id p14mr5632154pjg.92.1631219294432; Thu, 09 Sep 2021 13:28:14 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id b4sm3124696pga.69.2021.09.09.13.28.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 13:28:14 -0700 (PDT) Date: Thu, 9 Sep 2021 20:28:10 +0000 From: Sean Christopherson To: Marc Zyngier Subject: Re: [PATCH v2 5/6] kvm: allocate vcpu pointer array separately Message-ID: References: <20210903130808.30142-1-jgross@suse.com> <20210903130808.30142-6-jgross@suse.com> <871r65wwk7.wl-maz@kernel.org> <37699e98-9a47-732d-8522-daa90f35c52f@suse.com> <87eea2c9zu.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87eea2c9zu.wl-maz@kernel.org> X-Mailman-Approved-At: Sun, 12 Sep 2021 12:33:05 -0400 Cc: Juergen Gross , Wanpeng Li , ehabkost@redhat.com, kvm@vger.kernel.org, Catalin Marinas , Joerg Roedel , x86@kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Will Deacon , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Paolo Bonzini , Vitaly Kuznetsov , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Jim Mattson X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Mon, Sep 06, 2021, Marc Zyngier wrote: > On Mon, 06 Sep 2021 05:33:35 +0100, > Juergen Gross wrote: > > > > On 03.09.21 16:41, Marc Zyngier wrote: > > > > > At this stage, I really wonder why we are not using an xarray instead. > > > > > > I wrote this [1] a while ago, and nothing caught fire. It was also a > > > net deletion of code... > > > > Indeed, I'd prefer that solution! > > > > Are you fine with me swapping my patch with yours in the series? > > Of course, feel free to grab the whole series. You'll probably need > the initial patches to set the scene for this. On their own, they are > a nice cleanup, and I trust you can write a decent commit message for > the three patches affecting mips/s390/x86. It would also be a good idea to convert kvm_for_each_vcpu() to use xa_for_each(), I assume that's more performant than 2x atomic_read() + xa_load(). Unless I'm misreading the code, xa_for_each() is guaranteed to iterate in ascending index order, i.e. preserves the current vcpu0..vcpuN iteration order. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm