From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Ying Han <yinghan@google.com>
Cc: Paul Menage <menage@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm <akpm@linux-foundation.org>,
David Rientjes <rientjes@google.com>,
Rohit Seth <rohitseth@google.com>
Subject: Re: [PATCH][V3]Make get_user_pages interruptible
Date: Tue, 25 Nov 2008 00:45:23 +0200 [thread overview]
Message-ID: <492B2E83.7010605@cs.helsinki.fi> (raw)
In-Reply-To: <604427e00811241350j25b7b483p1d171ea1b5b6f8bf@mail.gmail.com>
Ying Han wrote:
> thanks Pekka and i think one example of the case you mentioned is in
> access_process_vm() which is calling
> get_user_pages(tsk, mm, addr, 1, write, 1, &pages, &vma). However, it
> is allocating only one page here which
> much less likely to be stuck under memory pressure. Like you said, in
> order to make it more flexible for future
> changes, i might make the change like:
>>>>> */
>>>>> - if (unlikely(test_tsk_thread_flag(tsk, TIF_MEMDIE)))
>>>>> - return i ? i : -ENOMEM;
>>>>> + if (unlikely(sigkill_pending(current) | | sigkill_pending(tsk)))
>>>>> + return i ? i : -ERESTARTSYS;
>
> is this something acceptable?
The formatting is bit wacky but I'm certainly OK with the change.
WARNING: multiple messages have this Message-ID (diff)
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Ying Han <yinghan@google.com>
Cc: Paul Menage <menage@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm <akpm@linux-foundation.org>,
David Rientjes <rientjes@google.com>,
Rohit Seth <rohitseth@google.com>
Subject: Re: [PATCH][V3]Make get_user_pages interruptible
Date: Tue, 25 Nov 2008 00:45:23 +0200 [thread overview]
Message-ID: <492B2E83.7010605@cs.helsinki.fi> (raw)
In-Reply-To: <604427e00811241350j25b7b483p1d171ea1b5b6f8bf@mail.gmail.com>
Ying Han wrote:
> thanks Pekka and i think one example of the case you mentioned is in
> access_process_vm() which is calling
> get_user_pages(tsk, mm, addr, 1, write, 1, &pages, &vma). However, it
> is allocating only one page here which
> much less likely to be stuck under memory pressure. Like you said, in
> order to make it more flexible for future
> changes, i might make the change like:
>>>>> */
>>>>> - if (unlikely(test_tsk_thread_flag(tsk, TIF_MEMDIE)))
>>>>> - return i ? i : -ENOMEM;
>>>>> + if (unlikely(sigkill_pending(current) | | sigkill_pending(tsk)))
>>>>> + return i ? i : -ERESTARTSYS;
>
> is this something acceptable?
The formatting is bit wacky but I'm certainly OK with the change.
--
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>
next prev parent reply other threads:[~2008-11-24 22:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-22 1:31 [PATCH][V3]Make get_user_pages interruptible Ying Han
2008-11-22 1:31 ` Ying Han, Paul Menage
2008-11-24 20:02 ` Paul Menage
2008-11-24 20:02 ` Paul Menage
2008-11-24 20:55 ` Pekka Enberg
2008-11-24 20:55 ` Pekka Enberg
2008-11-24 21:02 ` Ying Han
2008-11-24 21:02 ` Ying Han
2008-11-24 21:13 ` Pekka Enberg
2008-11-24 21:13 ` Pekka Enberg
2008-11-24 21:50 ` Ying Han
2008-11-24 21:50 ` Ying Han
2008-11-24 22:45 ` Pekka Enberg [this message]
2008-11-24 22:45 ` Pekka Enberg
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=492B2E83.7010605@cs.helsinki.fi \
--to=penberg@cs.helsinki.fi \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=menage@google.com \
--cc=rientjes@google.com \
--cc=rohitseth@google.com \
--cc=yinghan@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.