[virtio-dev] [PATCH v5 5/6] virtio-balloon: Pull page poisoning config out of free page hinting

2019-08-12 Thread Alexander Duyck
From: Alexander Duyck Currently the page poisoning setting wasn't being enabled unless free page hinting was enabled. However we will need the page poisoning tracking logic as well for unused page reporting. As such pull it out and make it a separate bit of config in the probe function

[virtio-dev] [PATCH v5 QEMU 2/3] virtio-balloon: Add bit to notify guest of unused page reporting

2019-08-12 Thread Alexander Duyck
From: Alexander Duyck Add a bit for the page reporting feature provided by virtio-balloon. This patch should be replaced once the feature is added to the Linux kernel and the bit is backported into this exported kernel header. Signed-off-by: Alexander Duyck --- include/standard-headers/linux

[virtio-dev] [PATCH v5 0/6] mm / virtio: Provide support for unused page reporting

2019-08-12 Thread Alexander Duyck
ess() Added checks for isolate and cma types to for_each_reporting_migratetype_order Added virtio-dev, Michal Hocko, and Oscar Salvador to to:/cc: Rebased on latest linux-next and QEMU git trees --- Alexander Duyck (6): mm: Adjust shuffle code to allow for future coalescing mm: Mov

[virtio-dev] Re: [PATCH v5 1/6] mm: Adjust shuffle code to allow for future coalescing

2019-08-12 Thread Alexander Duyck
On Mon, Aug 12, 2019 at 3:24 PM Dan Williams wrote: > > On Mon, Aug 12, 2019 at 2:33 PM Alexander Duyck > wrote: > > > > From: Alexander Duyck > > > > This patch is meant to move the head/tail adding logic out of the shuffle > > s/This patch is meant

[virtio-dev] [PATCH v5 QEMU 3/3] virtio-balloon: Provide a interface for unused page reporting

2019-08-12 Thread Alexander Duyck
From: Alexander Duyck Add support for what I am referring to as "unused page reporting". Basically the idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate

[virtio-dev] [PATCH v5 4/6] mm: Introduce Reported pages

2019-08-12 Thread Alexander Duyck
From: Alexander Duyck In order to pave the way for free page reporting in virtualized environments we will need a way to get pages out of the free lists and identify those pages after they have been returned. To accomplish this, this patch adds the concept of a Reported Buddy, which

[virtio-dev] [PATCH v5 2/6] mm: Move set/get_pcppage_migratetype to mmzone.h

2019-08-12 Thread Alexander Duyck
From: Alexander Duyck In order to support page reporting it will be necessary to store and retrieve the migratetype of a page. To enable that I am moving the set and get operations for pcppage_migratetype into the mm/internal.h header so that they can be used outside of the page_alloc.c file

[virtio-dev] [PATCH v5 1/6] mm: Adjust shuffle code to allow for future coalescing

2019-08-12 Thread Alexander Duyck
From: Alexander Duyck This patch is meant to move the head/tail adding logic out of the shuffle code and into the __free_one_page function since ultimately that is where it is really needed anyway. By doing this we should be able to reduce the overhead and can consolidate all of the list

Re: [virtio-dev] [PATCH v6 4/6] mm: Introduce Reported pages

2019-08-22 Thread Alexander Duyck
On Thu, Aug 22, 2019 at 9:19 AM Nitesh Narayan Lal wrote: > > > On 8/21/19 10:59 AM, Alexander Duyck wrote: > > From: Alexander Duyck > > > > In order to pave the way for free page reporting in virtualized > > environments we will need a way to get pages out o

[virtio-dev] Re: [RFC][Patch v12 1/2] mm: page_reporting: core infrastructure

2019-08-30 Thread Alexander Duyck
On Fri, Aug 30, 2019 at 8:15 AM Nitesh Narayan Lal wrote: > > > On 8/12/19 2:47 PM, Alexander Duyck wrote: > > On Mon, Aug 12, 2019 at 6:13 AM Nitesh Narayan Lal > > wrote: > >> This patch introduces the core infrastructure for free page reporting in > &g

[virtio-dev] Re: [PATCH v5 6/6] virtio-balloon: Add support for providing unused page reports to host

2019-09-03 Thread Alexander Duyck
On Tue, Sep 3, 2019 at 12:32 AM Michael S. Tsirkin wrote: > > On Mon, Aug 12, 2019 at 02:33:56PM -0700, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Add support for the page reporting feature provided by virtio-balloon. > > Reporting differs from the

[virtio-dev] Re: [PATCH v6 0/6] mm / virtio: Provide support for unused page reporting

