From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang2 Subject: Re: [PATCH 2/2] xenoprofile: Add IBS support Date: Tue, 10 Aug 2010 14:44:48 +0200 Message-ID: <201008101444.49811.wei.wang2@amd.com> References: <201007301528.41379.wei.wang2@amd.com> <4C600577020000780000ED13@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C600577020000780000ED13@vpn.id2.novell.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: robert.richter@amd.com, "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Monday 09 August 2010 13:41:11 Jan Beulich wrote: > >>> On 30.07.10 at 15:28, Wei Wang2 wrote: > > > >--- a/drivers/oprofile/oprofile_files.c > >+++ b/drivers/oprofile/oprofile_files.c > >@@ -21,7 +21,7 @@ > > #include "oprof.h" > > > > unsigned long fs_buffer_size = 131072; > >-unsigned long fs_cpu_buffer_size = 8192; > >+unsigned long fs_cpu_buffer_size = 131072; > > Why is this needed at all, why this much of an increase, and why not > conditional upon CONFIG_XEN? > > Jan Hi Jan I had observed over 50% samples lose using following configuration: opcontrol --start --event=IBS_OP_ALL:50000 --no-vmlinux if fs_cpu_buffer_size = 8192. The same issue was also seen on native 2.6.34 kernel. In my case, extending fs_cpu_buffer_size or increasing sampling period can fix this issue. Since each IBS_OP sample will occupy 14 entries in cpu buffer compared with only 1 entry for event-based sample, I suspect that the default size of per-cpu buffer would not be enough for IBS_OP mode in minimum sampling period (50000). I simply extended fs_cpu_buffer_size just to make sure it works for current userland tools. If we intent to force a longer minimum sampling period for IBS_OP_ALL in future release of tools, we could keep fs_cpu_buffer_size = 8192. Thanks, Wei