Re: [patch 23/35] fs: icache use per-CPU lists and locks for sbinode lists
From: Nick Piggin
Date: Tue Oct 19 2010 - 22:37:54 EST
On Tue, Oct 19, 2010 at 05:33:54PM +0200, Miklos Szeredi wrote:
> On Tue, 19 Oct 2010, npiggin@xxxxxxxx wrote:
> > +/**
> > + * inode_sb_list_add - add an inode to the sb's file list
> > + * @inode: inode to add
> > + * @sb: sb to add it to
> > + *
> > + * Use this function to associate an with the superblock it belongs to.
>
> ^^^inode
Yes, thanks.
> > @@ -1270,6 +1316,7 @@
> > continue;
> > if (!spin_trylock(&old->i_lock)) {
> > spin_unlock_bucket(b);
> > + cpu_relax();
>
> Doesn't this logically belong to a previous patch?
Yes, I had a couple of them leak out. I'll try to fix them
up... most trylocks get resolved with RCU later.
> > Index: linux-2.6/fs/super.c
> > ===================================================================
> > --- linux-2.6.orig/fs/super.c 2010-10-19 14:17:17.000000000 +1100
> > +++ linux-2.6/fs/super.c 2010-10-19 14:18:59.000000000 +1100
> > @@ -67,12 +67,25 @@
> > for_each_possible_cpu(i)
> > INIT_LIST_HEAD(per_cpu_ptr(s->s_files, i));
> > }
> > + s->s_inodes = alloc_percpu(struct list_head);
> > + if (!s->s_inodes) {
> > + free_percpu(s->s_files);
> > + security_sb_free(s);
> > + kfree(s);
> > + s = NULL;
> > + goto out;
>
> Factor out error cleanups to separate out labels?
OK... probably makes sense at this point.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/