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 X-Spam-Level: X-Spam-Status: No, score=-3.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AEB5C0044C for ; Mon, 29 Oct 2018 17:56:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F356F2084A for ; Mon, 29 Oct 2018 17:56:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="PJ+jKuUz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F356F2084A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728236AbeJ3CqW (ORCPT ); Mon, 29 Oct 2018 22:46:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:43784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727712AbeJ3CqW (ORCPT ); Mon, 29 Oct 2018 22:46:22 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 77594204FD; Mon, 29 Oct 2018 17:56:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540835801; bh=BPqcXJghhk4BLehj5161FDGSWqveazlDnxHC1bTjwAc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PJ+jKuUzJGtM4di+3CwJX4lAOj/1Jr7GJHCin94eL82sT2Ntlw/vSumo4BFxt/QhA xVy+VQkn0tYC1eByQUuTbx92Z8c9POzvpQ3gwa/f27XDTdLMTD6gwwwfwbo8tpvAMZ iamzXhOG55Ql1bI1+4YApm6EZjVfDbl0CutRZDq4= Received: by jouet.infradead.org (Postfix, from userid 1000) id A2DC8142C5F; Mon, 29 Oct 2018 14:56:39 -0300 (-03) Date: Mon, 29 Oct 2018 14:56:39 -0300 From: Arnaldo Carvalho de Melo To: David Miller Cc: kan.liang@linux.intel.com, linux-kernel@vger.kernel.org, wangnan0@huawei.com, jolsa@kernel.org, namhyung@kernel.org, kan.liang@intel.com, ak@linux.intel.com, yao.jin@linux.intel.com, peterz@infradead.org Subject: Re: [PATCHES/RFC] Re: A concern about overflow ring buffer mode Message-ID: <20181029175639.GJ21857@kernel.org> References: <0247fca0-5a94-9a83-cefa-282804316729@linux.intel.com> <20181029143506.GF21857@kernel.org> <9ad642b0-1a15-b3d9-781f-893f782f8867@linux.intel.com> <20181029.104321.1657526975436362699.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181029.104321.1657526975436362699.davem@davemloft.net> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Oct 29, 2018 at 10:43:21AM -0700, David Miller escreveu: > From: "Liang, Kan" > Date: Mon, 29 Oct 2018 11:11:25 -0400 > > > The processing time for each perf_top__mmap_read_idx() should not that > > long. We may check it after each perf_top__mmap_read_idx(). Also > > change the ui_warning to one-time warning. The patch as below can do > > that (not test). > > You cannot make ui__*() calls from the event processing thread. > > I tried to make this point strongly over the weekend. > > It hangs the event thread, because the ui call waits for a keypress > but the display thread will eat them up and the event thread thus > hangs in select(). > > So, once more, all ui calls must be avoided in event processing code. > > Said another way, it is not legal to call UI interfaces from any > code that could be called by the event thread. Right, that global in fact needs to be set in the event processing and checked in the display thread, start it with 0, switch to 1 and then to 2 to say it was processed just once, etc. - Arnaldo