lkml.org 
[lkml]   [2007]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/22 take 3] UBI: EBA unit
From
Date
On Thu, 2007-03-15 at 11:07 -0800, Andrew Morton wrote:
> > + spin_lock(&ubi->eba.eba_tbl_lock);
> > + ubi_assert(ubi->eba.eba_tbl[idx].recs);
> > + leb_ver = ubi->eba.eba_tbl[idx].recs[lnum].leb_ver;
> > + spin_unlock(&ubi->eba.eba_tbl_lock);
> > +
> > + return leb_ver;
> > +}
>
> I very much doubt that the locking in this function (and in the similar
> ones here) does anything useful.

Well, yes, these are integers.

> > +static inline void leb_unmap(struct ubi_info *ubi, int vol_id, int lnum)
>
> The patch is full of nutty inlining.

Yeah, this file has too much of them.

> Suggestion: just remove all of it. Then reintroduce inlining in only
> those places where a benefit is demonstrable. Reduced code size according to
> /bin/size would be a suitable metric.

OK, thanks.

> > + spin_unlock(&ubi->eba.eba_tbl_lock);
> > +
> > + return pnum;
> > +}
>
> Again, the locking seems pointless.

Thanks for comments, will be fixed.

--
Best regards,
Artem Bityutskiy (Битюцкий Артём)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-16 11:17    [W:1.394 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site