lkml.org 
[lkml]   [2015]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] perf/tools: put new buildid locks to use
On Thu, May 14, 2015 at 01:38:21PM +0200, Jiri Olsa wrote:

> On Thu, May 14, 2015 at 12:40:59PM +0200, Ingo Molnar wrote:
> >
> > * Milos Vyletel <milos@redhat.com> wrote:
> >
> > > Use new read/write locks when accesing buildid directory on places where
> > > we may race if multiple instances are run simultaneously.
> >
> > Dunno, this will create locking interaction between multiple instances
> > of perf - hanging each other, etc.
> >
> > And it seems unnecessary: the buildid hierarchy is already spread out.
> > What kind of races might there be?
>
> there was just recently one fixed by commit:
> 0635b0f71424 perf tools: Fix race in build_id_cache__add_s()
>
> havent checked the final patch yet, but the idea is to
> protect us from similar bugs

right. on top of race with EEXIST couple more are possible (EMLINK,
ENOSPC, EDQUOT, ENOMEM... the only way to prevent them all is to lock
this kind of operations and make sure we run one at a time.

Milos


\
 
 \ /
  Last update: 2015-05-14 18:21    [W:0.339 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site