Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7415235rwl; Thu, 23 Mar 2023 04:08:54 -0700 (PDT) X-Google-Smtp-Source: AK7set/9xKSBSv718bXmYDHb7gYYM/cOfs1g3b85VU1Y7QcW254YYvRMpKCsbmPn1uXmJUmeVAK9 X-Received: by 2002:a17:906:e296:b0:92f:48f0:736d with SMTP id gg22-20020a170906e29600b0092f48f0736dmr10304815ejb.62.1679569734466; Thu, 23 Mar 2023 04:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679569734; cv=none; d=google.com; s=arc-20160816; b=rqviRWe+7Q0qIZqYR/UAq2t+/FjJ5X+2t9HcJRjC2smBW5MhZfKnFCOorw27rV9EmP 9v1EPYTc/09YUKlg2C1uPBI+3MV8MA3ivXG8uyGCYWr9Fy8XfAgiQv9BUm1liJ+MM4bs MF9ktSyb+Tn0pS5Ner4aspTaWGn1xQsfR4WrBVVuyKkyi2uJJjNiTXG4Na131qvDhsL7 AzAPODlN4s21Clg7DxVA6bgZF8Fa/FYjAyfGt5rLHP2wCxoD/HUqJFiHsbDL+abD/TC6 LBVoNCzYDBdc1rGEFcIGlwZFAzvE8ijqLhSF9UvBl8LDYZ49hajb23UDEC6KBRk0OYt8 mcIw== 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=6RMKf1pCBXSuch817cUVYtccNy5fUbSlq3np7Kfqv5g=; b=ndoCn/ld5yJ0aWXg5vIE+N6fs539G7VkWxZBCewcaYG1PGJyalB1i3relg7NTa9SEF 0z470Iky9hk0LT/P0l7wv2ytlztxA2w8VsZlCGn/QnWyIIhP2VT5FFXs1Dn4EHls5cW8 2EPRP3A8v3DAjmyfaoh1FFyQxmpyDL7p9C058DgzCblpa8r1i3eccO7BiXe0WYI4S++B 9ct7FGzmmb5VO2pLe9co2V4fBxME/lggCZuFYoJKQpw7wrAMyl9IRGBYHiOBWUxxDz9u NFK+OUVSzdKuLILrcAOZm9Z8Nlc4nWUHp5vatGumBMbEQLRRc+JfQJNKEiURV1ZpupbI /wtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EwLEPPyJ; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id um11-20020a170906cf8b00b0093038215ad2si17303338ejb.591.2023.03.23.04.08.30; Thu, 23 Mar 2023 04:08:54 -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=@redhat.com header.s=mimecast20190719 header.b=EwLEPPyJ; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230137AbjCWLAi (ORCPT + 99 others); Thu, 23 Mar 2023 07:00:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbjCWLAb (ORCPT ); Thu, 23 Mar 2023 07:00:31 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 767ED1BF8 for ; Thu, 23 Mar 2023 03:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679569177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6RMKf1pCBXSuch817cUVYtccNy5fUbSlq3np7Kfqv5g=; b=EwLEPPyJwIKGB8a6vczmgzCrmLcqnTnwza7hCCB/z4vPGSTSxQQGspMI8n+t7DAu6uLhBx JPMQlGvD87aPRVzOTWKTb6PIE12YggyD5tiaonsyubON9rLjzgRDi/A4zB7kRNKpVx4dvo eYDaFhlwtIHpnJhLEUczh/47MrvDUII= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-595-l4uDY0pyORCzbpewGzv6Dw-1; Thu, 23 Mar 2023 06:59:34 -0400 X-MC-Unique: l4uDY0pyORCzbpewGzv6Dw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A8222101A550; Thu, 23 Mar 2023 10:59:33 +0000 (UTC) Received: from tpad.localdomain (ovpn-112-2.gru2.redhat.com [10.97.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F15A2027040; Thu, 23 Mar 2023 10:59:33 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 32FB7401A0FC7; Thu, 23 Mar 2023 07:59:14 -0300 (-03) Date: Thu, 23 Mar 2023 07:59:14 -0300 From: Marcelo Tosatti To: Michal Hocko Cc: Christoph Lameter , Aaron Tomlin , Frederic Weisbecker , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Russell King , Huacai Chen , Heiko Carstens , x86@kernel.org, Vlastimil Babka Subject: Re: [PATCH v7 00/13] fold per-CPU vmstats remotely Message-ID: References: <20230320180332.102837832@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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, Mar 23, 2023 at 07:52:22AM -0300, Marcelo Tosatti wrote: > On Thu, Mar 23, 2023 at 08:51:14AM +0100, Michal Hocko wrote: > > On Wed 22-03-23 11:20:55, Marcelo Tosatti wrote: > > > On Wed, Mar 22, 2023 at 02:35:20PM +0100, Michal Hocko wrote: > > [...] > > > > > "Performance details for the kworker interruption: > > > > > > > > > > oslat 1094.456862: sys_mlock(start: 7f7ed0000b60, len: 1000) > > > > > oslat 1094.456971: workqueue_queue_work: ... function=vmstat_update ... > > > > > oslat 1094.456974: sched_switch: prev_comm=oslat ... ==> next_comm=kworker/5:1 ... > > > > > kworker 1094.456978: sched_switch: prev_comm=kworker/5:1 ==> next_comm=oslat ... > > > > > > > > > > The example above shows an additional 7us for the > > > > > > > > > > oslat -> kworker -> oslat > > > > > > > > > > switches. In the case of a virtualized CPU, and the vmstat_update > > > > > interruption in the host (of a qemu-kvm vcpu), the latency penalty > > > > > observed in the guest is higher than 50us, violating the acceptable > > > > > latency threshold for certain applications." > > > > > > > > Yes, I have seen that but it doesn't really give a wider context to > > > > understand why those numbers matter. > > > > > > OK. > > > > > > "In the case of RAN, a MAC scheduler with TTI=1ms, this causes >100us > > > interruption observed in a guest (which is above the safety > > > threshold for this application)." > > > > > > Is that OK? > > > > This might be a sufficient information for somebody familiar with the > > matter (not me). So no, not enough. We need to hear a more complete > > story. > > Michal, > > Please refer to > https://www.diva-portal.org/smash/get/diva2:541460/FULLTEXT01.pdf > > 2.3 Channel Dependent Scheduling > The purpose of scheduling is to decide which terminal will transmit data on which set > of resource blocks with what transport format to use. The objective is to assign > resources to the terminal such that the quality of service (QoS) requirement is fulfilled. > Scheduling decision is taken every 1 ms by base station (termed as eNodeB) as the > same length of Transmission Time Interval (TTI) in LTE system. > > In general: > > https://en.wikipedia.org/wiki/Real-time_computing > > Real-time computing (RTC) is the computer science term for hardware and > software systems subject to a "real-time constraint", for example from > event to system response.[1] Real-time programs must guarantee response > within specified time constraints, often referred to as "deadlines".[2] > > Real-time responses are often understood to be in the order of > milliseconds, and sometimes microseconds. A system not specified as > operating in real time cannot usually guarantee a response within any > timeframe, although typical or expected response times may be given. > Real-time processing fails if not completed within a specified deadline > relative to an event; deadlines must always be met, regardless of system > load. > > For example, for the MAC scheduler processing must occur every 1ms, > and a certain amount of computation takes place (and must finish before > the next 1ms timeframe). A > 50us latency spike as observed by cyclictest > is considered a "failure". If you need more detail, will have to ask someone else, because that is all I know.