Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6661393rwd; Mon, 19 Jun 2023 10:16:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7MoYvt7TYf9sGBZ+4RFujjGtOqOyFg5/9oTUaB6aZs5K3Fz9o1ShcLKyUhv2QxZcWGg42/ X-Received: by 2002:a05:6a00:b48:b0:668:921f:15b6 with SMTP id p8-20020a056a000b4800b00668921f15b6mr963123pfo.6.1687195012619; Mon, 19 Jun 2023 10:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687195012; cv=none; d=google.com; s=arc-20160816; b=t2PXCXJYHI/LnEUttB/lBcw1lEOV6Ry8nAIzdtF383RziRRpwd5iAwyJhtYMMKpqJd g/Kgs0Hj/nH4oo5xVq6GblLJ/E87SNaC6HewEONFsFnnlKpTKKyp4lVA0uwOFOhdPGb4 fUGAIPqlYakqX9D9HCHz9OYSRPHKAmBiSMTbQqOqOxU2aNiepLi6Ktq0/9cUM1FYm3Gd GF96ygom/aESDaxvw3WHN3QQTyw7rbmqMO1zcNKa0v74wU4BT1SDdGLagrD/zvfBNm9G ZJaHSPyrORkl5jA8G5YZA00nyYEw2myQRNm7eDxwiexWETvkdueIis6MUcuc0jXtIqCg txPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=cSjLhKAkEVmr9MYwtf9eP9pfk3HW3uaYe68MnVI4gb4=; b=jwOSm9dQjsPTjf9nrE+r2Bs/3zmTjfsVW8D2SuYAhCOOlJK5kNbzn8vFvbI3sCODkv cRl0q9sDY0/rm5TEJRy5z+HJVGJhE+mAtPh/FwAhp3QavlRUQ0WTBK7lMjg/l84PjnOu EMzINE12xql9WsZWeSioD6/AVpYyeZj/UkxKVG6D2eIPWCyRpX6uISOnrYKapiKsMeTi Xu4HhU20mW3Y9jaTiCk/QoqDPAn74AYQpZqzgB+dWdBrM4eQxle6UTGQabi0wwPSSELN Kd8z6J/pVuOvTCo61/53QppCO4CQYZRYcRnXV94yNcIbiXjaHltWswGAyLD3jYDtJvB/ lM1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JlVoWKoe; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a656687000000b00528d1d9c7b3si18036582pgw.732.2023.06.19.10.16.31; Mon, 19 Jun 2023 10:16:52 -0700 (PDT) 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=@linaro.org header.s=google header.b=JlVoWKoe; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbjFSQ6k (ORCPT + 99 others); Mon, 19 Jun 2023 12:58:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230444AbjFSQ62 (ORCPT ); Mon, 19 Jun 2023 12:58:28 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61529E2 for ; Mon, 19 Jun 2023 09:58:27 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f9b0f139feso15309155e9.3 for ; Mon, 19 Jun 2023 09:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687193906; x=1689785906; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cSjLhKAkEVmr9MYwtf9eP9pfk3HW3uaYe68MnVI4gb4=; b=JlVoWKoejeYGVw9gW2I/yNfs7ivLHcr1xRX/Kt9aY+bNwIYXp2NvRfeCZHk+T69Xux VizWnR2LcZ3KuXcodUg3gLKcfu8BL0M3D1nWycrXYlyzMwkn69cL5OxaHIDnbsFTtY2n BHz9GBSZ2mPvHFQCavT77ItUUyjF+RrquclO4Lx3lmmbYQxwGJ+SqmxCdgE2+Tweej4E chy5R2GV5JpIAaUz/bl3nf2SsHV2/w7d3uUzR248KV+FHYj3EEUyu91Cnj7Xn72ETw2E E5fgy16kn6ppIe+1J9ceVMUUQudx3B3igm5sTtnCpY1Jpm68LHzCFoZLjcRLhf7kOs3x 5Lxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687193906; x=1689785906; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cSjLhKAkEVmr9MYwtf9eP9pfk3HW3uaYe68MnVI4gb4=; b=QIXsxDULRpqScRo8GNPrQQjccHxpi7gu7pYsWAfwblO9uev5NnVBW2guUtFBpw39ED gRmBaiEzVOQJbWVoDSqXdR53wrBM51rEzovH8iy2VuAvcDqzp05onn/d7+fpQ0oNIu4y 60sIThC6tfp3yoQGKjyMcE9vuq+GDNQoemNnRE7MneS4J4NYwmLXvqLBQjN6PiTOXSOn OKqlR026wqOHGhjayx7tsJqykvsYDAh5KJFgEnWq8Bwr6UfTuCqEY84wIJkmpOu2uGP+ 9x96ZpIQtLUGNQSPGHOmW/cmjqciufsZJXvQZg5qNVe057EVYZp43Y1VfNyklJuMzsOc yNMQ== X-Gm-Message-State: AC+VfDxyPYDejjD8nCpD/WO/DVCEmYWf1V49NdJxlMn1x1a4hNqj5BRX sWjl3sLngti+a+7KaGcuzvie3A== X-Received: by 2002:a05:600c:b4e:b0:3f7:fcca:5e32 with SMTP id k14-20020a05600c0b4e00b003f7fcca5e32mr9158353wmr.17.1687193905807; Mon, 19 Jun 2023 09:58:25 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:13d0:1b6c:ce40:5429? ([2a05:6e02:1041:c10:13d0:1b6c:ce40:5429]) by smtp.googlemail.com with ESMTPSA id x23-20020a1c7c17000000b003f72468833esm211361wmc.26.2023.06.19.09.58.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jun 2023 09:58:25 -0700 (PDT) Message-ID: <07c5efe5-4eb0-121f-7b50-8f3fba68beab@linaro.org> Date: Mon, 19 Jun 2023 18:58:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 1/1] clocksource: hyper-v: Rework clocksource and sched clock setup Content-Language: en-US To: "Michael Kelley (LINUX)" , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , Dexuan Cui , "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" References: <1686325621-16382-1-git-send-email-mikelley@microsoft.com> From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 19/06/2023 18:44, Michael Kelley (LINUX) wrote: > From: Daniel Lezcano Sent: Monday, June 19, 2023 9:16 AM >> >> On 09/06/2023 17:47, Michael Kelley wrote: >>> Current code assigns either the Hyper-V TSC page or MSR-based ref counter >>> as the sched clock. This may be sub-optimal in two cases. First, if there >>> is hardware support to ensure consistent TSC frequency across live >>> migrations and Hyper-V is using that support, the raw TSC is a faster >>> source of time than the Hyper-V TSC page. Second, the MSR-based ref >>> counter is relatively slow because reads require a trap to the hypervisor. >>> As such, it should never be used as the sched clock. The native sched >>> clock based on the raw TSC or jiffies is much better. >>> >>> Rework the sched clock setup so it is set to the TSC page only if >>> Hyper-V indicates that the TSC may have inconsistent frequency across >>> live migrations. Also, remove the code that sets the sched clock to >>> the MSR-based ref counter. In the cases where it is not set, the sched >>> clock will then be the native sched clock. >>> >>> As part of the rework, always enable both the TSC page clocksource and >>> the MSR-based ref counter clocksource. Set the ratings so the TSC page >>> clocksource is preferred. While the MSR-based ref counter clocksource >>> is unlikely to ever be the default, having it available for manual >>> selection is convenient for development purposes. >>> >>> Signed-off-by: Michael Kelley >> >> The patch does not apply, does it depend on another patch? > > It should apply to linux-next. It depends on two previous patches from > Peter Zijlstra in the sched/core branch of tip. See: > > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=sched/core&id=9397fa2ea3e7634f61da1ab76b9eb88ba04dfdfc > > and > > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=sched/core&id=e39acc37db34f6688e2c16e958fb1d662c422c81 Yeah, but the branch is tip/timers/core Could you respin against it ? Thanks -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog