From: "gux.fnst" <gux.fnst@cn.fujitsu.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: linux-mm@kvack.org
Subject: Re: ask for your help about a patch (commit: 9845cbb)
Date: Tue, 15 Apr 2014 09:02:44 +0800 [thread overview]
Message-ID: <534C8534.6080008@cn.fujitsu.com> (raw)
In-Reply-To: <20140414103747.70943E0098@blue.fi.intel.com>
On 04/14/2014 06:37 PM, Kirill A. Shutemov wrote:
> gux.fnst wrote:
>> Hi Kirill,
> Hi Xing,
>
> Please always CC to mailing list for upstream-related questions.
> I've added linux-mm@ to CC.
OK, got it.
> VM_FAULT_FALLBACK is
> fallback required.
> ---------------------------------------------------------------------------------------------------------------------------
>
> It is a little difficult to reproduce this problem fixed by this patch
> for me. Could you give me some
> hint about how to do this - “allocate a huge page to replace zero page
> but hit the memcg limit"?
> I used this script:
>
> #!/bin/sh -efu
>
> set -efux
>
> mount -t cgroup none /sys/fs/cgroup
> mkdir /sys/fs/cgroup/test
> echo "10M" > /sys/fs/cgroup/test/memory.limit_in_bytes
> echo "10M" > /sys/fs/cgroup/test/memory.memsw.limit_in_bytes
>
> echo $$ > /sys/fs/cgroup/test/tasks
> /host/home/kas/var/mmaptest_zero
> echo ok
>
> Where /host/home/kas/var/mmaptest_zero is:
>
> #include <assert.h>
> #include <fcntl.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> #include <sys/types.h>
> #include <sys/mman.h>
>
> #define MB (1024 * 1024)
> #define SIZE (256 * MB)
>
> int main(int argc, char **argv)
> {
> int i;
> char *p;
>
> posix_memalign((void **)&p, 2 * MB, SIZE);
> printf("p: %p\n", p);
> fork();
> for (i = 0; i < SIZE; i += 4096)
> assert(p[i] == 0);
>
> for (i = 0; i < SIZE; i += 4096)
> p[i] = 1;
>
> pause();
> return 0;
> }
>
> Without the patch it hangs, but should trigger OOM.
>
Thank you very much.
Regards,
Xing Gu
--
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>
prev parent reply other threads:[~2014-04-15 1:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <534B46FE.1070704@cn.fujitsu.com>
2014-04-14 10:37 ` ask for your help about a patch (commit: 9845cbb) Kirill A. Shutemov
2014-04-15 1:02 ` gux.fnst [this message]
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=534C8534.6080008@cn.fujitsu.com \
--to=gux.fnst@cn.fujitsu.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
/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.