From: Ian Campbell Subject: Re: [PATCH v2 3/5] dbg_rw_guest_mem: Conditionally enable debug log output Date: Wed, 8 Jan 2014 16:47:06 +0000 Message-ID: <1389199626.4883.112.camel@kazak.uk.xensource.com> References: <1389140748-26524-1-git-send-email-dslutz@verizon.com> <1389140748-26524-4-git-send-email-dslutz@verizon.com> <1389177510.4883.11.camel@kazak.uk.xensource.com> <52CD60AA.9010607@terremark.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52CD60AA.9010607@terremark.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Don Slutz Cc: Keir Fraser , Stefano Stabellini , George Dunlap , Ian Jackson , xen-devel@lists.xen.org, Jan Beulich List-Id: xen-devel@lists.xenproject.org On Wed, 2014-01-08 at 09:28 -0500, Don Slutz wrote: > > Using volatile is almost always wrong. Why do you think it is needed > > here? > > This was from Mukesh Rathor: > > http://lists.xen.org/archives/html/xen-devel/2014-01/msg00426.html > > I saw no reason to make it volatile, but maybe "kdb" needs this? Happy > to change any way you want. I'm not the maintainer but if I were I'd say drop the volatile and maybe mark it __read_mostly and perhaps __used too (since it's static it might otherwise get eliminated). > > If anything this variable is exactly the opposite, i..e __read_mostly or > > even const (given that I can't see anything which writes it I suppose > > this is a compile time setting?) > > That has been how I have been testing it so far (changing the source > to set values). Mukesh claims to be able to change it at will. Not > sure how const may effect this. I presume this is using kdb and marking it const would probably cause the dead code to be eliminated so it is worth not doing that for his sake. Ian.