Re: [PATCH 06/14] perf tools: Cache dso data file descriptor

2014-05-29 Thread Jiri Olsa
On Thu, May 29, 2014 at 09:02:36AM +0900, Namhyung Kim wrote: > On Tue, 27 May 2014 09:37:38 +0200, Jiri Olsa wrote: > > On Tue, May 27, 2014 at 10:05:28AM +0900, Namhyung Kim wrote: > >> Hi Jiri, > >> > >> On Thu, 15 May 2014 19:23:27 +0200, Jiri Olsa wrote: > >> > >> [SNIP] > >> > +static void

Re: [PATCH 06/14] perf tools: Cache dso data file descriptor

2014-05-28 Thread Namhyung Kim
On Tue, 27 May 2014 09:37:38 +0200, Jiri Olsa wrote: > On Tue, May 27, 2014 at 10:05:28AM +0900, Namhyung Kim wrote: >> Hi Jiri, >> >> On Thu, 15 May 2014 19:23:27 +0200, Jiri Olsa wrote: >> >> [SNIP] >> > +static void data_close(void) >> > +{ >> > + bool cache_fd = may_cache_fd(); >> > + >> > +

Re: [PATCH 06/14] perf tools: Cache dso data file descriptor

2014-05-27 Thread Jiri Olsa
On Tue, May 27, 2014 at 10:05:28AM +0900, Namhyung Kim wrote: > Hi Jiri, > > On Thu, 15 May 2014 19:23:27 +0200, Jiri Olsa wrote: > > [SNIP] > > +static void data_close(void) > > +{ > > + bool cache_fd = may_cache_fd(); > > + > > + if (!cache_fd) > > + close_first_dso(); > > +} > >

Re: [PATCH 06/14] perf tools: Cache dso data file descriptor

2014-05-26 Thread Namhyung Kim
Hi Jiri, On Thu, 15 May 2014 19:23:27 +0200, Jiri Olsa wrote: [SNIP] > +static void data_close(void) > +{ > + bool cache_fd = may_cache_fd(); > + > + if (!cache_fd) > + close_first_dso(); > +} Why do you do this at close()? As long as there's no attempt to open a new file, w

[PATCH 06/14] perf tools: Cache dso data file descriptor

2014-05-15 Thread Jiri Olsa
Changing the dso__data_close to keep the dso data file descriptor open if possible. We keep dsos data file descriptors open until their count reaches the half of the current fd open limit (RLIMIT_NOFILE). In this case we close file descriptor of the first opened dso object. We've got speed up in