* Re: [PATCH 0/3] Remove __online_page_set_limits()
From: Kirill A. Shutemov @ 2019-09-09 15:42 UTC (permalink / raw)
To: Souptick Joarder
Cc: kys, haiyangz, sthemmin, sashal, boris.ostrovsky, jgross,
sstabellini, akpm, david, osalvador, mhocko, pasha.tatashin,
dan.j.williams, richard.weiyang, cai, linux-hyperv, xen-devel,
linux-mm, linux-kernel
In-Reply-To: <cover.1567889743.git.jrdr.linux@gmail.com>
On Sun, Sep 08, 2019 at 03:17:01AM +0530, Souptick Joarder wrote:
> __online_page_set_limits() is a dummy function and an extra call
> to this can be avoided.
>
> As both of the callers are now removed, __online_page_set_limits()
> can be removed permanently.
>
> Souptick Joarder (3):
> hv_ballon: Avoid calling dummy function __online_page_set_limits()
> xen/ballon: Avoid calling dummy function __online_page_set_limits()
> mm/memory_hotplug.c: Remove __online_page_set_limits()
>
> drivers/hv/hv_balloon.c | 1 -
> drivers/xen/balloon.c | 1 -
> include/linux/memory_hotplug.h | 1 -
> mm/memory_hotplug.c | 5 -----
> 4 files changed, 8 deletions(-)
Do we really need 3 separate patches to remove 8 lines of code?
--
Kirill A. Shutemov
^ permalink raw reply
* [PATCH v1 3/3] mm/memory_hotplug: Remove __online_page_free() and __online_page_increment_counters()
From: David Hildenbrand @ 2019-09-09 11:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mm, Souptick Joarder, linux-hyperv, David Hildenbrand,
Andrew Morton, Oscar Salvador, Michal Hocko, Pavel Tatashin,
Wei Yang, Dan Williams, Qian Cai
In-Reply-To: <20190909114830.662-1-david@redhat.com>
Let's drop the now unused functions.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Oscar Salvador <osalvador@suse.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Qian Cai <cai@lca.pw>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
include/linux/memory_hotplug.h | 3 ---
mm/memory_hotplug.c | 12 ------------
2 files changed, 15 deletions(-)
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 71a620eabb62..933f2bb3bdbb 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -106,9 +106,6 @@ extern void generic_online_page(struct page *page, unsigned int order);
extern int set_online_page_callback(online_page_callback_t callback);
extern int restore_online_page_callback(online_page_callback_t callback);
-extern void __online_page_increment_counters(struct page *page);
-extern void __online_page_free(struct page *page);
-
extern int try_online_node(int nid);
extern int arch_add_memory(int nid, u64 start, u64 size,
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index f32a5feaf7ff..16dd5b1498e8 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -602,18 +602,6 @@ int restore_online_page_callback(online_page_callback_t callback)
}
EXPORT_SYMBOL_GPL(restore_online_page_callback);
-void __online_page_increment_counters(struct page *page)
-{
- adjust_managed_page_count(page, 1);
-}
-EXPORT_SYMBOL_GPL(__online_page_increment_counters);
-
-void __online_page_free(struct page *page)
-{
- __free_reserved_page(page);
-}
-EXPORT_SYMBOL_GPL(__online_page_free);
-
void generic_online_page(struct page *page, unsigned int order)
{
kernel_map_pages(page, 1 << order, 1);
--
2.21.0
^ permalink raw reply related
* [PATCH v1 2/3] hv_balloon: Use generic_online_page()
From: David Hildenbrand @ 2019-09-09 11:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mm, Souptick Joarder, linux-hyperv, David Hildenbrand,
K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Sasha Levin
In-Reply-To: <20190909114830.662-1-david@redhat.com>
Let's use the generic onlining function - which will now also take care
of calling kernel_map_pages().
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
drivers/hv/hv_balloon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index a91c90d4402c..35f123b459c8 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -680,8 +680,7 @@ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg)
__ClearPageOffline(pg);
/* This frame is currently backed; online the page. */
- __online_page_increment_counters(pg);
- __online_page_free(pg);
+ generic_online_page(pg, 0);
lockdep_assert_held(&dm_device.ha_lock);
dm_device.num_pages_onlined++;
--
2.21.0
^ permalink raw reply related
* [PATCH v1 1/3] mm/memory_hotplug: Export generic_online_page()
From: David Hildenbrand @ 2019-09-09 11:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mm, Souptick Joarder, linux-hyperv, David Hildenbrand,
Andrew Morton, Oscar Salvador, Michal Hocko, Pavel Tatashin,
Dan Williams, Wei Yang, Qian Cai
In-Reply-To: <20190909114830.662-1-david@redhat.com>
Let's expose generic_online_page() so online_page_callback users can
simply fallback to the generic implementation when actually deciding to
online the pages.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Oscar Salvador <osalvador@suse.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Qian Cai <cai@lca.pw>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
include/linux/memory_hotplug.h | 1 +
mm/memory_hotplug.c | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 8ee3a2ae5131..71a620eabb62 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -102,6 +102,7 @@ extern unsigned long __offline_isolated_pages(unsigned long start_pfn,
typedef void (*online_page_callback_t)(struct page *page, unsigned int order);
+extern void generic_online_page(struct page *page, unsigned int order);
extern int set_online_page_callback(online_page_callback_t callback);
extern int restore_online_page_callback(online_page_callback_t callback);
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 2f0d2908e235..f32a5feaf7ff 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -49,8 +49,6 @@
* and restore_online_page_callback() for generic callback restore.
*/
-static void generic_online_page(struct page *page, unsigned int order);
-
static online_page_callback_t online_page_callback = generic_online_page;
static DEFINE_MUTEX(online_page_callback_lock);
@@ -616,7 +614,7 @@ void __online_page_free(struct page *page)
}
EXPORT_SYMBOL_GPL(__online_page_free);
-static void generic_online_page(struct page *page, unsigned int order)
+void generic_online_page(struct page *page, unsigned int order)
{
kernel_map_pages(page, 1 << order, 1);
__free_pages_core(page, order);
@@ -626,6 +624,7 @@ static void generic_online_page(struct page *page, unsigned int order)
totalhigh_pages_add(1UL << order);
#endif
}
+EXPORT_SYMBOL_GPL(generic_online_page);
static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
void *arg)
--
2.21.0
^ permalink raw reply related
* [PATCH v1 0/3] mm/memory_hotplug: Export generic_online_page()
From: David Hildenbrand @ 2019-09-09 11:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mm, Souptick Joarder, linux-hyperv, David Hildenbrand,
Andrew Morton, Dan Williams, Haiyang Zhang, K. Y. Srinivasan,
Michal Hocko, Oscar Salvador, Pavel Tatashin, Qian Cai,
Sasha Levin, Stephen Hemminger, Wei Yang
Based on linux/next + "[PATCH 0/3] Remove __online_page_set_limits()"
Let's replace the __online_page...() functions by generic_online_page().
Hyper-V only wants to delay the actual onlining of un-backed pages, so we
can simpy re-use the generic function.
Only compile-tested.
Cc: Souptick Joarder <jrdr.linux@gmail.com>
David Hildenbrand (3):
mm/memory_hotplug: Export generic_online_page()
hv_balloon: Use generic_online_page()
mm/memory_hotplug: Remove __online_page_free() and
__online_page_increment_counters()
drivers/hv/hv_balloon.c | 3 +--
include/linux/memory_hotplug.h | 4 +---
mm/memory_hotplug.c | 17 ++---------------
3 files changed, 4 insertions(+), 20 deletions(-)
--
2.21.0
^ permalink raw reply
* Re: [PATCH 0/3] Remove __online_page_set_limits()
From: Michal Hocko @ 2019-09-09 8:12 UTC (permalink / raw)
To: Souptick Joarder
Cc: kys, haiyangz, sthemmin, sashal, boris.ostrovsky, jgross,
sstabellini, akpm, david, osalvador, pasha.tatashin,
dan.j.williams, richard.weiyang, cai, linux-hyperv, xen-devel,
linux-mm, linux-kernel
In-Reply-To: <cover.1567889743.git.jrdr.linux@gmail.com>
On Sun 08-09-19 03:17:01, Souptick Joarder wrote:
> __online_page_set_limits() is a dummy function and an extra call
> to this can be avoided.
>
> As both of the callers are now removed, __online_page_set_limits()
> can be removed permanently.
>
> Souptick Joarder (3):
> hv_ballon: Avoid calling dummy function __online_page_set_limits()
> xen/ballon: Avoid calling dummy function __online_page_set_limits()
> mm/memory_hotplug.c: Remove __online_page_set_limits()
>
> drivers/hv/hv_balloon.c | 1 -
> drivers/xen/balloon.c | 1 -
> include/linux/memory_hotplug.h | 1 -
> mm/memory_hotplug.c | 5 -----
> 4 files changed, 8 deletions(-)
To the whole series
Acked-by: Michal Hocko <mhocko@suse.com>
Thanks!
--
Michal Hocko
SUSE Labs
^ permalink raw reply
* Re: [PATCH 3/3] mm/memory_hotplug.c: Remove __online_page_set_limits()
From: David Hildenbrand @ 2019-09-09 7:54 UTC (permalink / raw)
To: Souptick Joarder, kys, haiyangz, sthemmin, sashal,
boris.ostrovsky, jgross, sstabellini, akpm, osalvador, mhocko,
pasha.tatashin, dan.j.williams, richard.weiyang, cai
Cc: linux-hyperv, xen-devel, linux-mm, linux-kernel
In-Reply-To: <9afe6c5a18158f3884a6b302ac2c772f3da49ccc.1567889743.git.jrdr.linux@gmail.com>
On 07.09.19 23:47, Souptick Joarder wrote:
> As both the callers of this dummy __online_page_set_limits()
> is removed, this can be removed permanently.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> include/linux/memory_hotplug.h | 1 -
> mm/memory_hotplug.c | 5 -----
> 2 files changed, 6 deletions(-)
>
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index f46ea71..8ee3a2a 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -105,7 +105,6 @@ extern unsigned long __offline_isolated_pages(unsigned long start_pfn,
> extern int set_online_page_callback(online_page_callback_t callback);
> extern int restore_online_page_callback(online_page_callback_t callback);
>
> -extern void __online_page_set_limits(struct page *page);
> extern void __online_page_increment_counters(struct page *page);
> extern void __online_page_free(struct page *page);
>
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index c73f099..dc0118f 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -604,11 +604,6 @@ int restore_online_page_callback(online_page_callback_t callback)
> }
> EXPORT_SYMBOL_GPL(restore_online_page_callback);
>
> -void __online_page_set_limits(struct page *page)
> -{
> -}
> -EXPORT_SYMBOL_GPL(__online_page_set_limits);
> -
> void __online_page_increment_counters(struct page *page)
> {
> adjust_managed_page_count(page, 1);
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply
* Re: [PATCH 2/3] xen/ballon: Avoid calling dummy function __online_page_set_limits()
From: David Hildenbrand @ 2019-09-09 7:54 UTC (permalink / raw)
To: Souptick Joarder, kys, haiyangz, sthemmin, sashal,
boris.ostrovsky, jgross, sstabellini, akpm, osalvador, mhocko,
pasha.tatashin, dan.j.williams, richard.weiyang, cai
Cc: linux-hyperv, xen-devel, linux-mm, linux-kernel
In-Reply-To: <854db2cf8145d9635249c95584d9a91fd774a229.1567889743.git.jrdr.linux@gmail.com>
On 07.09.19 23:47, Souptick Joarder wrote:
> __online_page_set_limits() is a dummy function and an extra call
> to this function can be avoided.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> drivers/xen/balloon.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
> index 4e11de6..05b1f7e 100644
> --- a/drivers/xen/balloon.c
> +++ b/drivers/xen/balloon.c
> @@ -376,7 +376,6 @@ static void xen_online_page(struct page *page, unsigned int order)
> mutex_lock(&balloon_mutex);
> for (i = 0; i < size; i++) {
> p = pfn_to_page(start_pfn + i);
> - __online_page_set_limits(p);
> __SetPageOffline(p);
> __balloon_append(p);
> }
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply
* Re: [PATCH 1/3] hv_ballon: Avoid calling dummy function __online_page_set_limits()
From: David Hildenbrand @ 2019-09-09 7:54 UTC (permalink / raw)
To: Souptick Joarder, kys, haiyangz, sthemmin, sashal,
boris.ostrovsky, jgross, sstabellini, akpm, osalvador, mhocko,
pasha.tatashin, dan.j.williams, richard.weiyang, cai
Cc: linux-hyperv, xen-devel, linux-mm, linux-kernel
In-Reply-To: <8e1bc9d3b492f6bde16e95ebc1dee11d6aefabd7.1567889743.git.jrdr.linux@gmail.com>
On 07.09.19 23:47, Souptick Joarder wrote:
> __online_page_set_limits() is a dummy function and an extra call
> to this function can be avoided.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> drivers/hv/hv_balloon.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
> index 6fb4ea5..9bab443 100644
> --- a/drivers/hv/hv_balloon.c
> +++ b/drivers/hv/hv_balloon.c
> @@ -680,7 +680,6 @@ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg)
> __ClearPageOffline(pg);
>
> /* This frame is currently backed; online the page. */
> - __online_page_set_limits(pg);
> __online_page_increment_counters(pg);
> __online_page_free(pg);
>
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply
* RE: [PATCH v5 0/9] Enhance the hv_vmbus driver to support hibernation
From: Dexuan Cui @ 2019-09-08 16:32 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-hyperv@vger.kernel.org, Stephen Hemminger, Sasha Levin,
Haiyang Zhang, KY Srinivasan, Michael Kelley, tglx@linutronix.de,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
In-Reply-To: <20190908121329.GD2012@sasha-vm>
> From: Sasha Levin <sashal@kernel.org>
> Sent: Sunday, September 8, 2019 5:13 AM
> On Fri, Sep 06, 2019 at 10:45:31PM +0000, Dexuan Cui wrote:
> >> From: Sasha Levin <sashal@kernel.org>
> >> Sent: Friday, September 6, 2019 1:03 PM
> >> On Thu, Sep 05, 2019 at 11:01:14PM +0000, Dexuan Cui wrote:
> >> >This patchset (consisting of 9 patches) was part of the v4 patchset
> (consisting
> >> >of 12 patches):
> >> >
> >> >The other 3 patches in v4 are posted in another patchset, which will go
> >> >through the tip.git tree.
> >> >
> >> >All the 9 patches here are now rebased to the hyperv tree's hyperv-next
> >> branch, and all the 9 patches have Michael Kelley's Signed-off-by's.
> >> >
> >> >Please review.
> >>
> >> Given that these two series depend on each other, I'd much prefer for
> >> them to go through one tree.
> >
> >Hi Sasha,
> >Yeah, that would be ideal. The problem here is: the other patchset conflicts
> >with the existing patches in the tip.git tree's timers/core branch, so IMO
> >the 3 patches have to go through the tip tree:
> >
> >[PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for
> hibernation
> >[PATCH v5 2/3] x86/hyper-v: Implement hv_is_hibernation_supported()
> >[PATCH v5 3/3] clocksource/drivers: Suspend/resume Hyper-V clocksource for
> hibernation
> >
> >> But, I may be wrong, and I'm going to see if a scenario such as this
> >> make sense. I've queued this one to the hyperv-next, but I'll wait for
> >> the x86 folks to send their pull request to Linus first before I do it
> >> for these patches.
> >
> >Actually IMHO you don't need to wait, because there is not a build
> >dependency, so either patchset can go into the Linus's tree first.
>
> It'll build, sure. But did anyone actually test one without the other?
Nobody tested this.
The fact is: even if we have the 2 patchsets, hibernation still can not work
for Linux VM on Hyper-V, because we also need the high level driver
changes to hv_netvsc, hv_storvsc, etc. I'm going to send out these
patches soon.
> What happens if Thomas doesn't send his batch at all during the merge
> window?
> Sasha
We need all the patches together to make hibernation work.
I just meant that the 2 patchsets don't have to go into Linus's tree in
a special order, as there is no build issue.
Thanks,
-- Dexuan
^ permalink raw reply
* Re: [PATCH v5 0/9] Enhance the hv_vmbus driver to support hibernation
From: Sasha Levin @ 2019-09-08 12:13 UTC (permalink / raw)
To: Dexuan Cui
Cc: linux-hyperv@vger.kernel.org, Stephen Hemminger, Sasha Levin,
Haiyang Zhang, KY Srinivasan, Michael Kelley, tglx@linutronix.de,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
In-Reply-To: <PU1P153MB01697512A097B489E0440E13BFBA0@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM>
On Fri, Sep 06, 2019 at 10:45:31PM +0000, Dexuan Cui wrote:
>> From: Sasha Levin <sashal@kernel.org>
>> Sent: Friday, September 6, 2019 1:03 PM
>> On Thu, Sep 05, 2019 at 11:01:14PM +0000, Dexuan Cui wrote:
>> >This patchset (consisting of 9 patches) was part of the v4 patchset (consisting
>> >of 12 patches):
>> >
>> >The other 3 patches in v4 are posted in another patchset, which will go
>> >through the tip.git tree.
>> >
>> >All the 9 patches here are now rebased to the hyperv tree's hyperv-next
>> branch, and all the 9 patches have Michael Kelley's Signed-off-by's.
>> >
>> >Please review.
>>
>> Given that these two series depend on each other, I'd much prefer for
>> them to go through one tree.
>
>Hi Sasha,
>Yeah, that would be ideal. The problem here is: the other patchset conflicts
>with the existing patches in the tip.git tree's timers/core branch, so IMO
>the 3 patches have to go through the tip tree:
>
>[PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation
>[PATCH v5 2/3] x86/hyper-v: Implement hv_is_hibernation_supported()
>[PATCH v5 3/3] clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernation
>
>> But, I may be wrong, and I'm going to see if a scenario such as this
>> make sense. I've queued this one to the hyperv-next, but I'll wait for
>> the x86 folks to send their pull request to Linus first before I do it
>> for these patches.
>
>Actually IMHO you don't need to wait, because there is not a build
>dependency, so either patchset can go into the Linus's tree first.
It'll build, sure. But did anyone actually test one without the other?
What happens if Thomas doesn't send his batch at all during the merge
window?
--
Thanks,
Sasha
^ permalink raw reply
* Re: [PATCH 2/3] xen/ballon: Avoid calling dummy function __online_page_set_limits()
From: Juergen Gross @ 2019-09-08 5:09 UTC (permalink / raw)
To: Souptick Joarder, richard.weiyang, dan.j.williams, sashal,
sstabellini, cai, akpm, haiyangz, kys, sthemmin, boris.ostrovsky,
david, pasha.tatashin, Michal Hocko, Oscar Salvador
Cc: linux-mm, xen-devel, linux-hyperv, linux-kernel
In-Reply-To: <854db2cf8145d9635249c95584d9a91fd774a229.1567889743.git.jrdr.linux@gmail.com>
On 07.09.19 23:47, Souptick Joarder wrote:
> __online_page_set_limits() is a dummy function and an extra call
> to this function can be avoided.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
^ permalink raw reply
* [PATCH 3/3] mm/memory_hotplug.c: Remove __online_page_set_limits()
From: Souptick Joarder @ 2019-09-07 21:47 UTC (permalink / raw)
To: kys, haiyangz, sthemmin, sashal, boris.ostrovsky, jgross,
sstabellini, akpm, david, osalvador, mhocko, pasha.tatashin,
dan.j.williams, richard.weiyang, cai
Cc: linux-hyperv, xen-devel, linux-mm, linux-kernel, Souptick Joarder
In-Reply-To: <cover.1567889743.git.jrdr.linux@gmail.com>
As both the callers of this dummy __online_page_set_limits()
is removed, this can be removed permanently.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
include/linux/memory_hotplug.h | 1 -
mm/memory_hotplug.c | 5 -----
2 files changed, 6 deletions(-)
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index f46ea71..8ee3a2a 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -105,7 +105,6 @@ extern unsigned long __offline_isolated_pages(unsigned long start_pfn,
extern int set_online_page_callback(online_page_callback_t callback);
extern int restore_online_page_callback(online_page_callback_t callback);
-extern void __online_page_set_limits(struct page *page);
extern void __online_page_increment_counters(struct page *page);
extern void __online_page_free(struct page *page);
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index c73f099..dc0118f 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -604,11 +604,6 @@ int restore_online_page_callback(online_page_callback_t callback)
}
EXPORT_SYMBOL_GPL(restore_online_page_callback);
-void __online_page_set_limits(struct page *page)
-{
-}
-EXPORT_SYMBOL_GPL(__online_page_set_limits);
-
void __online_page_increment_counters(struct page *page)
{
adjust_managed_page_count(page, 1);
--
1.9.1
^ permalink raw reply related
* [PATCH 2/3] xen/ballon: Avoid calling dummy function __online_page_set_limits()
From: Souptick Joarder @ 2019-09-07 21:47 UTC (permalink / raw)
To: kys, haiyangz, sthemmin, sashal, boris.ostrovsky, jgross,
sstabellini, akpm, david, osalvador, mhocko, pasha.tatashin,
dan.j.williams, richard.weiyang, cai
Cc: linux-hyperv, xen-devel, linux-mm, linux-kernel, Souptick Joarder
In-Reply-To: <cover.1567889743.git.jrdr.linux@gmail.com>
__online_page_set_limits() is a dummy function and an extra call
to this function can be avoided.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/xen/balloon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 4e11de6..05b1f7e 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -376,7 +376,6 @@ static void xen_online_page(struct page *page, unsigned int order)
mutex_lock(&balloon_mutex);
for (i = 0; i < size; i++) {
p = pfn_to_page(start_pfn + i);
- __online_page_set_limits(p);
__SetPageOffline(p);
__balloon_append(p);
}
--
1.9.1
^ permalink raw reply related
* [PATCH 1/3] hv_ballon: Avoid calling dummy function __online_page_set_limits()
From: Souptick Joarder @ 2019-09-07 21:47 UTC (permalink / raw)
To: kys, haiyangz, sthemmin, sashal, boris.ostrovsky, jgross,
sstabellini, akpm, david, osalvador, mhocko, pasha.tatashin,
dan.j.williams, richard.weiyang, cai
Cc: linux-hyperv, xen-devel, linux-mm, linux-kernel, Souptick Joarder
In-Reply-To: <cover.1567889743.git.jrdr.linux@gmail.com>
__online_page_set_limits() is a dummy function and an extra call
to this function can be avoided.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/hv/hv_balloon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 6fb4ea5..9bab443 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -680,7 +680,6 @@ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg)
__ClearPageOffline(pg);
/* This frame is currently backed; online the page. */
- __online_page_set_limits(pg);
__online_page_increment_counters(pg);
__online_page_free(pg);
--
1.9.1
^ permalink raw reply related
* [PATCH 0/3] Remove __online_page_set_limits()
From: Souptick Joarder @ 2019-09-07 21:47 UTC (permalink / raw)
To: kys, haiyangz, sthemmin, sashal, boris.ostrovsky, jgross,
sstabellini, akpm, david, osalvador, mhocko, pasha.tatashin,
dan.j.williams, richard.weiyang, cai
Cc: linux-hyperv, xen-devel, linux-mm, linux-kernel, Souptick Joarder
__online_page_set_limits() is a dummy function and an extra call
to this can be avoided.
As both of the callers are now removed, __online_page_set_limits()
can be removed permanently.
Souptick Joarder (3):
hv_ballon: Avoid calling dummy function __online_page_set_limits()
xen/ballon: Avoid calling dummy function __online_page_set_limits()
mm/memory_hotplug.c: Remove __online_page_set_limits()
drivers/hv/hv_balloon.c | 1 -
drivers/xen/balloon.c | 1 -
include/linux/memory_hotplug.h | 1 -
mm/memory_hotplug.c | 5 -----
4 files changed, 8 deletions(-)
--
1.9.1
^ permalink raw reply
* Re: [PATCH net-next,v2, 0/2] Enable sg as tunable, sync offload settings to VF NIC
From: David Miller @ 2019-09-07 15:43 UTC (permalink / raw)
To: haiyangz
Cc: sashal, linux-hyperv, netdev, kys, sthemmin, olaf, vkuznets,
linux-kernel
In-Reply-To: <1567725722-33552-1-git-send-email-haiyangz@microsoft.com>
From: Haiyang Zhang <haiyangz@microsoft.com>
Date: Thu, 5 Sep 2019 23:22:58 +0000
> This patch set fixes an issue in SG tuning, and sync
> offload settings from synthetic NIC to VF NIC.
Series applied to net-next.
^ permalink raw reply
* Re: [PATCH net-next, 2/2] hv_netvsc: Sync offloading features to VF NIC
From: Jakub Kicinski @ 2019-09-07 4:25 UTC (permalink / raw)
To: Haiyang Zhang
Cc: sashal@kernel.org, linux-hyperv@vger.kernel.org,
netdev@vger.kernel.org, KY Srinivasan, Stephen Hemminger,
olaf@aepfle.de, vkuznets, davem@davemloft.net,
linux-kernel@vger.kernel.org, Mark Bloch
In-Reply-To: <DM6PR21MB13373166435FD2FC5543D349CABB0@DM6PR21MB1337.namprd21.prod.outlook.com>
On Thu, 5 Sep 2019 23:07:32 +0000, Haiyang Zhang wrote:
> > On Fri, 30 Aug 2019 03:45:38 +0000, Haiyang Zhang wrote:
> > > VF NIC may go down then come up during host servicing events. This
> > > causes the VF NIC offloading feature settings to roll back to the
> > > defaults. This patch can synchronize features from synthetic NIC to
> > > the VF NIC during ndo_set_features (ethtool -K), and
> > > netvsc_register_vf when VF comes back after host events.
> > >
> > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > > Cc: Mark Bloch <markb@mellanox.com>
> >
> > If we want to make this change in behaviour we should change net_failover
> > at the same time.
>
> After checking the net_failover, I found it's for virtio based SRIOV, and very
> different from what we did for Hyper-V based SRIOV.
>
> We let the netvsc driver acts as both the synthetic (PV) driver and the transparent
> bonding master for the VF NIC. But net_failover acts as a master device on top
> of both virtio PV NIC, and VF NIC. And the net_failover doesn't implemented
> operations, like ndo_set_features.
> So the code change for our netvsc driver cannot be applied to net_failover driver.
>
> I will re-submit my two patches (fixing the extra tab in the 1st one as you pointed
> out). Thanks!
I think it stands to reason that two modules which implement the same
functionality behave the same.
^ permalink raw reply
* RE: [PATCH v5 0/9] Enhance the hv_vmbus driver to support hibernation
From: Dexuan Cui @ 2019-09-06 22:45 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-hyperv@vger.kernel.org, Stephen Hemminger, Sasha Levin,
Haiyang Zhang, KY Srinivasan, Michael Kelley, tglx@linutronix.de,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
In-Reply-To: <20190906200325.GD1528@sasha-vm>
> From: Sasha Levin <sashal@kernel.org>
> Sent: Friday, September 6, 2019 1:03 PM
> On Thu, Sep 05, 2019 at 11:01:14PM +0000, Dexuan Cui wrote:
> >This patchset (consisting of 9 patches) was part of the v4 patchset (consisting
> >of 12 patches):
> >
> >The other 3 patches in v4 are posted in another patchset, which will go
> >through the tip.git tree.
> >
> >All the 9 patches here are now rebased to the hyperv tree's hyperv-next
> branch, and all the 9 patches have Michael Kelley's Signed-off-by's.
> >
> >Please review.
>
> Given that these two series depend on each other, I'd much prefer for
> them to go through one tree.
Hi Sasha,
Yeah, that would be ideal. The problem here is: the other patchset conflicts
with the existing patches in the tip.git tree's timers/core branch, so IMO
the 3 patches have to go through the tip tree:
[PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation
[PATCH v5 2/3] x86/hyper-v: Implement hv_is_hibernation_supported()
[PATCH v5 3/3] clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernation
> But, I may be wrong, and I'm going to see if a scenario such as this
> make sense. I've queued this one to the hyperv-next, but I'll wait for
> the x86 folks to send their pull request to Linus first before I do it
> for these patches.
Actually IMHO you don't need to wait, because there is not a build
dependency, so either patchset can go into the Linus's tree first.
The 2 patchsets are just the first step to make hibernation work for Linux VM
running on Hyper-V. Next I'm going to post some high-level VSC patches for
hv_balloon, hv_utils, hv_netvsc, hid_hyperv, hv_storvsc, hyperv_keyboard,
hyperv_fb,etc. All of these should go through the hyperv tree, since they're
pure hyper-v changes, and they depend on this 9-patch patchset. I'll make
a note in every patch so the subsystem maintainers will be aware and ack it.
Among the VSC patches, the hv_balloon patch does depend on the 2nd patch:
[PATCH v5 2/3] x86/hyper-v: Implement hv_is_hibernation_supported().
I think I'll wait for the aforementioned 2 patchsets to be in first, before posting
the hv_balloon patch.
> Usually cases such as these are the exception, but for Hyper-V it seems
> to be the norm, so I'm curious to see how this will unfold.
>
> Thanks,
> Sasha
Thanks for taking care all the patches!
Thanks,
-- Dexuan
^ permalink raw reply
* RE: [Patch v4] storvsc: setup 1:1 mapping between hardware queue and CPU queue
From: Long Li @ 2019-09-06 21:37 UTC (permalink / raw)
To: Sasha Levin, longli@linuxonhyperv.com
Cc: KY Srinivasan, Haiyang Zhang, Stephen Hemminger,
James E.J. Bottomley, Martin K. Petersen,
linux-hyperv@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <20190906200820.GE1528@sasha-vm>
>Subject: Re: [Patch v4] storvsc: setup 1:1 mapping between hardware queue
>and CPU queue
>
>On Fri, Sep 06, 2019 at 10:24:20AM -0700, longli@linuxonhyperv.com wrote:
>>From: Long Li <longli@microsoft.com>
>>
>>storvsc doesn't use a dedicated hardware queue for a given CPU queue.
>>When issuing I/O, it selects returning CPU (hardware queue) dynamically
>>based on vmbus channel usage across all channels.
>>
>>This patch advertises num_present_cpus() as number of hardware queues.
>>This will have upper layer setup 1:1 mapping between hardware queue and
>>CPU queue and avoid unnecessary locking when issuing I/O.
>>
>>Signed-off-by: Long Li <longli@microsoft.com>
>>---
>>
>>Changes:
>>v2: rely on default upper layer function to map queues. (suggested by
>>Ming Lei
>><tom.leiming@gmail.com>)
>>v3: use num_present_cpus() instead of num_online_cpus(). Hyper-v
>>doesn't support hot-add CPUs. (suggested by Michael Kelley
>><mikelley@microsoft.com>)
>>v4: move change logs to after Signed-of-by
>>
>> drivers/scsi/storvsc_drv.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>>diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
>>index b89269120a2d..cf987712041a 100644
>>--- a/drivers/scsi/storvsc_drv.c
>>+++ b/drivers/scsi/storvsc_drv.c
>>@@ -1836,8 +1836,7 @@ static int storvsc_probe(struct hv_device *device,
>> /*
>> * Set the number of HW queues we are supporting.
>> */
>>- if (stor_device->num_sc != 0)
>>- host->nr_hw_queues = stor_device->num_sc + 1;
>>+ host->nr_hw_queues = num_present_cpus();
>
>Just looking at the change notes for v3: why isn't this
>num_active_cpus() then? One can still isolate CPUs on hyper-v, no?
The isolated CPU can be made online at run time. For example, even maxcpus=x is put on the boot line, individual CPUs can still be made online/offline.
>
>--
>Thanks,
>Sasha
^ permalink raw reply
* Re: [Patch v4] storvsc: setup 1:1 mapping between hardware queue and CPU queue
From: Sasha Levin @ 2019-09-06 20:08 UTC (permalink / raw)
To: longli
Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger,
James E.J. Bottomley, Martin K. Petersen, linux-hyperv,
linux-scsi, linux-kernel, Long Li
In-Reply-To: <1567790660-48142-1-git-send-email-longli@linuxonhyperv.com>
On Fri, Sep 06, 2019 at 10:24:20AM -0700, longli@linuxonhyperv.com wrote:
>From: Long Li <longli@microsoft.com>
>
>storvsc doesn't use a dedicated hardware queue for a given CPU queue. When
>issuing I/O, it selects returning CPU (hardware queue) dynamically based on
>vmbus channel usage across all channels.
>
>This patch advertises num_present_cpus() as number of hardware queues. This
>will have upper layer setup 1:1 mapping between hardware queue and CPU queue
>and avoid unnecessary locking when issuing I/O.
>
>Signed-off-by: Long Li <longli@microsoft.com>
>---
>
>Changes:
>v2: rely on default upper layer function to map queues. (suggested by Ming Lei
><tom.leiming@gmail.com>)
>v3: use num_present_cpus() instead of num_online_cpus(). Hyper-v doesn't
>support hot-add CPUs. (suggested by Michael Kelley <mikelley@microsoft.com>)
>v4: move change logs to after Signed-of-by
>
> drivers/scsi/storvsc_drv.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
>index b89269120a2d..cf987712041a 100644
>--- a/drivers/scsi/storvsc_drv.c
>+++ b/drivers/scsi/storvsc_drv.c
>@@ -1836,8 +1836,7 @@ static int storvsc_probe(struct hv_device *device,
> /*
> * Set the number of HW queues we are supporting.
> */
>- if (stor_device->num_sc != 0)
>- host->nr_hw_queues = stor_device->num_sc + 1;
>+ host->nr_hw_queues = num_present_cpus();
Just looking at the change notes for v3: why isn't this
num_active_cpus() then? One can still isolate CPUs on hyper-v, no?
--
Thanks,
Sasha
^ permalink raw reply
* Re: [PATCH v5 0/9] Enhance the hv_vmbus driver to support hibernation
From: Sasha Levin @ 2019-09-06 20:03 UTC (permalink / raw)
To: Dexuan Cui
Cc: linux-hyperv@vger.kernel.org, Stephen Hemminger, Sasha Levin,
Haiyang Zhang, KY Srinivasan, Michael Kelley, tglx@linutronix.de,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
In-Reply-To: <1567724446-30990-1-git-send-email-decui@microsoft.com>
On Thu, Sep 05, 2019 at 11:01:14PM +0000, Dexuan Cui wrote:
>This patchset (consisting of 9 patches) was part of the v4 patchset (consisting
>of 12 patches):
> https://lkml.org/lkml/2019/9/2/894
>
>The other 3 patches in v4 are posted in another patchset, which will go
>through the tip.git tree.
>
>All the 9 patches here are now rebased to the hyperv tree's hyperv-next branch:
>https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git/log/?h=hyperv-next
>, and all the 9 patches have Michael Kelley's Signed-off-by's.
>
>Please review.
Given that these two series depend on each other, I'd much prefer for
them to go through one tree.
But, I may be wrong, and I'm going to see if a scenario such as this
make sense. I've queued this one to the hyperv-next, but I'll wait for
the x86 folks to send their pull request to Linus first before I do it
for these patches.
Usually cases such as these are the exception, but for Hyper-V it seems
to be the norm, so I'm curious to see how this will unfold.
--
Thanks,
Sasha
^ permalink raw reply
* RE: [Patch v4] storvsc: setup 1:1 mapping between hardware queue and CPU queue
From: Michael Kelley @ 2019-09-06 19:14 UTC (permalink / raw)
To: longli@linuxonhyperv.com, KY Srinivasan, Haiyang Zhang,
Stephen Hemminger, Sasha Levin, James E.J. Bottomley,
Martin K. Petersen, linux-hyperv@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Long Li
In-Reply-To: <1567790660-48142-1-git-send-email-longli@linuxonhyperv.com>
From: Long Li <longli@microsoft.com> Sent: Friday, September 6, 2019 10:24 AM
>
> storvsc doesn't use a dedicated hardware queue for a given CPU queue. When
> issuing I/O, it selects returning CPU (hardware queue) dynamically based on
> vmbus channel usage across all channels.
>
> This patch advertises num_present_cpus() as number of hardware queues. This
> will have upper layer setup 1:1 mapping between hardware queue and CPU queue
> and avoid unnecessary locking when issuing I/O.
>
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
>
> Changes:
> v2: rely on default upper layer function to map queues. (suggested by Ming Lei
> <tom.leiming@gmail.com>)
> v3: use num_present_cpus() instead of num_online_cpus(). Hyper-v doesn't
> support hot-add CPUs. (suggested by Michael Kelley <mikelley@microsoft.com>)
> v4: move change logs to after Signed-of-by
>
> drivers/scsi/storvsc_drv.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index b89269120a2d..cf987712041a 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1836,8 +1836,7 @@ static int storvsc_probe(struct hv_device *device,
> /*
> * Set the number of HW queues we are supporting.
> */
> - if (stor_device->num_sc != 0)
> - host->nr_hw_queues = stor_device->num_sc + 1;
> + host->nr_hw_queues = num_present_cpus();
>
> /*
> * Set the error handler work queue.
> --
> 2.17.1
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
^ permalink raw reply
* [Patch v4] storvsc: setup 1:1 mapping between hardware queue and CPU queue
From: longli @ 2019-09-06 17:24 UTC (permalink / raw)
To: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Sasha Levin,
James E.J. Bottomley, Martin K. Petersen, linux-hyperv,
linux-scsi, linux-kernel
Cc: Long Li
From: Long Li <longli@microsoft.com>
storvsc doesn't use a dedicated hardware queue for a given CPU queue. When
issuing I/O, it selects returning CPU (hardware queue) dynamically based on
vmbus channel usage across all channels.
This patch advertises num_present_cpus() as number of hardware queues. This
will have upper layer setup 1:1 mapping between hardware queue and CPU queue
and avoid unnecessary locking when issuing I/O.
Signed-off-by: Long Li <longli@microsoft.com>
---
Changes:
v2: rely on default upper layer function to map queues. (suggested by Ming Lei
<tom.leiming@gmail.com>)
v3: use num_present_cpus() instead of num_online_cpus(). Hyper-v doesn't
support hot-add CPUs. (suggested by Michael Kelley <mikelley@microsoft.com>)
v4: move change logs to after Signed-of-by
drivers/scsi/storvsc_drv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index b89269120a2d..cf987712041a 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1836,8 +1836,7 @@ static int storvsc_probe(struct hv_device *device,
/*
* Set the number of HW queues we are supporting.
*/
- if (stor_device->num_sc != 0)
- host->nr_hw_queues = stor_device->num_sc + 1;
+ host->nr_hw_queues = num_present_cpus();
/*
* Set the error handler work queue.
--
2.17.1
^ permalink raw reply related
* RE: [Patch v3] storvsc: setup 1:1 mapping between hardware queue and CPU queue
From: Michael Kelley @ 2019-09-06 15:45 UTC (permalink / raw)
To: Long Li, longli@linuxonhyperv.com, KY Srinivasan, Haiyang Zhang,
Stephen Hemminger, Sasha Levin, James E.J. Bottomley,
Martin K. Petersen, linux-hyperv@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <CY4PR21MB074110983075A3BC91D73AE4CEBA0@CY4PR21MB0741.namprd21.prod.outlook.com>
From: Long Li <longli@microsoft.com> Sent: Thursday, September 5, 2019 8:35 PM
> >>
> >> Changes:
> >> v2: rely on default upper layer function to map queues. (suggested by
> >> Ming Lei
> >> <tom.leiming@gmail.com>)
> >> v3: use num_present_cpus() instead of num_online_cpus(). Hyper-v
> >> doesn't support hot-add CPUs. (suggested by Michael Kelley
> >> <mikelley@microsoft.com>)
> >
> >I've mostly seen the "Changes:" section placed below the "---" so that it
> >doesn't clutter up the commit log. But maybe there's not a strong
> >requirement one way or the other as I didn't find anything called out in the
> >"Documentation/process"
> >directory.
>
> Should I resubmit the patch (but keep it v3)?
>
I would say do a quick resubmit as v4 so there's no confusion.
Michael
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox