On Thu, 4 May 2000, Rik van Riel wrote:
>On Thu, 4 May 2000, Andrea Arcangeli wrote:
>
>> --- 2.2.15/mm/filemap.c Thu May 4 13:00:40 2000
^^^^^^
>> +++ /tmp/filemap.c Thu May 4 17:11:18 2000
>> @@ -68,7 +68,7 @@
>>
>> p = &inode->i_pages;
>> while ((page = *p) != NULL) {
>> - if (PageLocked(page)) {
>> + if (PageLocked(page) || atomic_read(&page->count) > 1) {
>> p = &page->next;
>> continue;
>> }
XXXXXXXXXXXXXXXX
>
>Fun, fun, fun ...
>
>So the other CPU takes a lock on the page while we're testing
>for the page->count and increments the pagecount after the lock,
>while we try to do something (call __free_page(page)?) with the
>page ...
You're obviously wrong:
1) the other cpu on 2.2.15 were spinning on the big kernel lock
and had no way to try to lock down the page we're processing.
2) if what you described above would be true, then virgin 2.2.15 and
all the 2.2.x official/unofficial kernels out there would
have a major SMP race anyway (not thanks to my above fix) because it
would mean that in point XXXXXXXXXXXXXXXXX the page could become locked
from under us.
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:15 EST