From owner-freebsd-current@freebsd.org Thu May 17 07:47:10 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0676AEDBAAD for ; Thu, 17 May 2018 07:47:10 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-wr0-x231.google.com (mail-wr0-x231.google.com [IPv6:2a00:1450:400c:c0c::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26D50713F7; Thu, 17 May 2018 07:47:09 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-wr0-x231.google.com with SMTP id g21-v6so4566270wrb.8; Thu, 17 May 2018 00:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=y36kiCm2xKNZ9Ayc5DAe+bXFU4J/FP0n+h0+uLH5cRk=; b=nbU1mPUq1xa3MVK2Pi841QDkUkcEh2T2xXcsLenf5x30jt5KMEp1LIiTWjl7uQ3KFz 6AyylmE7iLI+urNeKpcaRdtu4uP6rjnYp6PwwYNs74W8XHxDNaURJqB4jyxnqOgwRoLi rwfPLpc8194Mo56LQ1Lg3b3UiW6UnnpBAa07fKbSOaaPvNW3gMrDBYsdgERNDFQlYsuw E4zk2E66CpfnYAzePJd57Q62qVPzT9QlpLCfu9Z/KotHnonl3v6/M9M1HOeg1bR0mgDt medV7Og0z1ZctYK4QesOPWwI+tHxdpujUaaoMnFwnM6QULp/bjzVXab+H6hDzFCC6bpL 3szg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=y36kiCm2xKNZ9Ayc5DAe+bXFU4J/FP0n+h0+uLH5cRk=; b=qhN2JRoqcpVG+bR0oXNK6FgDBRo8Qkk6LsfLjJaVy8YxKF3wFUqt9yKAtcUSNvbVxk T7QydZ1ZtT/O5oAwoaT+AbLyO8e0+3F9F+hswOrqFrlxBhWVDcubld3B5uxoAuiNuCSk 7aHCuqjar/iuCehhyF2fzZZk+ryn13gI0bwyypz4BiQsSJGJhBkqDUMMTvuRFYj5DCXT oLJuypLkWJyo1MhoWiZf/2RpmPSykMtWDiro693HJvaRJohX9a1O11epH4GM5g8UK5yJ ryPStJ0Jnk75gwKmlAiczuQDsVHhVIgekOVCikn7Nm3qka9l5ThLfP9hXuqAxwLmhMRi a9Sw== X-Gm-Message-State: ALKqPwdFUQywFtvvV5XE47WJAAZwYgsrJPQvyVPqvECR7EM9y/qi3Ivj 2jqq8gk9kyDTvQXnYqw7FfGn54pMzvRcs4JPfyNjzQ== X-Google-Smtp-Source: AB8JxZqlWr1cED7+Bow/0XMJ/KivHbc/0ZMLqa+fQ/smEPqPPRBrPCtrYkpxVD9USmMHIUnBxK0IeXIuKpi/NgFJKTE= X-Received: by 2002:adf:a70c:: with SMTP id c12-v6mr3076069wrd.140.1526543227591; Thu, 17 May 2018 00:47:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.146.194 with HTTP; Thu, 17 May 2018 00:46:27 -0700 (PDT) In-Reply-To: References: From: Johannes Lundberg Date: Thu, 17 May 2018 08:46:27 +0100 Message-ID: Subject: Re: Lag after resume culprit found To: Andriy Gapon Cc: freebsd-current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2018 07:47:10 -0000 On Thu, May 17, 2018 at 7:43 AM, Andriy Gapon wrote: > On 17/05/2018 02:07, Johannes Lundberg wrote: > > https://github.com/freebsd/freebsd/commit/66f063557f257baa9c8aeab9f93317 > 1eaa6e1cfa > > x86 cpususpend_handler: call wbinvd after setting suspend state bits > > That's very interesting and surprising. > That commit changes something that happens before suspend, it should not > have > any effect on the system state after resume. > > Does anyone have a theory of what could be wrong? > Nope but moving CPU_CLR_ATOMIC(cpu, &suspended_cpus); back to the end of that scope fixes it. > > > How to test (i915kms) > > > > Start X with glxgears > > Confirm running stable at 60 fps > > suspend/resume (S3) > > glxgears is now fluctuating between 10-40 fps. > > > > -- > Andriy Gapon >