linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Keno Fischer <keno@juliacomputing.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	torvalds@linux-foundation.org, Greg Thelen <gthelen@google.com>,
	npiggin@gmail.com, Willy Tarreau <w@1wt.eu>,
	Oleg Nesterov <oleg@redhat.com>,
	Kees Cook <keescook@chromium.org>,
	luto@kernel.org, mhocko@suse.com, Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH] mm: Respect FOLL_FORCE/FOLL_COW for thp
Date: Thu, 5 Jan 2017 16:06:06 -0500	[thread overview]
Message-ID: <CABV8kRwUvNjyYPc3+yjQ6pzXoJj9HM3K4Mq_1cZc9sWzpjPEzQ@mail.gmail.com> (raw)
In-Reply-To: <20170105150558.GE17319@node.shutemov.name>

>> @@ -783,7 +793,7 @@ struct page *follow_devmap_pmd(struct vm_area_struct *vma, unsigned long addr,
>>
>>       assert_spin_locked(pmd_lockptr(mm, pmd));
>>
>> -     if (flags & FOLL_WRITE && !pmd_write(*pmd))
>> +     if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags))
>>               return NULL;
>
> I don't think this part is needed: once we COW devmap PMD entry, we split
> it into PTE table, so IIUC we never get here with PMD.
>
> Maybe we should WARN_ONCE() if have FOLL_COW here.

Sounds good to me. As I said, I don't have a testcase for this code
path, I just noticed the same pattern.
Will send an updated patch with the WARN_ONCE there.

--
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:[~2017-01-05 21:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05  5:36 Keno Fischer
2017-01-05 15:05 ` Kirill A. Shutemov
2017-01-05 21:06   ` Keno Fischer [this message]
2017-01-11  5:41   ` Hugh Dickins
2017-01-11  7:06     ` Hugh Dickins
2017-01-11 11:35       ` Kirill A. Shutemov

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=CABV8kRwUvNjyYPc3+yjQ6pzXoJj9HM3K4Mq_1cZc9sWzpjPEzQ@mail.gmail.com \
    --to=keno@juliacomputing.com \
    --cc=gthelen@google.com \
    --cc=hughd@google.com \
    --cc=keescook@chromium.org \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mhocko@suse.com \
    --cc=npiggin@gmail.com \
    --cc=oleg@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=w@1wt.eu \
    /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