[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d2e02f8-c7da-ee1a-1068-25492cbffebe@sandisk.com>
Date: Wed, 10 Aug 2016 12:58:42 -0700
From: Bart Van Assche <bart.vanassche@...disk.com>
To: Oleg Nesterov <oleg@...hat.com>
CC: Peter Zijlstra <peterz@...radead.org>,
"mingo@...nel.org" <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Johannes Weiner" <hannes@...xchg.org>, Neil Brown <neilb@...e.de>,
Michael Shaver <jmshaver@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs
On 08/10/2016 03:46 AM, Oleg Nesterov wrote:
> OK. Could you try another debugging patch below?
>
> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> index e5a3244..9d5f892 100644
> --- a/include/linux/page-flags.h
> +++ b/include/linux/page-flags.h
> @@ -711,6 +711,15 @@ static inline int page_has_private(struct page *page)
> return !!(page->flags & PAGE_FLAGS_PRIVATE);
> }
>
> +void unlock_page(struct page *page);
> +static inline void __ClearPageLocked_x(struct page *page)
> +{
> + if (PageLocked(compound_head(page)))
> + unlock_page(page);
> +}
> +
> +#define __ClearPageLocked(page) __ClearPageLocked_x(page)
> +
> #undef PF_ANY
> #undef PF_HEAD
> #undef PF_NO_TAIL
Hello Oleg,
That's an excellent catch. With your previous patch and this patch
applied I can't reproduce the hang in truncate_inode_pages_range()
anymore. I still see some other wait_on_page_bit() hangs after an I/O
error has occurred. However, the hangs that I still see are related to
waiting on buffer head state changes and not on the PG_locked page flag.
Thanks,
Bart.
Powered by blists - more mailing lists