« Return to Thread: sk_lock: inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage

Re: sk_lock: inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage

by KOSAKI Motohiro :: Rate this Message:

Reply to Author | View in Thread

Hi

> Hi,
>
> This lockdep warning appears when doing stress memory tests over NFS.
>
> page reclaim => nfs_writepage => tcp_sendmsg => lock sk_lock
>
> tcp_close => lock sk_lock => tcp_send_fin => alloc_skb_fclone => page reclaim
>
> Any ideas?

AFAIK, btrfs has re-dirty hack.

------------------------------------------------------------------
static int btrfs_writepage(struct page *page, struct writeback_control *wbc)
{
        struct extent_io_tree *tree;


        if (current->flags & PF_MEMALLOC) {
                redirty_page_for_writepage(wbc, page);
                unlock_page(page);
                return 0;
        }
        tree = &BTRFS_I(page->mapping->host)->io_tree;
        return extent_write_full_page(tree, page, btrfs_get_extent, wbc);
}
---------------------------------------------------------------

PF_MEMALLOC mean caller is try_to_free_pages(). (not normal write nor kswapd)
Can't nfs does similar hack?


I'm not net nor nfs expert. perhaps I'm wrong :-)


Thanks.



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

 « Return to Thread: sk_lock: inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage