Linus Torvalds wrote:
>
> On Thu, 31 Jan 2002, Rik van Riel wrote:
> >
> > It's still a question whether we'll want to use 128 as
> > the branch factor or another number ... but I'm sure
> > somebody will figure that out (and it can be changed
> > later, it's just one define).
>
> Actually, I think the big question is whether somebody is willing to clean
> up and fix the "move_from_swap_cache()" issue with block_flushpage.
>
It appears that move_from_swap_cache() is in good company:
1: shmem_unuse_inode() calls delete_from_swap_cache under
spinlock, but delete_from_swap_cache() calls block_flushpage(),
which can sleep.
2: shmem_getpage_locked() calls delete_from_swap_cache() calls
block_flushpage() under info->lock.
3: zap_pte_range holds mm->page_table_lock, and calls
free_swap_and_cache() calls delete_from_swap_cache() calls
block_flushpage().
block_flushpage() can only sleep in the lock_buffer() in
discard_buffer(). It so happens that all three callers
are always using block_flushpage() against a locked
swapcache page, and (correct me if I'm wrong), it's
not possible for those buffers to be locked.
So we got lucky.
A short-term fix is to put a BIG FAT COMMENT over block_flushpage.
-
-
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/
This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:01:37 EST