From: Andrew Morton <akpm@linux-foundation.org>
To: Michel Lespinasse <walken@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>,
Hugh Dickins <hughd@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] mm: use long type for page counts in mm_populate() and get_user_pages()
Date: Wed, 30 Jan 2013 16:42:20 -0800 [thread overview]
Message-ID: <20130130164220.eaebcb6a.akpm@linux-foundation.org> (raw)
In-Reply-To: <1359591980-29542-2-git-send-email-walken@google.com>
On Wed, 30 Jan 2013 16:26:18 -0800
Michel Lespinasse <walken@google.com> wrote:
> Use long type for page counts in mm_populate() so as to avoid integer
> overflow
Would prefer to use unsigned long if we're churning this code. A "page
count" can never be negative and we avoid the various possible
overflow/signedness issues.
However get_user_pages() and follow_hugetlb_page() return "page count
or -ve errno", so we're somewhat screwed there. And that's the bulk of
the patch :(
btw, what twit merged a follow_hugetlb_page() which takes an
undocumented argument called "i". Sigh.
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Michel Lespinasse <walken@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>,
Hugh Dickins <hughd@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] mm: use long type for page counts in mm_populate() and get_user_pages()
Date: Wed, 30 Jan 2013 16:42:20 -0800 [thread overview]
Message-ID: <20130130164220.eaebcb6a.akpm@linux-foundation.org> (raw)
In-Reply-To: <1359591980-29542-2-git-send-email-walken@google.com>
On Wed, 30 Jan 2013 16:26:18 -0800
Michel Lespinasse <walken@google.com> wrote:
> Use long type for page counts in mm_populate() so as to avoid integer
> overflow
Would prefer to use unsigned long if we're churning this code. A "page
count" can never be negative and we avoid the various possible
overflow/signedness issues.
However get_user_pages() and follow_hugetlb_page() return "page count
or -ve errno", so we're somewhat screwed there. And that's the bulk of
the patch :(
btw, what twit merged a follow_hugetlb_page() which takes an
undocumented argument called "i". Sigh.
next prev parent reply other threads:[~2013-01-31 0:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-31 0:26 [PATCH 0/3] fixes for large mm_populate() and munlock() operations Michel Lespinasse
2013-01-31 0:26 ` Michel Lespinasse
2013-01-31 0:26 ` [PATCH 1/3] mm: use long type for page counts in mm_populate() and get_user_pages() Michel Lespinasse
2013-01-31 0:26 ` Michel Lespinasse
2013-01-31 0:42 ` Andrew Morton [this message]
2013-01-31 0:42 ` Andrew Morton
2013-02-07 0:39 ` Sasha Levin
2013-02-07 0:39 ` Sasha Levin
2013-02-07 1:10 ` Andrew Morton
2013-02-07 1:10 ` Andrew Morton
2013-02-07 1:16 ` Sasha Levin
2013-02-07 1:16 ` Sasha Levin
2013-02-07 21:35 ` Michel Lespinasse
2013-02-07 21:35 ` Michel Lespinasse
2013-01-31 0:26 ` [PATCH 2/3] mm: accelerate mm_populate() treatment of THP pages Michel Lespinasse
2013-01-31 0:26 ` Michel Lespinasse
2013-01-31 3:05 ` Hugh Dickins
2013-01-31 3:05 ` Hugh Dickins
2013-01-31 4:27 ` Michel Lespinasse
2013-01-31 4:27 ` Michel Lespinasse
2013-02-02 0:08 ` Andrew Morton
2013-02-02 0:08 ` Andrew Morton
2013-01-31 0:26 ` [RFC PATCH 3/3] mm: accelerate munlock() " Michel Lespinasse
2013-01-31 0:26 ` Michel Lespinasse
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=20130130164220.eaebcb6a.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aarcange@redhat.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=walken@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.