From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Raspl Subject: Re: [PATCH v1 18/19] tools/kvm_stat: add new interactive command 'b' Date: Tue, 20 Jun 2017 16:41:25 +0200 Message-ID: <3d53e73c-da61-fd01-04e5-0dad201468a8@linux.vnet.ibm.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> <3255088e-fd65-6f06-0a37-83d2875eb596@redhat.com> Reply-To: raspl@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: Paolo Bonzini , kvm@vger.kernel.org Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33021 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751060AbdFTOla (ORCPT ); Tue, 20 Jun 2017 10:41:30 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v5KEef7Z028754 for ; Tue, 20 Jun 2017 10:41:29 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2b6qenv7kp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 20 Jun 2017 10:41:29 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 Jun 2017 15:41:27 +0100 In-Reply-To: <3255088e-fd65-6f06-0a37-83d2875eb596@redhat.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 20.06.2017 15:10, Paolo Bonzini wrote: > > > 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. There's a specific call to clear all remaining lines on the screen till bottom that we're using - would need to look into it how to prevent the final line from getting drawn. In the worst case, we could manually clear all affected lines except the final one. Still: I bet usability experts would argue that printing "important" messages at the bottom of the screen, even if highlighted, might not be the most obvious way to present such information. Plus if we put it on a separate page, we'd get a bit more space in case we'd have a future message with multiple lines or similar. Ciao, Stefan