2019-08-23 Thread Alexander Duyck
On Fri, 2019-08-23 at 01:16 -0400, Pankaj Gupta wrote: > > On Thu, 2019-08-22 at 06:43 -0400, Pankaj Gupta wrote: > > > > This series provides an asynchronous means of reporting to a hypervisor > > > > that a guest page is no longer in use and can have the data associated > > > > with it dropped.

[virtio-dev] [PATCH v6 6/6] virtio-balloon: Add support for providing unused page reports to host

2019-08-21 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[virtio-dev] [PATCH v6 3/6] mm: Use zone and order instead of free area in free_list manipulators

2019-08-21 Thread Alexander Duyck
From: Alexander Duyck In order to enable the use of the zone from the list manipulator functions I will need access to the zone pointer. As it turns out most of the accessors were always just being directly passed >free_area[order] anyway so it would make sense to just f

[virtio-dev] [PATCH v6 0/6] mm / virtio: Provide support for unused page reporting

2019-08-21 Thread Alexander Duyck
ed put_reported_page to free_reported_page, added order as argument Dropped check for CMA type as I believe we should be reporting those Added code to allow moving of reported pages into and out of isolation Defined page reporting order as minimum of Huge Page size vs MAX_ORDER - 1 Cleaned up u

[virtio-dev] [PATCH v6 1/6] mm: Adjust shuffle code to allow for future coalescing

2019-08-21 Thread Alexander Duyck
From: Alexander Duyck Move the head/tail adding logic out of the shuffle code and into the __free_one_page function since ultimately that is where it is really needed anyway. By doing this we should be able to reduce the overhead and can consolidate all of the list addition bits in one spot

[virtio-dev] [PATCH v6 2/6] mm: Move set/get_pcppage_migratetype to mmzone.h

2019-08-21 Thread Alexander Duyck
From: Alexander Duyck In order to support page reporting it will be necessary to store and retrieve the migratetype of a page. To enable that I am moving the set and get operations for pcppage_migratetype into the mm/internal.h header so that they can be used outside of the page_alloc.c file

[virtio-dev] [PATCH v6 QEMU 2/3] virtio-balloon: Add bit to notify guest of unused page reporting

2019-08-21 Thread Alexander Duyck
From: Alexander Duyck Add a bit for the page reporting feature provided by virtio-balloon. This patch should be replaced once the feature is added to the Linux kernel and the bit is backported into this exported kernel header. Signed-off-by: Alexander Duyck --- include/standard-headers/linux

[virtio-dev] [PATCH v6 QEMU 1/3] virtio-ballon: Implement support for page poison tracking feature

2019-08-21 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[virtio-dev] [PATCH v7 1/6] mm: Adjust shuffle code to allow for future coalescing

2019-09-04 Thread Alexander Duyck
From: Alexander Duyck Move the head/tail adding logic out of the shuffle code and into the __free_one_page function since ultimately that is where it is really needed anyway. By doing this we should be able to reduce the overhead and can consolidate all of the list addition bits in one spot

[virtio-dev] [PATCH v7 4/6] mm: Introduce Reported pages

2019-09-04 Thread Alexander Duyck
From: Alexander Duyck In order to pave the way for free page reporting in virtualized environments we will need a way to get pages out of the free lists and identify those pages after they have been returned. To accomplish this, this patch adds the concept of a Reported Buddy, which

[virtio-dev] [PATCH v7 6/6] virtio-balloon: Add support for providing unused page reports to host

2019-09-04 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[virtio-dev] [PATCH v7 3/6] mm: Use zone and order instead of free area in free_list manipulators

2019-09-04 Thread Alexander Duyck
From: Alexander Duyck In order to enable the use of the zone from the list manipulator functions I will need access to the zone pointer. As it turns out most of the accessors were always just being directly passed >free_area[order] anyway so it would make sense to just f

[virtio-dev] [PATCH v7 5/6] virtio-balloon: Pull page poisoning config out of free page hinting

2019-09-04 Thread Alexander Duyck
From: Alexander Duyck Currently the page poisoning setting wasn't being enabled unless free page hinting was enabled. However we will need the page poisoning tracking logic as well for unused page reporting. As such pull it out and make it a separate bit of config in the probe function

[virtio-dev] [PATCH v7 0/6] mm / virtio: Provide support for unused page reporting

2019-09-04 Thread Alexander Duyck
of static branch usage for page_reporting_notify_enabled Changes from v6: https://lore.kernel.org/lkml/20190821145806.20926.22448.stgit@localhost.localdomain/ Rebased on linux-next for 20190903 Added jump label to __page_reporting_request so we release RCU read lock Removed "- 1" from ca

[virtio-dev] [PATCH v7 2/6] mm: Move set/get_pcppage_migratetype to mmzone.h

