From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v1 18/19] tools/kvm_stat: add new interactive command 'b' Date: Tue, 20 Jun 2017 15:10:43 +0200 Message-ID: <3255088e-fd65-6f06-0a37-83d2875eb596@redhat.com> References: <20170607190843.76869-1-raspl@linux.vnet.ibm.com> <20170607190843.76869-19-raspl@linux.vnet.ibm.com> <2e3a0b49-c6e3-0c66-f7f7-959bf1849c3b@redhat.com> <79e1be12-f05f-9cec-e416-48ef44991476@linux.vnet.ibm.com> <781afc5e-ae0d-6bb1-6a1c-f0aae48a67a5@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: rkrcmar@redhat.com, frankja@linux.vnet.ibm.com To: raspl@linux.vnet.ibm.com, kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39228 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751590AbdFTNKq (ORCPT ); Tue, 20 Jun 2017 09:10:46 -0400 In-Reply-To: <781afc5e-ae0d-6bb1-6a1c-f0aae48a67a5@linux.vnet.ibm.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 20/06/2017 15:07, Stefan Raspl wrote: > On 20.06.2017 14:33, Paolo Bonzini wrote: >> >> >> On 20/06/2017 11:10, Stefan Raspl wrote: >>> Plus if we would prevent this command from doing anything when >>> tracepoints are in use, then we should probably give the user some >>> kind of feedback on why nothing changed upon his keypress - but I >>> wouldn't know a place in kvm_stats GUI to do that. So if we leave as >>> is, at least the user gets some immediate feedback and hopefully >>> figure what's going on, and that he might want to rather restart >>> with debugfs only. >> >> What about writing a message in the last line? > > kvm_stat fills the entire screen till the last line. We'd have to > make any message stick out, probably by erasing the line before and > after, too - and then make sure that the message remains visible for > at least 3 seconds, i.e. re-apply the change after refreshing the > body till 3 sec expired (since users could set the refresh interval > to e.g. 0.5 sec via 's', whereby it would be really hard to spot the > message within the 0.5 sec that it is visible on screen). So that > would require some kind of time measuring logic. Which also would > need to consider add'l key presses before those 3 secs expire. > In short: We're talking quite a bit of more messy code for little > benefit. > Then again: How about simply drawing a separate screen a la the help > (see 'h') with whatever error message we need, and which is exited > upon a key press? In a generic way, of course, so we could re-use > for future likewise cases. That would work. Alternatively, make kvm_stat not use the last line, and draw it inverted. The last error can be printed in the last line, again inverted, and we can skip clearing the last line when we redraw. Paolo