mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	David Rientjes <rientjes@google.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Tejun Heo <tj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [Patch] x86,mm: check freeze request in page fault handler
Date: Wed, 13 Aug 2014 11:36:13 +0200	[thread overview]
Message-ID: <20140813093613.GB2775@dhcp22.suse.cz> (raw)
In-Reply-To: <CAM_iQpWV8DRGBQ-Brz=_Nqen0fNPDk+6kn_Og3HnXnujmgA+JA@mail.gmail.com>

On Tue 12-08-14 17:47:02, Cong Wang wrote:
[...]
> Does the following updated patch make any sense to you? If not, I will just
> drop it.

Not really to be honest. I do not see what problem you are trying to fix.

> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index a241946..8c0a7d8 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -14,6 +14,7 @@
>  #include <linux/hugetlb.h>             /* hstate_index_to_shift        */
>  #include <linux/prefetch.h>            /* prefetchw                    */
>  #include <linux/context_tracking.h>    /* exception_enter(), ...       */
> +#include <linux/freezer.h>             /* try_to_freeze()              */
> 
>  #include <asm/traps.h>                 /* dotraplinkage, ...           */
>  #include <asm/pgalloc.h>               /* pgd_*(), ...                 */
> @@ -904,6 +905,9 @@ mm_fault_error(struct pt_regs *regs, unsigned long
> error_code,
>                  * oom-killed):
>                  */
>                 pagefault_out_of_memory();
> +
> +               if (signal_pending(current))
> +                       try_to_freeze();
>         } else {
>                 if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
>                              VM_FAULT_HWPOISON_LARGE))

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2014-08-13  9:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12  0:53 [Patch v2] freezer: check OOM kill while being frozen Cong Wang
2014-08-12  0:53 ` [Patch] x86,mm: check freeze request in page fault handler Cong Wang
2014-08-12 12:09   ` Michal Hocko
2014-08-13  0:47     ` Cong Wang
2014-08-13  9:36       ` Michal Hocko [this message]
2014-08-14  0:26         ` Cong Wang
2014-08-15  8:36           ` Michal Hocko
2014-08-12 11:44 ` [Patch v2] freezer: check OOM kill while being frozen Michal Hocko
2014-08-13  0:53   ` Cong Wang
2014-08-13  9:26     ` Michal Hocko
2014-08-14  0:16       ` Cong Wang

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=20140813093613.GB2775@dhcp22.suse.cz \
    --to=mhocko@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rientjes@google.com \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=xiyou.wangcong@gmail.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

all inboxes | Powered by JetHome®