2019-09-04 Thread Alexander Duyck
From: Alexander Duyck In order to support page reporting it will be necessary to store and retrieve the migratetype of a page. To enable that I am moving the set and get operations for pcppage_migratetype into the mm/internal.h header so that they can be used outside of the page_alloc.c file

[virtio-dev] [PATCH v7 QEMU 3/3] virtio-balloon: Provide a interface for unused page reporting

2019-09-04 Thread Alexander Duyck
From: Alexander Duyck Add support for what I am referring to as "unused page reporting". Basically the idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate

[virtio-dev] [PATCH v7 QEMU 1/3] virtio-ballon: Implement support for page poison tracking feature

2019-09-04 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[virtio-dev] [PATCH v7 QEMU 2/3] virtio-balloon: Add bit to notify guest of unused page reporting

2019-09-04 Thread Alexander Duyck
From: Alexander Duyck Add a bit for the page reporting feature provided by virtio-balloon. This patch should be replaced once the feature is added to the Linux kernel and the bit is backported into this exported kernel header. Signed-off-by: Alexander Duyck --- include/standard-headers/linux

[virtio-dev] Re: [PATCH v5 6/6] virtio-balloon: Add support for providing unused page reports to host

2019-09-04 Thread Alexander Duyck
On Wed, Sep 4, 2019 at 3:44 AM Michael S. Tsirkin wrote: > > On Tue, Sep 03, 2019 at 07:13:32AM -0700, Alexander Duyck wrote: > > On Tue, Sep 3, 2019 at 12:32 AM Michael S. Tsirkin wrote: > > > > > > On Mon, Aug 12, 2019 at 02:33:56PM -0700, Alexander Duyck wrote:

Re: [virtio-dev] Re: [PATCH v7 5/6] virtio-balloon: Pull page poisoning config out of free page hinting

2019-09-04 Thread Alexander Duyck
On Wed, 2019-09-04 at 15:28 -0400, Michael S. Tsirkin wrote: > On Wed, Sep 04, 2019 at 08:10:55AM -0700, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Currently the page poisoning setting wasn't being enabled unless free page > > hinting was enabled. Ho

[virtio-dev] Re: [PATCH v7 6/6] virtio-balloon: Add support for providing unused page reports to host

2019-09-04 Thread Alexander Duyck
On Wed, 2019-09-04 at 15:17 -0400, Michael S. Tsirkin wrote: > On Wed, Sep 04, 2019 at 08:11:02AM -0700, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Add support for the page reporting feature provided by virtio-balloon. > > Reporting differs from the re

[virtio-dev] Re: [PATCH v9 0/8] stg mail -e --version=v9 \

2019-09-12 Thread Alexander Duyck
On Thu, 2019-09-12 at 17:35 +0100, Mel Gorman wrote: > On Thu, Sep 12, 2019 at 11:19:25AM +0200, Michal Hocko wrote: > > On Wed 11-09-19 08:12:03, Alexander Duyck wrote: > > > On Wed, Sep 11, 2019 at 4:36 AM Michal Hocko wrote: > > > > On Tue 10-09-19 1

[virtio-dev] Re: [PATCH v9 0/8] stg mail -e --version=v9 \

2019-09-12 Thread Alexander Duyck
On Thu, 2019-09-12 at 11:19 +0200, Michal Hocko wrote: > On Wed 11-09-19 08:12:03, Alexander Duyck wrote: > > On Wed, Sep 11, 2019 at 4:36 AM Michal Hocko wrote: > > > On Tue 10-09-19 14:23:40, Alexander Duyck wrote: > > > [...] > > > > We don't put

[virtio-dev] Re: [PATCH v9 3/8] mm: Move set/get_pcppage_migratetype to mmzone.h

2019-09-10 Thread Alexander Duyck
On Tue, 2019-09-10 at 19:45 +0200, Michal Hocko wrote: > On Tue 10-09-19 07:46:50, Alexander Duyck wrote: > > On Tue, Sep 10, 2019 at 5:23 AM Michal Hocko wrote: > > > On Sat 07-09-19 10:25:28, Alexander Duyck wrote: > > > > From: Alexander Duyck > > &

[virtio-dev] Re: [PATCH v9 0/8] stg mail -e --version=v9 \

2019-09-10 Thread Alexander Duyck
On Tue, 2019-09-10 at 20:00 +0200, Michal Hocko wrote: > On Tue 10-09-19 19:52:13, Michal Hocko wrote: > > On Tue 10-09-19 09:05:43, Alexander Duyck wrote: > [...] > > > All this is providing is just a report and it is optional if the > > > hypervisor will act on it o

