[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] xen/arm: add warning if memory modules overlap


  • To: Julien Grall <julien.grall.oss@xxxxxxxxx>
  • From: Brian Woods <brian.woods@xxxxxxxxxx>
  • Date: Thu, 17 Oct 2019 15:34:12 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=gmail.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FC6Tduc7yguhzPWY5KD3UaJpGfg3FcKdEETXVWpOC0s=; b=J9NtvAlFL7tE+6d8KTaP28LBvvY7YcxBucZubUEuw+OMCHteWgms5Ac/pq6ZFOxRmmYxZabuvEWapGIWzn5iGDQI8PI2bsvpRqHgsgZtGh1sb2xzrI/yT0WVlwkN7bD2E5mJwiKuNpsPZi10mVDs1qAPdaov6T7uCivz7unHyWmKpjXy/ZZXXrur2UBC793swt3uqNnY6xSXwlNcZLkl1x1ImAs9a1XrYGlvMYFseJRz+ufmsb1RmSdUb9Rrg5a2xdQ9owg2NfWB4q//cYsENcIihUHWGdbFM7K2bfodqb0W2FstwckmxOIL0YmAKkcWsuD8mD+b8wWlAdo42ug44Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QtVDcHfc1KXGNRa9fkEmq5d+cQfO3V34iHDYXwT791BAsYQKZEkx88mhcyfYnBx2fVhBg9Hv8AfBC+/so9AEBxIkdkTw5v+w7Nz0I7V+l5HPQO97dGjGfjXhRPtRoe8kcUtQBwbQWXaeaINAxBj1Cdf2oQMA46i848e1n46cinn1dpNCiJTAvM9VO3seuZX/3r/I7hoUGW3+2ngtHMnouN2WapQ1VUpuTG0btjEcHlE7wCO5hk+dUAkYph3mFdvmKfy1rXj9q99TYhB4GRMFpXr82d5EDgnJwfe1ZoKoODON4xG3bz81Cr12+yd3+NRLTNLAUZgHShna5xIp7Dxe9w==
  • Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=xilinx.com;
  • Cc: Brian Woods <brian.woods@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 17 Oct 2019 22:34:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Oct 17, 2019 at 10:49:15PM +0100, Julien Grall wrote:
> On Thu, 17 Oct 2019 at 22:20, Brian Woods <brian.woods@xxxxxxxxxx> wrote:
> >
> > On Thu, Oct 17, 2019 at 09:34:51PM +0100, Julien Grall wrote:
> > > Hi,
> > >
> > > As a user such message would likely put me off. You tell me there are
> > > an overlap, but you don't provide more information even if you likely
> > > have the information in place. However...
> >
> > Well, I suppose the message could be changed to something like:
> > "WARNING: overlap detected in the above memory module addresses."
> > or something to more directly guide the users to the section.  Maybe
> > move the 'printk("\n");' after the warning so it's grouped tighter with
> > the module information.
> 
> My point stands even for this sort of message. You know the exact
> overlap, so why would you hide it from the users?

We're not hiding it.  You're not cluttering up the log with the same
data multiple times.  See below.

> > >
> > > ... What's wrong with just dumping the information here directly?
> >
> > IMO, it is better to have all the information printed in one spot.
> > There is less to go through and easier to find out what is happening.
> > There is also the fact that we do not have to print things twice (2 sets
> > of names, starting addresses and ending addresses per overlap) when it
> > is going to be printed in the near future anyway.  The cost of this is
> > just one initdata bool, which while I am not thrilled about, does not
> > seem that expensive (compared to a nested loop or printing out at least
> > (16*2 + 12) * 2 characters per overlap(at least on Arm64)).
> 
> Again, this is boot code and not a path that is going to be called
> hundreds of time. So performance is the last thing I care in this
> patch.
> 
> If we try to help the users by telling them there is an overlap
> between modules, then we should do it properly and tell them the exact
> overlap. Otherwise this is nearly as pointless as a crash later on in
> the boot process.
> 
> I also don't want a double for loop or any additional global variable
> when it can be done by simply adding a check in add_boot_module().

This isn't about performance (other than the nested for), this is about
providing a relatively clean and sane log to read.  It's not that
difficult to go through the addresses and see conflicts.  This also
keeps it all in one part of the log and shorter without losing
information.  Shorter and well structured logs (without losing info)
makes it easier to read.  Making logs easier to read helps everyone.

Showing the addresses and module name itself will take 2 lines assuming
you stay within 80 chars.  (16*2 + 12) * 2 = 88, that's without spaces,
'0x's or any sort of message explaining what's actually going wrong.
The module names and addresses will be printed out anyway in the near
future, so why not group them together?

The purpose of the warning is to tell the user something is wrong, both
messages do that and provide the information to determine what's wrong.

Brian

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.