All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Andres Lagar-Cavilla <andreslc@google.com>,
	Vladimir Davydov <vdavydov@parallels.com>,
	kvm@vger.kernel.org, Eric Northup <digitaleric@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan@kernel.org>,
	Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@suse.cz>, Greg Thelen <gthelen@google.com>,
	Michel Lespinasse <walken@google.com>,
	David Rientjes <rientjes@google.com>,
	Pavel Emelyanov <xemul@parallels.com>,
	Cyrill Gorcunov <gorcunov@openvz.org>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-api@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm v8 5/7] mmu-notifier: add clear_young callback
Date: Thu, 16 Jul 2015 13:35:02 +0200	[thread overview]
Message-ID: <55A796E6.3090603@redhat.com> (raw)
In-Reply-To: <CAJu=L58yzBr8+XaV90x+S60YnJzd7Yr2fDEgaQ0bcCKpwzSAhw@mail.gmail.com>



On 15/07/2015 21:16, Andres Lagar-Cavilla wrote:
>> > +static int kvm_mmu_notifier_clear_young(struct mmu_notifier *mn,
>> > +                                       struct mm_struct *mm,
>> > +                                       unsigned long start,
>> > +                                       unsigned long end)
>> > +{
>> > +       struct kvm *kvm = mmu_notifier_to_kvm(mn);
>> > +       int young, idx;
> For reclaim, the clear_flush_young notifier may blow up the secondary
> pte to estimate the access pattern, depending on hardware support (EPT
> access bits available in Haswell onwards, not sure about AMD, PPC,
> etc).

It seems like this problem is limited to pre-Haswell EPT.

I'm okay with the patch.  If we find problems later we can always add a
parameter to kvm_age_hva so that it effectively doesn't do anything on
clear_young.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

--
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: Paolo Bonzini <pbonzini@redhat.com>
To: Andres Lagar-Cavilla <andreslc@google.com>,
	Vladimir Davydov <vdavydov@parallels.com>,
	kvm@vger.kernel.org, Eric Northup <digitaleric@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan@kernel.org>,
	Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@suse.cz>, Greg Thelen <gthelen@google.com>,
	Michel Lespinasse <walken@google.com>,
	David Rientjes <rientjes@google.com>,
	Pavel Emelyanov <xemul@parallels.com>,
	Cyrill Gorcunov <gorcunov@openvz.org>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-api@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm v8 5/7] mmu-notifier: add clear_young callback
Date: Thu, 16 Jul 2015 13:35:02 +0200	[thread overview]
Message-ID: <55A796E6.3090603@redhat.com> (raw)
In-Reply-To: <CAJu=L58yzBr8+XaV90x+S60YnJzd7Yr2fDEgaQ0bcCKpwzSAhw@mail.gmail.com>