[virtio-dev] Re: [PATCH v9 3/8] mm: Move set/get_pcppage_migratetype to mmzone.h

2019-09-10 Thread Alexander Duyck
On Tue, Sep 10, 2019 at 5:23 AM Michal Hocko wrote: > > On Sat 07-09-19 10:25:28, Alexander Duyck wrote: > > From: Alexander Duyck > > > > In order to support page reporting it will be necessary to store and > > retrieve the migratetype of a page. To enable that I

[virtio-dev] Re: [PATCH v9 0/8] stg mail -e --version=v9 \

2019-09-10 Thread Alexander Duyck
> with me. > > On Sat 07-09-19 10:25:03, Alexander Duyck wrote: > [...] > > This series provides an asynchronous means of reporting to a hypervisor > > that a guest page is no longer in use and can have the data associated > > with it dropped. To do this I have imp

[virtio-dev] Re: [PATCH v9 2/8] mm: Adjust shuffle code to allow for future coalescing

2019-09-10 Thread Alexander Duyck
On Tue, Sep 10, 2019 at 5:20 AM Michal Hocko wrote: > > On Sat 07-09-19 10:25:20, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Move the head/tail adding logic out of the shuffle code and into the > > __free_one_page function since ultimately that is

[virtio-dev] Re: [PATCH v9 1/8] mm: Add per-cpu logic to page shuffling

2019-09-10 Thread Alexander Duyck
On Tue, 2019-09-10 at 14:11 +0200, Michal Hocko wrote: > On Mon 09-09-19 08:11:36, Alexander Duyck wrote: > > On Mon, 2019-09-09 at 10:14 +0200, David Hildenbrand wrote: > > > On 07.09.19 19:25, Alexander Duyck wrote: > > > > From: Alexander Duyck > >

[virtio-dev] Re: [PATCH v9 1/8] mm: Add per-cpu logic to page shuffling

2019-09-10 Thread Alexander Duyck
On Mon, 2019-09-09 at 10:14 +0200, David Hildenbrand wrote: > On 07.09.19 19:25, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Change the logic used to generate randomness in the suffle path so that we > > can avoid cache line bouncing. The previous l

[virtio-dev] Re: [PATCH v9 0/8] stg mail -e --version=v9 \

2019-09-10 Thread Alexander Duyck
On Tue, Sep 10, 2019 at 7:47 AM Michal Hocko wrote: > > On Tue 10-09-19 07:42:43, Alexander Duyck wrote: > > On Tue, Sep 10, 2019 at 5:42 AM Michal Hocko wrote: > > > > > > I wanted to review "mm: Introduce Reported pages" just realize that I > >

[virtio-dev] Re: [PATCH v9 2/8] mm: Adjust shuffle code to allow for future coalescing

2019-09-09 Thread Alexander Duyck
On Mon, 2019-09-09 at 12:47 +0300, Kirill A. Shutemov wrote: > On Sat, Sep 07, 2019 at 10:25:20AM -0700, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Move the head/tail adding logic out of the shuffle code and into the > > __free_one_page function sin

[virtio-dev] Re: [PATCH v9 3/8] mm: Move set/get_pcppage_migratetype to mmzone.h

2019-09-09 Thread Alexander Duyck
On Mon, 2019-09-09 at 12:56 +0300, Kirill A. Shutemov wrote: > On Sat, Sep 07, 2019 at 10:25:28AM -0700, Alexander Duyck wrote: > > From: Alexander Duyck > > > > In order to support page reporting it will be necessary to store and > > retrieve the migratetype of

[virtio-dev] Re: [PATCH v9 3/8] mm: Move set/get_pcppage_migratetype to mmzone.h

2019-09-09 Thread Alexander Duyck
On Mon, 2019-09-09 at 11:01 -0700, Alexander Duyck wrote: > On Mon, 2019-09-09 at 12:56 +0300, Kirill A. Shutemov wrote: > > On Sat, Sep 07, 2019 at 10:25:28AM -0700, Alexander Duyck wrote: > > > From: Alexander Duyck > > > > > > In order to support page rep

[virtio-dev] [PATCH v9 7/8] virtio-balloon: Pull page poisoning config out of free page hinting

2019-09-07 Thread Alexander Duyck
From: Alexander Duyck Currently the page poisoning setting wasn't being enabled unless free page hinting was enabled. However we will need the page poisoning tracking logic as well for unused page reporting. As such pull it out and make it a separate bit of config in the probe function

[virtio-dev] [PATCH v9 8/8] virtio-balloon: Add support for providing unused page reports to host

2019-09-07 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[virtio-dev] [PATCH v9 4/8] mm: Use zone and order instead of free area in free_list manipulators

