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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 091D7C6FD1C for ; Thu, 23 Mar 2023 10:59:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C05646B0074; Thu, 23 Mar 2023 06:59:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AFA096B007B; Thu, 23 Mar 2023 06:59:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D4BE6B0075; Thu, 23 Mar 2023 06:59:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 73EE96B0074 for ; Thu, 23 Mar 2023 06:59:42 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 3B118AB1DD for ; Thu, 23 Mar 2023 10:59:42 +0000 (UTC) X-FDA: 80599867404.12.B133F82 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf09.hostedemail.com (Postfix) with ESMTP id A689614001C for ; Thu, 23 Mar 2023 10:59:38 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=EwLEPPyJ; spf=pass (imf09.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679569180; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=6RMKf1pCBXSuch817cUVYtccNy5fUbSlq3np7Kfqv5g=; b=7ACqwjwj4kYlNRSkITqFvw4xbYDjya8dkFD8Fkt7w8BYrc09HMItBMmccSe4Q5JCAZb0PN CSuZNUG8w62RD6b7kB/dPAcSgbxlGsTk8L73pem0XOXND2KneYPOeAXTDqz282h1diORzj lOKGbIyxeXvvqWVvtuE7qy7RUUFIc+o= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=EwLEPPyJ; spf=pass (imf09.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679569180; a=rsa-sha256; cv=none; b=S3IknlKZjRBgbbOfDlQ7DVZ5UihX+/puwdApuUz+UVta3zevggW7+dFKtxJdLZkAZyhYFQ siErEsXuyeqTAZzWf0A1Dgs24fOjeFUqeYK/xtqgDBy5jXHmRgz1xNiAoxMwUSNcLSEBaw 6MRuxLrKs7XllBA2+PA+gTkvHwz1NbE= 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-Stat-Signature: 7k1qhtcm5hcdo9emn7cg7zsr46baknbt X-Rspam-User: X-Rspamd-Queue-Id: A689614001C X-Rspamd-Server: rspam06 X-HE-Tag: 1679569178-435287 X-HE-Meta: U2FsdGVkX1/Kqaxs1CknUBHrxjjuWUj3IJfq4z0hF2eSwCkE6TcrU1F9RVIcu5R53DxD60s17oiht0nzi9K4KNlZK5hxboqveLi374+1BK/Udgx3WeI1qXdvUYwtdQx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9s6HcxOIlN7YBF8tQ1a+guAvYHW3Cq4kwmrI0Vd3N8zp X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.