On 15/07/2015 21:16, Andres Lagar-Cavilla wrote:
>> > +static int kvm_mmu_notifier_clear_young(struct mmu_notifier *mn,
>> > +                                       struct mm_struct *mm,
>> > +                                       unsigned long start,
>> > +                                       unsigned long end)
>> > +{
>> > +       struct kvm *kvm = mmu_notifier_to_kvm(mn);
>> > +       int young, idx;
> For reclaim, the clear_flush_young notifier may blow up the secondary
> pte to estimate the access pattern, depending on hardware support (EPT
> access bits available in Haswell onwards, not sure about AMD, PPC,
> etc).

It seems like this problem is limited to pre-Haswell EPT.

I'm okay with the patch.  If we find problems later we can always add a
parameter to kvm_age_hva so that it effectively doesn't do anything on
clear_young.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

  reply	other threads:[~2015-07-16 11:35 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 13:54 [PATCH -mm v8 0/7] idle memory tracking Vladimir Davydov
2015-07-15 13:54 ` Vladimir Davydov
2015-07-15 13:54 ` Vladimir Davydov
2015-07-15 13:54 ` [PATCH -mm v8 1/7] memcg: add page_cgroup_ino helper Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
     [not found]   ` <40a2af5afc7b70a133737226cd9e975df42936e7.1436967694.git.vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2015-07-15 18:59     ` Andres Lagar-Cavilla
2015-07-15 18:59       ` Andres Lagar-Cavilla
2015-07-15 18:59       ` Andres Lagar-Cavilla
2015-07-15 13:54 ` [PATCH -mm v8 2/7] hwpoison: use page_cgroup_ino for filtering by memcg Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
     [not found]   ` <5c4d3594a5b0a79248fffae67ea677d54d06aacf.1436967694.git.vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2015-07-15 19:00     ` Andres Lagar-Cavilla
2015-07-15 19:00       ` Andres Lagar-Cavilla
2015-07-15 19:00       ` Andres Lagar-Cavilla
2015-07-15 13:54 ` [PATCH -mm v8 3/7] memcg: zap try_get_mem_cgroup_from_page Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
2015-07-15 13:54 ` [PATCH -mm v8 4/7] proc: add kpagecgroup file Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
2015-07-15 19:03   ` Andres Lagar-Cavilla
2015-07-15 19:03     ` Andres Lagar-Cavilla
     [not found]     ` <CAJu=L58kZW2WRpx8wLx=FXdS29BJ+euLRdDcTXJKwf-VLT6SCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-16  9:28       ` Vladimir Davydov
2015-07-16  9:28         ` Vladimir Davydov
2015-07-16  9:28         ` Vladimir Davydov
2015-07-16 19:04         ` Andres Lagar-Cavilla
     [not found]           ` <CAJu=L5_AUFv=Bh2WiWwOsMx41z_X0cAum_WkNikSE4Bo0r+wfQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-17  9:27             ` Vladimir Davydov
2015-07-17  9:27               ` Vladimir Davydov
2015-07-17  9:27               ` Vladimir Davydov
2015-07-15 13:54 ` [PATCH -mm v8 5/7] mmu-notifier: add clear_young callback Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
2015-07-15 19:16   ` Andres Lagar-Cavilla
2015-07-15 19:16     ` Andres Lagar-Cavilla
2015-07-16 11:35     ` Paolo Bonzini [this message]
2015-07-16 11:35       ` Paolo Bonzini
2015-07-15 13:54 ` [PATCH -mm v8 6/7] proc: add kpageidle file Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
     [not found]   ` <a414d0458156434ca428c0c810db2e86878e1897.1436967694.git.vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2015-07-15 19:42     ` Andres Lagar-Cavilla
2015-07-15 19:42       ` Andres Lagar-Cavilla
2015-07-15 19:42       ` Andres Lagar-Cavilla
2015-07-16  9:53       ` Vladimir Davydov
2015-07-16  9:53         ` Vladimir Davydov
2015-07-15 13:54 ` [PATCH -mm v8 7/7] proc: export idle flag via kpageflags Vladimir Davydov
2015-07-15 13:54   ` Vladimir Davydov
     [not found]   ` <024b60a19e5ef246c9af3c5ff7652e71576e0bcc.1436967694.git.vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2015-07-15 19:17     ` Andres Lagar-Cavilla
2015-07-15 19:17       ` Andres Lagar-Cavilla
2015-07-15 19:17       ` Andres Lagar-Cavilla
2015-07-15 20:47 ` [PATCH -mm v8 0/7] idle memory tracking Andres Lagar-Cavilla
2015-07-15 20:47   ` Andres Lagar-Cavilla
     [not found]   ` <CAJu=L59MjY4F4G2bZh+hrt7aqw3R9mWPeYK65smQWUvMhz85aA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-16 10:02     ` Vladimir Davydov
2015-07-16 10:02       ` Vladimir Davydov
2015-07-16 10:02       ` Vladimir Davydov

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=55A796E6.3090603@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreslc@google.com \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=digitaleric@google.com \
    --cc=gorcunov@openvz.org \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=minchan@kernel.org \
    --cc=raghavendra.kt@linux.vnet.ibm.com \
    --cc=rientjes@google.com \
    --cc=vdavydov@parallels.com \
    --cc=walken@google.com \
    --cc=xemul@parallels.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.