2019-09-07 Thread Alexander Duyck
From: Alexander Duyck In order to enable the use of the zone from the list manipulator functions I will need access to the zone pointer. As it turns out most of the accessors were always just being directly passed >free_area[order] anyway so it would make sense to just f

[virtio-dev] [PATCH v9 2/8] mm: Adjust shuffle code to allow for future coalescing

2019-09-07 Thread Alexander Duyck
From: Alexander Duyck Move the head/tail adding logic out of the shuffle code and into the __free_one_page function since ultimately that is where it is really needed anyway. By doing this we should be able to reduce the overhead and can consolidate all of the list addition bits in one spot

[virtio-dev] [PATCH v9 3/8] mm: Move set/get_pcppage_migratetype to mmzone.h

2019-09-07 Thread Alexander Duyck
From: Alexander Duyck In order to support page reporting it will be necessary to store and retrieve the migratetype of a page. To enable that I am moving the set and get operations for pcppage_migratetype into the mm/internal.h header so that they can be used outside of the page_alloc.c file

[virtio-dev] [PATCH v9 0/8] stg mail -e --version=v9 \

2019-09-07 Thread Alexander Duyck
d of HUGETLB_ORDER and MAX_ORDER - 1 Boundary allocation now dynamic to support HUGETLB_PAGE_SIZE_VARIABLE option Made use of existing code/functions to reduce size of move_to_boundary function Dropped unused zone pointer from add_to/del_from_boundary functions Added additional possible mm and arm

[virtio-dev] [PATCH v9 5/8] arm64: Move hugetlb related definitions out of pgtable.h to page-defs.h

2019-09-07 Thread Alexander Duyck
From: Alexander Duyck Move the static definition for things such as HUGETLB_PAGE_ORDER out of asm/pgtable.h and place it in page-defs.h. By doing this the includes become much easier to deal with as currently arm64 is the only architecture that didn't include this definition in the asm/page.h

[virtio-dev] [PATCH v9 1/8] mm: Add per-cpu logic to page shuffling

2019-09-07 Thread Alexander Duyck
From: Alexander Duyck Change the logic used to generate randomness in the suffle path so that we can avoid cache line bouncing. The previous logic was sharing the offset and entropy word between all CPUs. As such this can result in cache line bouncing and will ultimately hurt performance when

[virtio-dev] Re: [PATCH v9 0/8] mm / virtio: Provide support for unused page reporting

2019-09-07 Thread Alexander Duyck
Sorry about that. Looks like I fat fingered things and copied the command line into the cover page. I corrected the subject here, and pulled the command line out of the message below. - Alex On Sat, Sep 7, 2019 at 10:25 AM Alexander Duyck wrote: > This series provides an asynchronous me

[virtio-dev] Re: [PATCH v8 0/7] mm / virtio: Provide support for unused page reporting

2019-09-06 Thread Alexander Duyck
On Fri, Sep 6, 2019 at 8:23 AM Michael S. Tsirkin wrote: > > On Fri, Sep 06, 2019 at 07:53:21AM -0700, Alexander Duyck wrote: > > This series provides an asynchronous means of reporting to a hypervisor > > that a guest page is no longer in use and can have the data associated &

[virtio-dev] Re: [PATCH v9 2/8] mm: Adjust shuffle code to allow for future coalescing

2019-09-09 Thread Alexander Duyck
On Mon, 2019-09-09 at 12:47 +0300, Kirill A. Shutemov wrote: > On Sat, Sep 07, 2019 at 10:25:20AM -0700, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Move the head/tail adding logic out of the shuffle code and into the > > __free_one_page function sin

[virtio-dev] Re: [PATCH v9 7/8] virtio-balloon: Pull page poisoning config out of free page hinting

2019-09-09 Thread Alexander Duyck
On Mon, 2019-09-09 at 10:59 +0200, David Hildenbrand wrote: > On 07.09.19 19:26, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Currently the page poisoning setting wasn't being enabled unless free page > > hinting was enabled. However we will need the pa

[virtio-dev] Re: [PATCH v9 1/8] mm: Add per-cpu logic to page shuffling

2019-09-09 Thread Alexander Duyck
On Mon, 2019-09-09 at 12:07 +0300, Kirill A. Shutemov wrote: > On Sat, Sep 07, 2019 at 10:25:12AM -0700, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Change the logic used to generate randomness in the suffle path so that we > > Typo. > >

[virtio-dev] Re: [PATCH v9 1/8] mm: Add per-cpu logic to page shuffling

2019-09-09 Thread Alexander Duyck
On Mon, 2019-09-09 at 10:14 +0200, David Hildenbrand wrote: > On 07.09.19 19:25, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Change the logic used to generate randomness in the suffle path so that we > > can avoid cache line bouncing. The previous l

