From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: Re: how to avoid lost trace records? Date: Thu, 25 Nov 2010 22:04:08 +0100 Message-ID: <20101125210408.GA16766@aepfle.de> References: <20101119154652.GA11544@aepfle.de> <20101120202122.GA31616@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: George Dunlap Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org [ Sorry, this mutt process was suspended and I didnt notice ... ] On Mon, Nov 22, George Dunlap wrote: > Olaf, > > Dang, 8 megs per cpu -- but I guess that's really not so much overhead > on a big machine; and it's definitely worth getting around the lost > records issue. Send the T_INFO_PAGES patch to the list, and see what > Keir thinks. The change is as simple as this, for xen-unstable. 4.0 needs to add the get_order_from_pages() for alloc_xenheap_pages() calls. A dynamic trace buffer allocation, and also allowing dynamic mask as cmdline option, should be added. I have added this line to trace.c to allow an event mask during booting: integer_param("tbuf_event_mask", tb_event_mask); Olaf --- xen/common/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- xen-unstable.hg-4.1.22415.orig/xen/common/trace.c +++ xen-unstable.hg-4.1.22415/xen/common/trace.c @@ -48,7 +48,8 @@ integer_param("tbuf_size", opt_tbuf_size /* Pointers to the meta-data objects for all system trace buffers */ static struct t_info *t_info; -#define T_INFO_PAGES 2 /* Size fixed at 2 pages for now. */ +#define T_INFO_PAGES_ORDER 1 /* Size fixed at 2 pages for now. */ +#define T_INFO_PAGES (1 << T_INFO_PAGES_ORDER) #define T_INFO_SIZE ((T_INFO_PAGES)*(PAGE_SIZE)) static DEFINE_PER_CPU_READ_MOSTLY(struct t_buf *, t_bufs); static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, t_data);