All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shi, Yang" <yang.shi@linaro.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com,
	aarcange@redhat.com, hughd@google.com, mgorman@suse.de,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linaro-kernel@lists.linaro.org
Subject: Re: [PATCH] mm: move huge_pmd_set_accessed out of huge_memory.c
Date: Fri, 29 Apr 2016 11:09:36 -0700	[thread overview]
Message-ID: <0357941c-d7ce-3ba9-c24f-9d2599429a8a@linaro.org> (raw)
In-Reply-To: <20160422094815.GB7336@node.shutemov.name>

On 4/22/2016 2:48 AM, Kirill A. Shutemov wrote:
> On Thu, Apr 21, 2016 at 03:56:07PM -0700, Shi, Yang wrote:
>> On 4/21/2016 12:30 AM, Kirill A. Shutemov wrote:
>>> On Wed, Apr 20, 2016 at 02:00:11PM -0700, Shi, Yang wrote:
>>>> Hi folks,
>>>>
>>>> I didn't realize pmd_* functions are protected by
>>>> CONFIG_TRANSPARENT_HUGEPAGE on the most architectures before I made this
>>>> change.
>>>>
>>>> Before I fix all the affected architectures code, I want to check if you
>>>> guys think this change is worth or not?
>>>>
>>>> Thanks,
>>>> Yang
>>>>
>>>> On 4/20/2016 11:24 AM, Yang Shi wrote:
>>>>> huge_pmd_set_accessed is only called by __handle_mm_fault from memory.c,
>>>>> move the definition to memory.c and make it static like create_huge_pmd and
>>>>> wp_huge_pmd.
>>>>>
>>>>> Signed-off-by: Yang Shi <yang.shi@linaro.org>
>>>
>>> On pte side we have the same functionality open-coded. Should we do the
>>> same for pmd? Or change pte side the same way?
>>
>> Sorry, I don't quite understand you. Do you mean pte_* functions?
>
> See handle_pte_fault(), we do the same for pte there what
> huge_pmd_set_accessed() does for pmd.

Thanks for directing to this code.

>
> I think we should be consistent here: either both are abstructed into
> functions or both open-coded.

I'm supposed functions sound better. However, do_wp_page has to be 
called with pte lock acquired. So, the abstracted function has to call it.

Thanks,
Yang


>

WARNING: multiple messages have this Message-ID (diff)
From: "Shi, Yang" <yang.shi@linaro.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com,
	aarcange@redhat.com, hughd@google.com, mgorman@suse.de,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linaro-kernel@lists.linaro.org
Subject: Re: [PATCH] mm: move huge_pmd_set_accessed out of huge_memory.c
Date: Fri, 29 Apr 2016 11:09:36 -0700	[thread overview]
Message-ID: <0357941c-d7ce-3ba9-c24f-9d2599429a8a@linaro.org> (raw)
In-Reply-To: <20160422094815.GB7336@node.shutemov.name>

On 4/22/2016 2:48 AM, Kirill A. Shutemov wrote:
> On Thu, Apr 21, 2016 at 03:56:07PM -0700, Shi, Yang wrote:
>> On 4/21/2016 12:30 AM, Kirill A. Shutemov wrote:
>>> On Wed, Apr 20, 2016 at 02:00:11PM -0700, Shi, Yang wrote:
>>>> Hi folks,
>>>>
>>>> I didn't realize pmd_* functions are protected by
>>>> CONFIG_TRANSPARENT_HUGEPAGE on the most architectures before I made this
>>>> change.
>>>>
>>>> Before I fix all the affected architectures code, I want to check if you
>>>> guys think this change is worth or not?
>>>>
>>>> Thanks,
>>>> Yang
>>>>
>>>> On 4/20/2016 11:24 AM, Yang Shi wrote:
>>>>> huge_pmd_set_accessed is only called by __handle_mm_fault from memory.c,
>>>>> move the definition to memory.c and make it static like create_huge_pmd and
>>>>> wp_huge_pmd.
>>>>>
>>>>> Signed-off-by: Yang Shi <yang.shi@linaro.org>
>>>
>>> On pte side we have the same functionality open-coded. Should we do the
>>> same for pmd? Or change pte side the same way?
>>
>> Sorry, I don't quite understand you. Do you mean pte_* functions?
>
> See handle_pte_fault(), we do the same for pte there what
> huge_pmd_set_accessed() does for pmd.

Thanks for directing to this code.

>
> I think we should be consistent here: either both are abstructed into
> functions or both open-coded.

I'm supposed functions sound better. However, do_wp_page has to be 
called with pte lock acquired. So, the abstracted function has to call it.

Thanks,
Yang


>

--
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-04-29 18:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 18:24 [PATCH] mm: move huge_pmd_set_accessed out of huge_memory.c Yang Shi
2016-04-20 18:24 ` Yang Shi
2016-04-20 19:04 ` kbuild test robot
2016-04-20 19:04   ` kbuild test robot
2016-04-20 19:09 ` kbuild test robot
2016-04-20 19:09   ` kbuild test robot
2016-04-20 19:20 ` kbuild test robot
2016-04-20 19:20   ` kbuild test robot
2016-04-20 21:00 ` Shi, Yang
2016-04-20 21:00   ` Shi, Yang
2016-04-21  7:30   ` Kirill A. Shutemov
2016-04-21  7:30     ` Kirill A. Shutemov
2016-04-21 22:56     ` Shi, Yang
2016-04-21 22:56       ` Shi, Yang
2016-04-22  9:48       ` Kirill A. Shutemov
2016-04-22  9:48         ` Kirill A. Shutemov
2016-04-29 18:09         ` Shi, Yang [this message]
2016-04-29 18:09           ` Shi, Yang
2016-04-21  9:15   ` Hugh Dickins
2016-04-21  9:15     ` Hugh Dickins
2016-04-21 22:57     ` Shi, Yang
2016-04-21 22:57       ` Shi, Yang

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=0357941c-d7ce-3ba9-c24f-9d2599429a8a@linaro.org \
    --to=yang.shi@linaro.org \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    /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.