Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp397629rdb; Sat, 30 Sep 2023 08:37:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3eNVTInHS/l00kqYDPCHXcT3ASAwBHwtXsI+NgrQr0Ca1L5G3ec1swJosKW0PtuPdLU08 X-Received: by 2002:a05:6808:2004:b0:3a7:6ff5:c628 with SMTP id q4-20020a056808200400b003a76ff5c628mr9136640oiw.11.1696088221782; Sat, 30 Sep 2023 08:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696088221; cv=none; d=google.com; s=arc-20160816; b=A9bbBMKont6isarZC1g/mgS/jvfCKoFmWxdTJn0ExoGYi99dfNfScPaxjW/yQpHfFy nseUQXu98/g/XIo8MOBCADyD2IOF0kt4etsFfUqCHxWoQC0mgM6BLHu2nwLmu4zIUhbH pO7yorWT9utSkmVVioDcgqLWdc6EA4ibq3XfZum7hIXX77fdCAvYjDsm5gIQEG/HLveg VpEOIleJpnlDgYfPemJTENdEnpMd+DVnHmiuDKNhGOhdAI9LOGc+qNsKOqHD1GjSD+jb JNHHi6BNdpl3S9TRBRy1Q4qn6RF0URUtUWqAFoB1hTZoFeZDOadBGrEdfOhv64F2OLnx IDFg== 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 :content-language:references:cc:to:from:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=0PEuv1JE1ji/lSxoZu0EKZ3PyEQs2C6XzXKupEO4HsI=; fh=L17TT5z9J34Vy0Oyv89mnJ4V0IaS6ZxnSA3e63CCcmc=; b=ShedTCK1YqpqjYd/KkFIswZZ9/bx19KB/8JTlUzaVvrxpgvemXfhsRrMJ4/pj9pCX1 BRvGe7nQq3pq0a2mNCLu5fg6EZIsPVxuzjZn2jJQkFugazsfOZHmckZ+5gdNVKgZNrL+ frQtQnHnU/CK1a74dJD6pV+DwSmzwdjNN7TYZ968lWsanIFgyMBk9xTRHAyyrKfg/UWh E1KWabAMaZbtH+qvS7urTVGBhAkAw/big0Js1a892zoT5OZssfV8dl1MQs80N4rVxESj 2+lv29URQdAqj3J/A3Uqnjh5KIzss2Qpx0orSG2FBAKrOCxwu2Twmcd36SzGOmAhoKpf debA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=g+zXLR7z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id 63-20020a630142000000b00578b9fb24f3si24263827pgb.633.2023.09.30.08.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 08:37:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=g+zXLR7z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D94078026C0D; Sat, 30 Sep 2023 05:32:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233916AbjI3Mbp (ORCPT + 99 others); Sat, 30 Sep 2023 08:31:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbjI3Mbo (ORCPT ); Sat, 30 Sep 2023 08:31:44 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 596FFBD; Sat, 30 Sep 2023 05:31:41 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-690bc3f82a7so12788224b3a.0; Sat, 30 Sep 2023 05:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696077101; x=1696681901; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=0PEuv1JE1ji/lSxoZu0EKZ3PyEQs2C6XzXKupEO4HsI=; b=g+zXLR7zeIamobd1EhaifgMeW3Z2kHjB58mZ4DDfMxJnRs9U66ovnop9/uRr4k83cs jUwx7Q6X0KywFIjbAwacCZ+oVX0YoTeUeP9NkusJGBmXZyySb4CQDqzFJGIROr24D84h 3Z+ieegFlFeK+zWsoQfNryGd+TeE5stkgdczMJWNJGiZ+gI0cHYaie5sX9PvWFAyEbhr v0FvurisjzUy3o8Rw0tXDws5jDWfb/0HY+q1lcAJt3LI7fQSBenJbJudF7+UmJpdVxZu 7ElO4wwFW/Ufj19ht26oJedSrXgZTBli3O+c6uauSUl7ghTbFsI+XcOxjYVeclooVi0p O4NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696077101; x=1696681901; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0PEuv1JE1ji/lSxoZu0EKZ3PyEQs2C6XzXKupEO4HsI=; b=CaHbJZpBTmp6d9/dNWnxMXKCX02k2kLtZ2D7srzi0tNvy1V2aNrixumJ/Sw46SORc+ lGxW0028WL06D6E1BD0qHyZW+c1Er9njIdoDoeQBmf1HMFxRXDU2jlLVEbln+z0Dh8DT HpsYWbhvLz+TDzFTHui1+C2sH3+Ckotjwo96/lrkd7Hz3MmnZpjjOFC3vGnsuKR3bPFJ ISGW/IflSAAmxxmUjY3tOPm8VNi2y1upyvSu+E8nW1iikYGVR2ffs2WZNVScTw8Fj3mw c9jjk9WxYo5JQarSKy7JZidu/sAQ3lSUIkz9TD+XpxmDUAOUfDtroFeC3SdPL5OLAiVD TfGQ== X-Gm-Message-State: AOJu0Yxdo4WaufLNc0b0GGIE1FiXi4w9rlde61M1z4mynwCo75XSuuDq tl4cZHAJsFIN5U989VyHQ74= X-Received: by 2002:a05:6a00:24c6:b0:68c:2be:67bb with SMTP id d6-20020a056a0024c600b0068c02be67bbmr7158316pfv.20.1696077100602; Sat, 30 Sep 2023 05:31:40 -0700 (PDT) Received: from [192.168.0.106] ([103.131.18.64]) by smtp.gmail.com with ESMTPSA id e25-20020a62ee19000000b00690d9901ce5sm7900536pfi.102.2023.09.30.05.31.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 Sep 2023 05:31:39 -0700 (PDT) Message-ID: Date: Sat, 30 Sep 2023 19:31:34 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Fwd: Performance regression: resume_console takes 100ms longer in S2idle/S3 resume in v6.6-rc1 From: Bagas Sanjaya To: John Ogness , Sergey Senozhatsky , Petr Mladek , Todd Brandt Cc: Linux Kernel Mailing List , Linux Regressions , Linux Hardening References: <99b9d4d1-f7a9-4b6c-aebf-ef1d2ddee0d7@gmail.com> Content-Language: en-US In-Reply-To: <99b9d4d1-f7a9-4b6c-aebf-ef1d2ddee0d7@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sat, 30 Sep 2023 05:32:05 -0700 (PDT) On 28/09/2023 07:17, Bagas Sanjaya wrote: > Hi, > > I notice a regression report on Bugzilla [1]. Quoting from it: > >> Ever since 6.6.0-rc1 we've seen S3 and S2idle resume take 100ms longer because of resume_comsole. resume_console ordinarily takes only a few milliseconds, but now it's consistently 100ms. I've bisected the issue to this commit: >> >> commit 9e70a5e109a4a23367810de09be826c52d27ee2f >> Author: John Ogness >> Date: Mon Jul 17 21:52:06 2023 +0206 >> >> printk: Add per-console suspended state >> >> Currently the global @console_suspended is used to determine if >> consoles are in a suspended state. Its primary purpose is to allow >> usage of the console_lock when suspended without causing console >> printing. It is synchronized by the console_lock. >> >> Rather than relying on the console_lock to determine suspended >> state, make it an official per-console state that is set within >> console->flags. This allows the state to be queried via SRCU. >> >> Remove @console_suspended. Console printing will still be avoided >> when suspended because console_is_usable() returns false when >> the new suspended flag is set for that console. >> >> We are seeing this on roughly 2/3 of our machines, both on test systems and production systems. > > Then, > >> The effect is most pronounced in the GigaByte z170x UD5. It goes from 300ms to 400ms because of an msleep 100 in the resume_console code. This might not seem like much but it's in series with everything else so it will always be there. Our goal is to keep both suspend and resume under 1 second if at all possible, so every bit counts. > > See Bugzilla for the full thread and attached sleepgraph timelines > (in html format). > > Anyway, I'm adding this regression to be tracked by regzbot: > > #regzbot introduced: 9e70a5e109a4a2 https://bugzilla.kernel.org/show_bug.cgi?id=217955 > #regzbot title: resume_console performance regression due to per-console suspended state > #regzbot fix: printk: flush consoles before checking progress -- An old man doll... just what I always wanted! - Clara