linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Jan Kara <jack@suse.cz>,
	Hugh Dickins <hughd@google.com>, Oleg Nesterov <oleg@redhat.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] do_generic_file_read(): Fail immediately if killed
Date: Wed, 17 Aug 2016 12:01:56 +0200	[thread overview]
Message-ID: <20160817100156.GA6254@quack2.suse.cz> (raw)
In-Reply-To: <63068e8e-8bee-b208-8441-a3c39a9d9eb6@sandisk.com>

On Tue 16-08-16 17:00:43, Bart Van Assche wrote:
> If a fatal signal has been received, fail immediately instead of
> trying to read more data.
> 
> See also commit ebded02788b5 ("mm: filemap: avoid unnecessary
> calls to lock_page when waiting for IO to complete during a read")
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Cc: Mel Gorman <mgorman@techsingularity.net>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Hugh Dickins <hughd@google.com>
> Cc: Oleg Nesterov <oleg@redhat.com>

The patch looks good to me. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

BTW: Did you see some real world impact of the change? If yes, it would be
good to describe in the changelog.

								Honza
> ---
>  mm/filemap.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 2a9e84f6..bd8ab63 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1721,7 +1721,9 @@ find_page:
>  			 * wait_on_page_locked is used to avoid unnecessarily
>  			 * serialisations and why it's safe.
>  			 */
> -			wait_on_page_locked_killable(page);
> +			error = wait_on_page_locked_killable(page);
> +			if (unlikely(error))
> +				goto readpage_error;
>  			if (PageUptodate(page))
>  				goto page_ok;
>  
> -- 
> 2.9.2
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-08-17 10:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17  0:00 [PATCH] do_generic_file_read(): Fail immediately if killed Bart Van Assche
2016-08-17 10:01 ` Jan Kara [this message]
2016-08-17 16:23   ` Bart Van Assche
2016-08-17 13:48 ` Oleg Nesterov
2016-08-17 17:20 ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160817100156.GA6254@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=bart.vanassche@sandisk.com \
    --cc=hughd@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=oleg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).