lkml.org 
[lkml]   [2000]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.4.0-test8] mm/filemap.c
Also sprach David Mansfield:
} Bill Wendling wrote:
} >
} > Hi Linus,
} >
} > Here's a small optimization for the mm/filemap.c file.
} >
} > - The `head = &mapping->pages;' statement is useless inside the
} > repeat, since head isn't modified inside the loop.
} > - The `curr = curr->next;' statement doesn't need to be executed
} > if the repeat is taken. I changed the while() into a for() loop
} > to accomodate this better.
} >
}
} I spotted the curr = curr->next thing yesterday, too! I think you're
} right on that one. But I'm not sure about the head = &mapping thing.
} The reason we jump back here is that we've been outside the spinlock'ed
} critical section. Is it possible for the &mapping->pages to change
} during this period of time (when spinlock isn't held?), if not, your
} patch is ok. If it could change, we need to re-initialize head because
} it could have changed while we didn't have the lock locked.
}
Doh...Yeah. But...Shouldn't the `head = &mapping->pages;' thing be inside
of a spinlock if &mapping->pages could change? Say it changed between the
assignment and the function grabbing the lock?

Does anyone else know better on this?

--
|| Bill Wendling wendling@ganymede.isdn.uiuc.edu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.970 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site