[virtio-dev] Re: [PATCH v9 5/8] arm64: Move hugetlb related definitions out of pgtable.h to page-defs.h

2019-09-09 Thread Alexander Duyck
On Mon, 2019-09-09 at 10:52 +0200, David Hildenbrand wrote: > On 07.09.19 19:25, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Move the static definition for things such as HUGETLB_PAGE_ORDER out of > > asm/pgtable.h and place it in page-defs.h. By doing t

[virtio-dev] Re: [PATCH v9 2/8] mm: Adjust shuffle code to allow for future coalescing

2019-09-09 Thread Alexander Duyck
On Mon, 2019-09-09 at 18:35 +0300, Kirill A. Shutemov wrote: > On Mon, Sep 09, 2019 at 08:22:11AM -0700, Alexander Duyck wrote: > > > > + area = >free_area[order]; > > > > + if (is_shuffle_order(order) ? shuffle_pick_tail() : > > > > +

[virtio-dev] Re: [PATCH v9 5/8] arm64: Move hugetlb related definitions out of pgtable.h to page-defs.h

2019-09-17 Thread Alexander Duyck
On Tue, Sep 17, 2019 at 10:49 AM Will Deacon wrote: > > On Sat, Sep 07, 2019 at 10:25:45AM -0700, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Move the static definition for things such as HUGETLB_PAGE_ORDER out of > > asm/pgtable.h and pla

[virtio-dev] Re: [PATCH v10 5/6] virtio-balloon: Pull page poisoning config out of free page hinting

2019-09-18 Thread Alexander Duyck
On Wed, 2019-09-18 at 13:58 -0400, Michael S. Tsirkin wrote: > On Wed, Sep 18, 2019 at 10:53:05AM -0700, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Currently the page poisoning setting wasn't being enabled unless free page > > hinting was enabled. Ho

[virtio-dev] [PATCH v10 QEMU 3/3] virtio-balloon: Provide a interface for unused page reporting

2019-09-18 Thread Alexander Duyck
From: Alexander Duyck Add support for what I am referring to as "unused page reporting". Basically the idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate

[virtio-dev] [PATCH v10 QEMU 1/3] virtio-ballon: Implement support for page poison tracking feature

2019-09-18 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[virtio-dev] [PATCH v10 QEMU 2/3] virtio-balloon: Add bit to notify guest of unused page reporting

2019-09-18 Thread Alexander Duyck
From: Alexander Duyck Add a bit for the page reporting feature provided by virtio-balloon. This patch should be replaced once the feature is added to the Linux kernel and the bit is backported into this exported kernel header. Signed-off-by: Alexander Duyck --- include/standard-headers/linux

[virtio-dev] [PATCH v10 5/6] virtio-balloon: Pull page poisoning config out of free page hinting

2019-09-18 Thread Alexander Duyck
From: Alexander Duyck Currently the page poisoning setting wasn't being enabled unless free page hinting was enabled. However we will need the page poisoning tracking logic as well for unused page reporting. As such pull it out and make it a separate bit of config in the probe function

[virtio-dev] [PATCH v10 2/6] mm: Use zone and order instead of free area in free_list manipulators

2019-09-18 Thread Alexander Duyck
From: Alexander Duyck In order to enable the use of the zone from the list manipulator functions I will need access to the zone pointer. As it turns out most of the accessors were always just being directly passed >free_area[order] anyway so it would make sense to just f

[virtio-dev] [PATCH v10 6/6] virtio-balloon: Add support for providing unused page reports to host

2019-09-18 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[virtio-dev] [PATCH v10 3/6] mm: Introduce Reported pages

2019-09-18 Thread Alexander Duyck
From: Alexander Duyck In order to pave the way for free page reporting in virtualized environments we will need a way to get pages out of the free lists and identify those pages after they have been returned. To accomplish this, this patch adds the concept of a Reported Buddy, which

[virtio-dev] [PATCH v10 4/6] mm: Add device side and notifier for unused page reporting

2019-09-18 Thread Alexander Duyck
From: Alexander Duyck With this patch we are adding the pieces needed to enable the reporting of pages to a specific device. That device needs to register a page reporting device that can be used to handle notifications that that pages are unused. Registering the device will in turn enable

[virtio-dev] [PATCH v10 0/6] mm / virtio: Provide support for unused page reporting

2019-09-18 Thread Alexander Duyck
eporting.h between include/linux/ and mm/ Added #include " to mm/page_reporting.h Renamed page_reporting_startup/shutdown to page_reporting_register/unregister Updated comments related to virtio page poison tracking feature --- Alexander Duyck (6): mm: Adjust shuffle code to a

[virtio-dev] [PATCH v10 1/6] mm: Adjust shuffle code to allow for future coalescing

2019-09-18 Thread Alexander Duyck
From: Alexander Duyck Move the head/tail adding logic out of the shuffle code and into the __free_one_page function since ultimately that is where it is really needed anyway. By doing this we should be able to reduce the overhead and can consolidate all of the list addition bits in one spot

[virtio-dev] [PATCH v8 7/7] virtio-balloon: Add support for providing unused page reports to host

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[virtio-dev] [PATCH v8 4/7] mm: Use zone and order instead of free area in free_list manipulators

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck In order to enable the use of the zone from the list manipulator functions I will need access to the zone pointer. As it turns out most of the accessors were always just being directly passed >free_area[order] anyway so it would make sense to just f

[virtio-dev] [PATCH v8 3/7] mm: Move set/get_pcppage_migratetype to mmzone.h

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck In order to support page reporting it will be necessary to store and retrieve the migratetype of a page. To enable that I am moving the set and get operations for pcppage_migratetype into the mm/internal.h header so that they can be used outside of the page_alloc.c file

[virtio-dev] [PATCH v8 5/7] mm: Introduce Reported pages

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck In order to pave the way for free page reporting in virtualized environments we will need a way to get pages out of the free lists and identify those pages after they have been returned. To accomplish this, this patch adds the concept of a Reported Buddy, which

[virtio-dev] [PATCH v8 6/7] virtio-balloon: Pull page poisoning config out of free page hinting

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck Currently the page poisoning setting wasn't being enabled unless free page hinting was enabled. However we will need the page poisoning tracking logic as well for unused page reporting. As such pull it out and make it a separate bit of config in the probe function

[virtio-dev] [PATCH v8 0/7] mm / virtio: Provide support for unused page reporting

2019-09-06 Thread Alexander Duyck
uffle per-cpu optimization into seperate patch Moved check for !phdev->capacity into reporting patch where it belongs Added Reviewed-by tags received for v7 --- Alexander Duyck (7): mm: Add per-cpu logic to page shuffling mm: Adjust shuffle code to allow for future coalescing

[virtio-dev] [PATCH v8 1/7] mm: Add per-cpu logic to page shuffling

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck Change the logic used to generate randomness in the suffle path so that we can avoid cache line bouncing. The previous logic was sharing the offset and entropy word between all CPUs. As such this can result in cache line bouncing and will ultimately hurt performance when

[virtio-dev] [PATCH v8 2/7] mm: Adjust shuffle code to allow for future coalescing

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck Move the head/tail adding logic out of the shuffle code and into the __free_one_page function since ultimately that is where it is really needed anyway. By doing this we should be able to reduce the overhead and can consolidate all of the list addition bits in one spot

[virtio-dev] [PATCH v8 QEMU 3/3] virtio-balloon: Provide a interface for unused page reporting

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck Add support for what I am referring to as "unused page reporting". Basically the idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate

[virtio-dev] [PATCH v8 QEMU 2/3] virtio-balloon: Add bit to notify guest of unused page reporting

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck Add a bit for the page reporting feature provided by virtio-balloon. This patch should be replaced once the feature is added to the Linux kernel and the bit is backported into this exported kernel header. Signed-off-by: Alexander Duyck --- include/standard-headers/linux

[virtio-dev] [PATCH v8 QEMU 1/3] virtio-ballon: Implement support for page poison tracking feature

2019-09-06 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[virtio-dev] Re: [PATCH v8 0/7] mm / virtio: Provide support for unused page reporting

2019-09-06 Thread Alexander Duyck
On Fri, Sep 6, 2019 at 8:23 AM Michael S. Tsirkin wrote: > > On Fri, Sep 06, 2019 at 07:53:21AM -0700, Alexander Duyck wrote: > > This series provides an asynchronous means of reporting to a hypervisor > > that a guest page is no longer in use and can have the data associated &

[virtio-dev] [PATCH v9 6/8] mm: Introduce Reported pages

2019-09-07 Thread Alexander Duyck
From: Alexander Duyck In order to pave the way for free page reporting in virtualized environments we will need a way to get pages out of the free lists and identify those pages after they have been returned. To accomplish this, this patch adds the concept of a Reported Buddy, which

[virtio-dev] Re: [PATCH v9 0/8] stg mail -e --version=v9 \

2019-09-11 Thread Alexander Duyck
On Wed, Sep 11, 2019 at 4:36 AM Michal Hocko wrote: > > On Tue 10-09-19 14:23:40, Alexander Duyck wrote: > [...] > > We don't put any limitations on the allocator other then that it needs to > > clean up the metadata on allocation, and that it cannot allocate a page >

[virtio-dev] [PATCH v11 1/6] mm: Adjust shuffle code to allow for future coalescing

2019-10-01 Thread Alexander Duyck
From: Alexander Duyck Move the head/tail adding logic out of the shuffle code and into the __free_one_page function since ultimately that is where it is really needed anyway. By doing this we should be able to reduce the overhead and can consolidate all of the list addition bits in one spot

[virtio-dev] [PATCH v11 0/6] mm / virtio: Provide support for unused page reporting

2019-10-01 Thread Alexander Duyck
o reduce code size Removed dead code in non-reporting path --- Alexander Duyck (6): mm: Adjust shuffle code to allow for future coalescing mm: Use zone and order instead of free area in free_list manipulators mm: Introduce Reported pages mm: Add device side and notifier for unuse

[virtio-dev] [PATCH v11 3/6] mm: Introduce Reported pages

2019-10-01 Thread Alexander Duyck
From: Alexander Duyck In order to pave the way for free page reporting in virtualized environments we will need a way to get pages out of the free lists and identify those pages after they have been returned. To accomplish this, this patch adds the concept of a Reported Buddy, which

[virtio-dev] [PATCH v11 2/6] mm: Use zone and order instead of free area in free_list manipulators

2019-10-01 Thread Alexander Duyck
From: Alexander Duyck In order to enable the use of the zone from the list manipulator functions I will need access to the zone pointer. As it turns out most of the accessors were always just being directly passed >free_area[order] anyway so it would make sense to just f

[virtio-dev] [PATCH v11 4/6] mm: Add device side and notifier for unused page reporting

2019-10-01 Thread Alexander Duyck
From: Alexander Duyck With this patch we are adding the pieces needed to enable the reporting of pages to a specific device. That device needs to register a page reporting device that can be used to handle notifications that that pages are unused. Registering the device will in turn enable

[virtio-dev] [PATCH v11 5/6] virtio-balloon: Pull page poisoning config out of free page hinting

2019-10-01 Thread Alexander Duyck
From: Alexander Duyck Currently the page poisoning setting wasn't being enabled unless free page hinting was enabled. However we will need the page poisoning tracking logic as well for unused page reporting. As such pull it out and make it a separate bit of config in the probe function

[virtio-dev] [PATCH v11 6/6] virtio-balloon: Add support for providing unused page reports to host

2019-10-01 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[virtio-dev] [PATCH v11 QEMU 1/3] virtio-ballon: Implement support for page poison tracking feature

2019-10-01 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[virtio-dev] [PATCH v11 QEMU 3/3] virtio-balloon: Provide a interface for unused page reporting

2019-10-01 Thread Alexander Duyck
From: Alexander Duyck Add support for what I am referring to as "unused page reporting". Basically the idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate

[virtio-dev] [PATCH v11 QEMU 2/3] virtio-balloon: Add bit to notify guest of unused page reporting

2019-10-01 Thread Alexander Duyck
From: Alexander Duyck Add a bit for the page reporting feature provided by virtio-balloon. This patch should be replaced once the feature is added to the Linux kernel and the bit is backported into this exported kernel header. Signed-off-by: Alexander Duyck --- include/standard-headers/linux

[virtio-dev] Re: [PATCH v11 0/6] mm / virtio: Provide support for unused page reporting

2019-10-01 Thread Alexander Duyck
On Tue, 2019-10-01 at 17:35 +0200, David Hildenbrand wrote: > On 01.10.19 17:29, Alexander Duyck wrote: > > This series provides an asynchronous means of reporting to a hypervisor > > that a guest page is no longer in use and can have the data associated > > with it dropp

[virtio-dev] Re: [PATCH v10 0/6] mm / virtio: Provide support for unused page reporting

2019-09-26 Thread Alexander Duyck
On Thu, Sep 26, 2019 at 5:22 AM Michal Hocko wrote: > > On Tue 24-09-19 08:20:22, Alexander Duyck wrote: > > On Tue, Sep 24, 2019 at 7:23 AM Michal Hocko wrote: > > > > > > On Wed 18-09-19 10:52:25, Alexander Duyck wrote: > > > [...] > > > > In

[virtio-dev] Re: [PATCH v10 3/6] mm: Introduce Reported pages

2019-09-23 Thread Alexander Duyck
On Mon, Sep 23, 2019 at 8:00 AM Michael S. Tsirkin wrote: > > On Mon, Sep 23, 2019 at 07:50:15AM -0700, Alexander Duyck wrote: > > > > +static inline void > > > > +page_reporting_reset_boundary(struct zone *zone, unsigned int order, > > > >

<    1   2   3   4   >