Le Jeudi 18 Mai 2006 07:11, Isaku Yamahata a écrit :
> On Wed, May 17, 2006 at 04:15:38PM +0200, Tristan Gingold wrote:
> > I'd just like to understand clearly why and where locks must be added.
> > Adding locks has a cost and must be understood in order to be done
> > correctly.
>
> Yes lock has a cost.
> If lockless approache was achieved, it would be a big win especially
> on a big iron.
> However are you really sure about all races?
> If there are a bug, it must rarely happen and be very nasty.
> It would be almost impossible to debug such a bug.
> Instead, a certain way should be adopted at first although
> its performance may be poor.
> Once stablilized, we should do performance tuning.
> Lockless aproach should be a one of the tuning candidates.
>
> I don't think lockless approach should be taken at the early stage,
> especially when perfomance optimization is planned.
> Since lockless code is very difficult to modify, trying another
> tuning idea becames very diffucalt.
I do not defend lockless approach.
I am just asking why should we add a lock if we don't have a race scenario.
Again, I don't have your experience on dom0 vp. If you think a lock is
required, feel free to add it.
Tristan.
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|