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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62CECC38A02 for ; Fri, 28 Oct 2022 17:37:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbiJ1Rhp (ORCPT ); Fri, 28 Oct 2022 13:37:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiJ1Rhm (ORCPT ); Fri, 28 Oct 2022 13:37:42 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 063C620354A for ; Fri, 28 Oct 2022 10:37:42 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id bk15so7497170wrb.13 for ; Fri, 28 Oct 2022 10:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kV7MmgRICexqZDA6XAEcNOU0nOiN/bt/4yb0+BmfSag=; b=n0HXNyNNgb8L2VChFAUYfXPFicNplKItk5SACKHVuPWpeT4s/6BeK3eYhhaFMWNDIK /4hDz0w3cTw8aQBYvZ7SeVvKWCCwQeheBJlYpxWmZ/aREopPexhUqtNL9L/9NKK/uZHF jC9QPVgWZymcb3YFZA+OyIes9I/31C02aCUph7DLSx4rpejEQqVA65y+cjTOxD/Y8hNQ gfPsxxOp+JNDvvy1I7jUSNyfrltalszW+OvXbddPUzU8C4QtfT+tCbLS3GpWvd00svJs PsM3YgXA8es/JfPgYj8HeUXMr3WcDEnaEnUHj0SH9OtU+/3hJa5IwzWotVyzA0p0ATlG 90OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kV7MmgRICexqZDA6XAEcNOU0nOiN/bt/4yb0+BmfSag=; b=TpMqxfOkr9x80uz4H9MC1HNmuRPXyYlXZ/qnohcZ74vSPz24syMybCrMpK/MGk6ZsU US7ZVbiu5W3owP0AZrTKeQ/71iMhN9pX+cE86c5ncvDYm3ixvEqUoCzZXtRdIj2EZCTC mVEmqkjQ2BOgIH13GgEYeLdDZ0t1X9xXFtjb+OY86BLSKXwtyE33M8zKnGsq6WYkvSbR maiDxvqTcfRaaoAfZysmaJWCHswgriQ9PJ4sZl7g8CbygXyTHb2FINMgnm0fSq3/Uytr ptVo4yRI3/OL3qhdDffrzGJyx0fXXiSirEel+TBm4prC8XpqH+49WeAGsIlWhSD+kmF4 KfMA== X-Gm-Message-State: ACrzQf0hIFiGzSW8ALb8La0GTXB1KBOZoeon1OFXezcRF1XHftkf9oCs kuaJnhqr9+WpA/74XXKu0oss9u9ztfEsaZlGzS+Pfw== X-Google-Smtp-Source: AMsMyM6r0OZ72MOueBEdYgdzX8Jy3UmVthkJtTnrV3tLfySk6NlYuJkc172vH7YxWl/wqUyzSmDPGIwADJL4tpgeGiU= X-Received: by 2002:adf:e94a:0:b0:236:6f5a:e89b with SMTP id m10-20020adfe94a000000b002366f5ae89bmr282460wrn.451.1666978660361; Fri, 28 Oct 2022 10:37:40 -0700 (PDT) MIME-Version: 1.0 References: <20221021211816.1525201-1-vipinsh@google.com> <20221021211816.1525201-6-vipinsh@google.com> In-Reply-To: From: Vipin Sharma Date: Fri, 28 Oct 2022 10:37:04 -0700 Message-ID: Subject: Re: [PATCH v6 5/5] KVM: selftests: Allowing running dirty_log_perf_test on specific CPUs To: "Wang, Wei W" Cc: "Christopherson,, Sean" , "pbonzini@redhat.com" , "dmatlack@google.com" , "andrew.jones@linux.dev" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 27, 2022 at 7:11 PM Wang, Wei W wrote: > > On Friday, October 28, 2022 4:03 AM, Vipin Sharma wrote: > > pthread_create() will internally call sched_setaffinity() syscall after creation of a > > thread on a random CPU. So, from the performance side there is not much > > difference between the two approaches. > > The main difference I see is that the vcpu could be created on one NUMA node by > default initially and then gets pinned to another NUMA node. > pthread_create(..., &attr,...) calls clone and then sched_setaffinity(). This is not different than calling pthread_create(...,NULL,...) and then explicitly calling sched_setaffinity() by a user. vCPU creation on one NUMA node and then getting pinned to another NUMA node is equally probable in both approaches.