[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1412062762.2379.2.camel@sauron.fi.intel.com>
Date: Tue, 30 Sep 2014 07:39:23 +0000
From: "Bityutskiy, Artem" <artem.bityutskiy@...el.com>
To: "richard@....at" <richard@....at>
CC: "dedekind1@...il.com" <dedekind1@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>
Subject: Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is
scheduled
On Tue, 2014-09-30 at 08:59 +0200, Richard Weinberger wrote:
> Am 30.09.2014 08:45, schrieb Bityutskiy, Artem:
> > On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote:
> >> + spin_lock(&ubi->wl_lock);
> >> + ubi->fm_work_scheduled = 0;
> >> + spin_unlock(&ubi->wl_lock);
> >
> > Andrew Morton once said me that if I am protecting an integer change
> > like this with a spinlock, I have a problem in my locking design. He was
> > right for my particular case.
> >
> > Integer is changes atomic. The only other thing spinlock adds are the
> > barriers.
>
> I've added the spinlock to have a barrier in any case.
Examples of any?
--
Best Regards,
Artem Bityutskiy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
Powered by blists - more mailing lists