Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-04-08 Thread Nitesh Narayan Lal
On 4/7/21 11:18 AM, Nitesh Narayan Lal wrote: > On 4/6/21 1:22 PM, Jesse Brandeburg wrote: >> Continuing a thread from a bit ago... >> >> Nitesh Narayan Lal wrote: >> >>>> After a little more digging, I found out why cpumask_local_spread change >>&g

Re: [RFC][Patch v9 2/6] KVM: Enables the kernel to isolate guest free pages

2019-03-12 Thread Nitesh Narayan Lal
On 3/8/19 4:39 PM, Alexander Duyck wrote: > On Fri, Mar 8, 2019 at 11:39 AM Nitesh Narayan Lal wrote: >> On 3/8/19 2:25 PM, Alexander Duyck wrote: >>> On Fri, Mar 8, 2019 at 11:10 AM Nitesh Narayan Lal >>> wrote: >>>> On 3/8/19 1:06 PM, Alexander Duyck w

Re: [RFC][Patch v9 2/6] KVM: Enables the kernel to isolate guest free pages

2019-03-13 Thread Nitesh Narayan Lal
On 3/12/19 5:13 PM, Alexander Duyck wrote: > On Tue, Mar 12, 2019 at 12:46 PM Nitesh Narayan Lal wrote: >> On 3/8/19 4:39 PM, Alexander Duyck wrote: >>> On Fri, Mar 8, 2019 at 11:39 AM Nitesh Narayan Lal >>> wrote: >>>> On 3/8/19 2:25 PM, Alexander Duyck

Re: [RFC][Patch v9 2/6] KVM: Enables the kernel to isolate guest free pages

2019-03-13 Thread Nitesh Narayan Lal
On 3/13/19 8:17 AM, David Hildenbrand wrote: > On 13.03.19 12:54, Nitesh Narayan Lal wrote: >> On 3/12/19 5:13 PM, Alexander Duyck wrote: >>> On Tue, Mar 12, 2019 at 12:46 PM Nitesh Narayan Lal >>> wrote: >>>> On 3/8/19 4:39 PM, Alexander Duyck wrote: >&

Re: [RFC][Patch v9 0/6] KVM: Guest Free Page Hinting

2019-03-14 Thread Nitesh Narayan Lal
On 3/6/19 1:12 PM, Michael S. Tsirkin wrote: > On Wed, Mar 06, 2019 at 01:07:50PM -0500, Nitesh Narayan Lal wrote: >> On 3/6/19 11:09 AM, Michael S. Tsirkin wrote: >>> On Wed, Mar 06, 2019 at 10:50:42AM -0500, Nitesh Narayan Lal wrote: >>>> The following patch-set p

[RFC][QEMU PATCH] KVM: Support for guest free page hinting

2019-02-04 Thread Nitesh Narayan Lal
This patch enables QEMU to recieve free page address from the guest and to use madvise to make them available to the host. --- hw/virtio/trace-events| 1 + hw/virtio/virtio-balloon.c| 82 +++ hw/virtio/virtio.c

[RFC][Patch v8 1/7] KVM: Support for guest free page hinting

2019-02-04 Thread Nitesh Narayan Lal
This patch includes the following: 1. Basic skeleton for the support 2. Enablement of x86 platform to use the same Signed-off-by: Nitesh Narayan Lal --- arch/x86/Kbuild | 2 +- arch/x86/kvm/Kconfig | 8 arch/x86/kvm/Makefile| 2 ++ include/linux/gfp.h

Re: [RFC][Patch v8 1/7] KVM: Support for guest free page hinting

2019-02-05 Thread Nitesh Narayan Lal
On 2/4/19 11:14 PM, Michael S. Tsirkin wrote: > On Mon, Feb 04, 2019 at 03:18:48PM -0500, Nitesh Narayan Lal wrote: >> This patch includes the following: >> 1. Basic skeleton for the support >> 2. Enablement of x86 platform to use the same >> >> Signed-off-by: Ni

Re: [RFC][Patch v8 1/7] KVM: Support for guest free page hinting

2019-02-05 Thread Nitesh Narayan Lal
On 2/5/19 11:27 AM, Michael S. Tsirkin wrote: > On Tue, Feb 05, 2019 at 08:06:33AM -0500, Nitesh Narayan Lal wrote: >> On 2/4/19 11:14 PM, Michael S. Tsirkin wrote: >>> On Mon, Feb 04, 2019 at 03:18:48PM -0500, Nitesh Narayan Lal wrote: >>>> This patch include

Re: [RFC PATCH 0/4] kvm: Report unused guest pages to host

2019-02-05 Thread Nitesh Narayan Lal
On 2/4/19 1:15 PM, Alexander Duyck wrote: > This patch set provides a mechanism by which guests can notify the host of > pages that are not currently in use. Using this data a KVM host can more > easily balance memory workloads between guests and improve overall system > performance by avoiding un

Re: [RFC][Patch v8 6/7] KVM: Enables the kernel to isolate and report free pages

2019-02-05 Thread Nitesh Narayan Lal
On 2/5/19 3:45 PM, Michael S. Tsirkin wrote: > On Mon, Feb 04, 2019 at 03:18:53PM -0500, Nitesh Narayan Lal wrote: >> This patch enables the kernel to scan the per cpu array and >> compress it by removing the repetitive/re-allocated pages. >> Once the per cpu array is complet

Re: [RFC][Patch v8 5/7] virtio: Enables to add a single descriptor to the host

2019-02-06 Thread Nitesh Narayan Lal
On 2/5/19 3:49 PM, Michael S. Tsirkin wrote: > On Mon, Feb 04, 2019 at 03:18:52PM -0500, Nitesh Narayan Lal wrote: >> This patch enables the caller to expose a single buffers to the >> other end using vring descriptor. It also allows the caller to >> perform this action in

Re: [RFC][Patch v8 5/7] virtio: Enables to add a single descriptor to the host

2019-02-06 Thread Nitesh Narayan Lal
On 2/6/19 8:15 AM, Luiz Capitulino wrote: > On Wed, 6 Feb 2019 07:56:37 -0500 > Nitesh Narayan Lal wrote: > >> On 2/5/19 3:49 PM, Michael S. Tsirkin wrote: >>> On Mon, Feb 04, 2019 at 03:18:52PM -0500, Nitesh Narayan Lal wrote: >>>> This patch enables the

Re: [RFC][Patch v8 5/7] virtio: Enables to add a single descriptor to the host

2019-02-06 Thread Nitesh Narayan Lal
On 2/6/19 8:29 AM, Luiz Capitulino wrote: > On Wed, 6 Feb 2019 08:24:14 -0500 > Nitesh Narayan Lal wrote: > >> On 2/6/19 8:15 AM, Luiz Capitulino wrote: >>> On Wed, 6 Feb 2019 07:56:37 -0500 >>> Nitesh Narayan Lal wrote: >>> >>>> On 2/5/19

Re: [RFC][Patch v8 5/7] virtio: Enables to add a single descriptor to the host

2019-02-06 Thread Nitesh Narayan Lal
On 2/6/19 1:03 PM, Michael S. Tsirkin wrote: > On Wed, Feb 06, 2019 at 07:56:37AM -0500, Nitesh Narayan Lal wrote: >> On 2/5/19 3:49 PM, Michael S. Tsirkin wrote: >>> On Mon, Feb 04, 2019 at 03:18:52PM -0500, Nitesh Narayan Lal wrote: >>>> This patch enables the cal

Re: Thoughts on simple scanner approach for free page hinting

2019-04-08 Thread Nitesh Narayan Lal
On 4/5/19 8:09 PM, Alexander Duyck wrote: > So I am starting this thread as a spot to collect my thoughts on the > current guest free page hinting design as well as point out a few > possible things we could do to improve upon it. > > 1. The current design isn't likely going to scale well to multi

Re: Thoughts on simple scanner approach for free page hinting

2019-04-08 Thread Nitesh Narayan Lal
On 4/8/19 12:36 PM, David Hildenbrand wrote: > On 06.04.19 02:09, Alexander Duyck wrote: >> So I am starting this thread as a spot to collect my thoughts on the >> current guest free page hinting design as well as point out a few >> possible things we could do to improve upon it. >> >> 1. The curre

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-11 Thread Nitesh Narayan Lal
On 2/6/21 7:43 PM, Nitesh Narayan Lal wrote: > On 2/5/21 5:23 PM, Thomas Gleixner wrote: >> On Thu, Feb 04 2021 at 14:17, Nitesh Narayan Lal wrote: >>> On 2/4/21 2:06 PM, Marcelo Tosatti wrote: >>>>>> How about adding a new flag for isolcpus instead? >

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-28 Thread Nitesh Narayan Lal
On 1/28/21 11:59 AM, Marcelo Tosatti wrote: > On Thu, Jan 28, 2021 at 05:02:41PM +0100, Thomas Gleixner wrote: >> On Wed, Jan 27 2021 at 09:19, Marcelo Tosatti wrote: >>> On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: > + hk_flags = HK_FLAG_DOMAIN | HK_FLAG_MANAGED_IRQ; > +

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-04 Thread Nitesh Narayan Lal
On 2/4/21 1:15 PM, Marcelo Tosatti wrote: > On Thu, Jan 28, 2021 at 09:01:37PM +0100, Thomas Gleixner wrote: >> On Thu, Jan 28 2021 at 13:59, Marcelo Tosatti wrote: The whole pile wants to be reverted. It's simply broken in several ways. >>> I was asking for your comments on interaction with

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-04 Thread Nitesh Narayan Lal
On 2/4/21 2:06 PM, Marcelo Tosatti wrote: > On Thu, Feb 04, 2021 at 01:47:38PM -0500, Nitesh Narayan Lal wrote: [...] >>>>> Nitesh, is there anything preventing this from being fixed >>>>> in userspace ? (as Thomas suggested previously). >>>> Eve

Re: WARNING: suspicious RCU usage - while installing a VM on a CPU listed under nohz_full

2020-07-29 Thread Nitesh Narayan Lal
On 7/28/20 10:38 PM, Wanpeng Li wrote: > Hi Nitesh, > On Wed, 29 Jul 2020 at 09:00, Wanpeng Li wrote: >> On Tue, 28 Jul 2020 at 22:40, Nitesh Narayan Lal wrote: >>> Hi, >>> >>> I have recently come across an RCU trace with the 5.8-rc7 kernel that has

Re: WARNING: suspicious RCU usage - while installing a VM on a CPU listed under nohz_full

2020-07-30 Thread Nitesh Narayan Lal
On 7/29/20 8:34 AM, Nitesh Narayan Lal wrote: > On 7/28/20 10:38 PM, Wanpeng Li wrote: >> Hi Nitesh, >> On Wed, 29 Jul 2020 at 09:00, Wanpeng Li wrote: >>> On Tue, 28 Jul 2020 at 22:40, Nitesh Narayan Lal wrote: >>>> Hi, >>>> >>>> I ha

Re: [PATCH] Revert "KVM: x86: Unconditionally enable irqs in guest context"

2021-01-12 Thread Nitesh Narayan Lal
On 1/7/21 4:33 AM, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > >> On Wed, Jan 06, 2021, Vitaly Kuznetsov wrote: >>> Looking back, I don't quite understand why we wanted to account ticks >>> between vmexit and exiting guest context as 'guest' in the first place; >>> to my understangin

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-03-04 Thread Nitesh Narayan Lal
On 2/11/21 10:55 AM, Nitesh Narayan Lal wrote: > On 2/6/21 7:43 PM, Nitesh Narayan Lal wrote: >> On 2/5/21 5:23 PM, Thomas Gleixner wrote: >>> On Thu, Feb 04 2021 at 14:17, Nitesh Narayan Lal wrote: >>>> On 2/4/21 2:06 PM, Marcelo Tosatti wrote: >>>>&g

Re: [EXT] Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-03-04 Thread Nitesh Narayan Lal
On 3/4/21 4:13 PM, Alex Belits wrote: > On 3/4/21 10:15, Nitesh Narayan Lal wrote: >> External Email >> >> -- >> >> On 2/11/21 10:55 AM, Nitesh Narayan Lal wrote: >>> On 2/6/21 7:43 PM,

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-04-15 Thread Nitesh Narayan Lal
On 4/14/21 12:11 PM, Jesse Brandeburg wrote: > Nitesh Narayan Lal wrote: > >>> The original issue as seen, was that if you rmmod/insmod a driver >>> *without* irqbalance running, the default irq mask is -1, which means >>> any CPU. The older kernels (this issue

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-04-07 Thread Nitesh Narayan Lal
On 4/6/21 1:22 PM, Jesse Brandeburg wrote: > Continuing a thread from a bit ago... > > Nitesh Narayan Lal wrote: > >>> After a little more digging, I found out why cpumask_local_spread change >>> affects the general/initial smp_affinity for certain device IRQs. >

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-06 Thread Nitesh Narayan Lal
On 2/5/21 5:23 PM, Thomas Gleixner wrote: > On Thu, Feb 04 2021 at 14:17, Nitesh Narayan Lal wrote: >> On 2/4/21 2:06 PM, Marcelo Tosatti wrote: >>>>> How about adding a new flag for isolcpus instead? >>>>> >>>> Do you mean a fla

Possible regression in cpuacct.stats system time

2021-01-04 Thread Nitesh Narayan Lal
Hi, Last year I reported an issue of "suspicious RCU usage" [1] with the debug kernel which was fixed with the patch:     87fa7f3e98 "x86/kvm: Move context tracking where it belongs" Recently I have come across a possible regression because of this patch in the cpuacct.stats system time. With t

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-27 Thread Nitesh Narayan Lal
On 1/27/21 8:09 AM, Marcelo Tosatti wrote: > On Wed, Jan 27, 2021 at 12:36:30PM +, Robin Murphy wrote: >> On 2021-01-27 12:19, Marcelo Tosatti wrote: >>> On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: >>>> Hi, >>>> >>>> On

[PATCH] Revert "KVM: x86: Unconditionally enable irqs in guest context"

2021-01-05 Thread Nitesh Narayan Lal
be required within vcpu_enter_guest anymore. Conflicts: arch/x86/kvm/svm.c Signed-off-by: Nitesh Narayan Lal --- arch/x86/kvm/svm/svm.c | 9 + arch/x86/kvm/x86.c | 11 --- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch

Re: [PATCH] Revert "KVM: x86: Unconditionally enable irqs in guest context"

2021-01-05 Thread Nitesh Narayan Lal
On 1/5/21 7:47 PM, Sean Christopherson wrote: > +tglx > > On Tue, Jan 05, 2021, Nitesh Narayan Lal wrote: >> This reverts commit d7a08882a0a4b4e176691331ee3f492996579534. >> >> After the introduction of the patch: >> >> 87fa7f3e9: x86/kvm: Move contex

[PATCH] crypto: caam - Dynamic allocation of addresses for various memory blocks in CAAM.

2014-08-31 Thread Nitesh Narayan Lal
rious platforms. The block size can be 4K or 64K. The block size can be dynamically determined by reading CTPR register in CAAM. This patch initializes the block addresses dynamically based on the value read from this register. Signed-off-by: Ruchika Gupta Signed-off-by: Nitesh Naraya

Re: [RFC PATCH 4/4] mm: Add merge page notifier

2019-02-11 Thread Nitesh Narayan Lal
On 2/9/19 7:57 PM, Michael S. Tsirkin wrote: > On Mon, Feb 04, 2019 at 10:15:58AM -0800, Alexander Duyck wrote: >> From: Alexander Duyck >> >> Because the implementation was limiting itself to only providing hints on >> pages huge TLB order sized or larger we introduced the possibility for free >

Re: [RFC PATCH 4/4] mm: Add merge page notifier

2019-02-11 Thread Nitesh Narayan Lal
On 2/11/19 9:17 AM, Michael S. Tsirkin wrote: > On Mon, Feb 11, 2019 at 08:30:03AM -0500, Nitesh Narayan Lal wrote: >> On 2/9/19 7:57 PM, Michael S. Tsirkin wrote: >>> On Mon, Feb 04, 2019 at 10:15:58AM -0800, Alexander Duyck wrote: >>>> From: Alexander Duyck >&g

Re: [RFC PATCH 4/4] mm: Add merge page notifier

2019-02-11 Thread Nitesh Narayan Lal
On 2/11/19 12:41 PM, Michael S. Tsirkin wrote: > On Mon, Feb 11, 2019 at 11:24:02AM -0500, Nitesh Narayan Lal wrote: >> On 2/11/19 9:17 AM, Michael S. Tsirkin wrote: >>> On Mon, Feb 11, 2019 at 08:30:03AM -0500, Nitesh Narayan Lal wrote: >>>> On 2/9/19 7:57 PM, Mich

Re: [RFC][Patch v9 0/6] KVM: Guest Free Page Hinting

2019-03-18 Thread Nitesh Narayan Lal
On 3/14/19 12:58 PM, Alexander Duyck wrote: > On Thu, Mar 14, 2019 at 9:43 AM Nitesh Narayan Lal wrote: >> >> On 3/6/19 1:12 PM, Michael S. Tsirkin wrote: >>> On Wed, Mar 06, 2019 at 01:07:50PM -0500, Nitesh Narayan Lal wrote: >>>> On 3/6/19 11:09 AM, Michael

Re: [RFC][Patch v9 0/6] KVM: Guest Free Page Hinting

2019-03-19 Thread Nitesh Narayan Lal
On 3/19/19 9:33 AM, David Hildenbrand wrote: > On 18.03.19 16:57, Nitesh Narayan Lal wrote: >> On 3/14/19 12:58 PM, Alexander Duyck wrote: >>> On Thu, Mar 14, 2019 at 9:43 AM Nitesh Narayan Lal >>> wrote: >>>> On 3/6/19 1:12 PM, Michael S. Tsirkin wrote: &

Re: [RFC][Patch v9 0/6] KVM: Guest Free Page Hinting

2019-03-19 Thread Nitesh Narayan Lal
On 3/19/19 1:38 PM, Alexander Duyck wrote: > On Tue, Mar 19, 2019 at 9:04 AM Nitesh Narayan Lal wrote: >> On 3/19/19 9:33 AM, David Hildenbrand wrote: >>> On 18.03.19 16:57, Nitesh Narayan Lal wrote: >>>> On 3/14/19 12:58 PM, Alexander Duyck wrote: >>>&g

Re: [RFC][Patch v9 0/6] KVM: Guest Free Page Hinting

2019-03-20 Thread Nitesh Narayan Lal
On 3/19/19 1:59 PM, Nitesh Narayan Lal wrote: > On 3/19/19 1:38 PM, Alexander Duyck wrote: >> On Tue, Mar 19, 2019 at 9:04 AM Nitesh Narayan Lal wrote: >>> On 3/19/19 9:33 AM, David Hildenbrand wrote: >>>> On 18.03.19 16:57, Nitesh Narayan Lal wrote: >>>

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

2019-08-30 Thread Nitesh Narayan Lal
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 >> virtual environments. It enables the kernel to track the free pages which >> can be reported

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

2019-08-30 Thread Nitesh Narayan Lal
On 8/30/19 11:31 AM, Alexander Duyck wrote: > 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 th

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

2019-08-22 Thread Nitesh Narayan Lal
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 of the free lists and > identify those pages after they have been returned. To accomplish this, > this patch

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

2019-08-15 Thread Nitesh Narayan Lal
On 8/14/19 12:11 PM, Alexander Duyck wrote: > On Wed, Aug 14, 2019 at 8:49 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 th

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

2019-08-15 Thread Nitesh Narayan Lal
On 8/15/19 9:15 AM, Nitesh Narayan Lal wrote: > On 8/14/19 12:11 PM, Alexander Duyck wrote: >> On Wed, Aug 14, 2019 at 8:49 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

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

2019-08-16 Thread Nitesh Narayan Lal
On 8/15/19 7:00 PM, Alexander Duyck wrote: > On Thu, Aug 15, 2019 at 12:23 PM Nitesh Narayan Lal wrote: [...] >>>>>>> +} >>>>>>> + >>>>>>> +/** >>>>>>> + * __page_reporting_enqueue - tracks the freed page in

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

2019-09-11 Thread Nitesh Narayan Lal
On 9/11/19 8:42 AM, David Hildenbrand wrote: > On 11.09.19 14:25, Michal Hocko wrote: >> On Wed 11-09-19 14:19:41, Michal Hocko wrote: >>> On Wed 11-09-19 08:08:38, Michael S. Tsirkin wrote: On Wed, Sep 11, 2019 at 01:36:19PM +0200, Michal Hocko wrote: > On Tue 10-09-19 14:23:40, Alexand

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

2019-09-11 Thread Nitesh Narayan Lal
On 9/11/19 8:54 AM, Michal Hocko wrote: > On Wed 11-09-19 14:42:41, David Hildenbrand wrote: >> On 11.09.19 14:25, Michal Hocko wrote: >>> On Wed 11-09-19 14:19:41, Michal Hocko wrote: On Wed 11-09-19 08:08:38, Michael S. Tsirkin wrote: > On Wed, Sep 11, 2019 at 01:36:19PM +0200, Michal

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

2019-09-11 Thread Nitesh Narayan Lal
On 9/11/19 9:20 AM, Michal Hocko wrote: > On Wed 11-09-19 15:03:39, David Hildenbrand wrote: >> On 11.09.19 14:54, Michal Hocko wrote: >>> On Wed 11-09-19 14:42:41, David Hildenbrand wrote: On 11.09.19 14:25, Michal Hocko wrote: > On Wed 11-09-19 14:19:41, Michal Hocko wrote: >> On W

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

2019-09-12 Thread Nitesh Narayan Lal
On 9/12/19 3:47 AM, David Hildenbrand wrote: > On 12.09.19 09:16, Michal Hocko wrote: >> On Wed 11-09-19 18:09:18, David Hildenbrand wrote: >>> On 11.09.19 15:51, Michal Hocko wrote: On Wed 11-09-19 15:20:02, Michal Hocko wrote: [...] >> 4. Continuously report, not the "one time rep

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

2019-10-02 Thread Nitesh Narayan Lal
On 10/1/19 8:55 PM, Alexander Duyck wrote: > On Tue, Oct 1, 2019 at 12:16 PM Nitesh Narayan Lal wrote: >> >> On 10/1/19 12:21 PM, Alexander Duyck wrote: >>> On Tue, 2019-10-01 at 17:35 +0200, David Hildenbrand wrote: >>>> On 01.10.19 17:29, Alexander Duyck

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

2019-10-02 Thread Nitesh Narayan Lal
On 10/2/19 3:13 AM, David Hildenbrand wrote: > On 02.10.19 02:55, Alexander Duyck wrote: >> On Tue, Oct 1, 2019 at 12:16 PM Nitesh Narayan Lal wrote: >>> >>> On 10/1/19 12:21 PM, Alexander Duyck wrote: >>>> On Tue, 2019-10-01 at 17:35 +0200, David Hil

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

2019-10-02 Thread Nitesh Narayan Lal
On 10/2/19 10:25 AM, Alexander Duyck wrote: > On Wed, Oct 2, 2019 at 3:37 AM Nitesh Narayan Lal wrote: >> >> On 10/1/19 8:55 PM, Alexander Duyck wrote: >>> On Tue, Oct 1, 2019 at 12:16 PM Nitesh Narayan Lal >>> wrote: >>>> On 10/1/19 12:21 PM, Al

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

2019-10-02 Thread Nitesh Narayan Lal
On 10/1/19 4:25 PM, Alexander Duyck wrote: > On Tue, 2019-10-01 at 15:16 -0400, Nitesh Narayan Lal wrote: >> On 10/1/19 12:21 PM, Alexander Duyck wrote: >>> On Tue, 2019-10-01 at 17:35 +0200, David Hildenbrand wrote: >>>> On 01.10.19 17:29, Alexander Duyck wrote:

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

2019-10-02 Thread Nitesh Narayan Lal
On 10/1/19 4:51 PM, Dave Hansen wrote: > On 10/1/19 1:49 PM, Alexander Duyck wrote: >> So it looks like v12 still has issues. I'm pretty sure you should be using >> spin_lock_irq(), not spin_lock() in page_reporting.c to avoid the >> possibility of an IRQ firing and causing lock recursion on the

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

2019-10-01 Thread Nitesh Narayan Lal
On 10/1/19 12:21 PM, Alexander Duyck wrote: > 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 associ

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

2019-10-01 Thread Nitesh Narayan Lal
On 10/1/19 2:41 PM, David Hildenbrand wrote: >>> I think Michal asked for a performance comparison against Nitesh's >>> approach, to evaluate if keeping the reported state + tracking inside >>> the buddy is really worth it. Do you have any such numbers already? (or >>> did my tired eyes miss them

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

2019-10-09 Thread Nitesh Narayan Lal
On 10/7/19 1:06 PM, Nitesh Narayan Lal wrote: [...] >> So what was the size of your guest? One thing that just occurred to me is >> that you might be running a much smaller guest than I was. > I am running a 30 GB guest. > >>>> If so I would have expected a

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

2019-10-09 Thread Nitesh Narayan Lal
On 10/7/19 1:20 PM, Alexander Duyck wrote: > On Mon, Oct 7, 2019 at 10:07 AM Nitesh Narayan Lal wrote: >> >> On 10/7/19 12:27 PM, Alexander Duyck wrote: >>> On Mon, 2019-10-07 at 12:19 -0400, Nitesh Narayan Lal wrote: >>>> On 10/7/19 11:33 AM, Alexander Duyc

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

2019-10-09 Thread Nitesh Narayan Lal
On 10/9/19 12:50 PM, Alexander Duyck wrote: > On Wed, 2019-10-09 at 12:25 -0400, Nitesh Narayan Lal wrote: >> On 10/7/19 1:20 PM, Alexander Duyck wrote: >>> On Mon, Oct 7, 2019 at 10:07 AM Nitesh Narayan Lal >>> wrote: >>>> On 10/7/19 12:27 PM, Alexande

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

2019-10-09 Thread Nitesh Narayan Lal
On 10/9/19 12:35 PM, Alexander Duyck wrote: > On Wed, 2019-10-09 at 11:21 -0400, Nitesh Narayan Lal wrote: >> On 10/7/19 1:06 PM, Nitesh Narayan Lal wrote: >> [...] >>>> So what was the size of your guest? One thing that just occurred to me is >>>> that yo

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

2019-10-07 Thread Nitesh Narayan Lal
On 10/2/19 10:25 AM, Alexander Duyck wrote: [...] >>> My suggestion would be to look at reworking the patch set and >>> post numbers for my patch set versus the bitmap approach and we can >>> look at them then. >> Agreed. However, in order to fix an issue I have to reproduce it first. > With the

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

2019-10-07 Thread Nitesh Narayan Lal
On 10/7/19 11:33 AM, Alexander Duyck wrote: > On Mon, 2019-10-07 at 08:29 -0400, Nitesh Narayan Lal wrote: >> On 10/2/19 10:25 AM, Alexander Duyck wrote: >> [...] >> You don't have to, I can fix the issues in my patch-set. :) >>> Sounds good. Hopefully the stu

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

2019-10-07 Thread Nitesh Narayan Lal
On 10/7/19 12:27 PM, Alexander Duyck wrote: > On Mon, 2019-10-07 at 12:19 -0400, Nitesh Narayan Lal wrote: >> On 10/7/19 11:33 AM, Alexander Duyck wrote: >>> On Mon, 2019-10-07 at 08:29 -0400, Nitesh Narayan Lal wrote: >>>> On 10/2/19 10:25 AM, Alexander Duyck

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

2019-09-24 Thread Nitesh Narayan Lal
On 9/24/19 11:32 AM, David Hildenbrand wrote: > On 24.09.19 16:23, Michal Hocko wrote: >> On Wed 18-09-19 10:52:25, Alexander Duyck wrote: >> [...] >>> In order to try and keep the time needed to find a non-reported page to >>> a minimum we maintain a "reported_boundary" pointer. This pointer is

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

2019-08-20 Thread Nitesh Narayan Lal
On 8/12/19 4:04 PM, 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 >>> virtual environments. It enables t

Re: [PATCH v1 6/6] virtio-balloon: Add support for aerating memory via hinting

2019-07-18 Thread Nitesh Narayan Lal
On 7/18/19 11:34 AM, Alexander Duyck wrote: > On Wed, Jul 17, 2019 at 10:14 PM Michael S. Tsirkin wrote: >> On Wed, Jul 17, 2019 at 09:43:52AM -0700, Alexander Duyck wrote: >>> On Wed, Jul 17, 2019 at 3:28 AM Michael S. Tsirkin wrote: On Tue, Jul 16, 2019 at 02:06:59PM -0700, Alexander Duy

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

2019-10-23 Thread Nitesh Narayan Lal
On 10/22/19 7:43 PM, Alexander Duyck wrote: > On Tue, 2019-10-22 at 16:01 -0700, Andrew Morton wrote: >> On Tue, 22 Oct 2019 15:27:52 -0700 Alexander Duyck >> wrote: >> [...] >>> There is currently an alternative patch set[1] that has been under work >>> for some time however the v12 version of

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

2019-10-23 Thread Nitesh Narayan Lal
On 10/22/19 6:27 PM, Alexander Duyck wrote: > This series provides an asynchronous means of reporting unused guest > pages to a hypervisor so that the memory associated with those pages can > be dropped and reused by other processes and/or guests. > > When enabled it will allocate a set of statis

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

2019-10-10 Thread Nitesh Narayan Lal
On 10/10/19 3:36 AM, David Hildenbrand wrote: > On 09.10.19 21:46, Nitesh Narayan Lal wrote: >> On 10/9/19 12:35 PM, Alexander Duyck wrote: >>> On Wed, 2019-10-09 at 11:21 -0400, Nitesh Narayan Lal wrote: >>>> On 10/7/19 1:06 PM, Nitesh Narayan Lal wrote: [...] &g

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

2019-10-11 Thread Nitesh Narayan Lal
On 10/10/19 4:36 PM, Alexander Duyck wrote: > On Mon, Aug 12, 2019 at 6:13 AM Nitesh Narayan Lal wrote: > > >> +static int process_free_page(struct page *page, >> +struct page_reporting_config *phconf, int count) >> +{ >&g

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-14 Thread Nitesh Narayan Lal
On 2/14/19 3:48 AM, Wang, Wei W wrote: > On Wednesday, February 13, 2019 8:07 PM, Nitesh Narayan Lal wrote: >> Once the host free the pages. All the isolated pages are returned back >> to the buddy. (This is implemented in hyperlist_ready()) > This actually has the same issue:

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-15 Thread Nitesh Narayan Lal
On 2/15/19 4:05 AM, Wang, Wei W wrote: > On Thursday, February 14, 2019 5:43 PM, David Hildenbrand wrote: >> Yes indeed, that is the important bit. They must not be put pack to the >> buddy before they have been processed by the hypervisor. But as the pages >> are not in the buddy, no one allocati

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-19 Thread Nitesh Narayan Lal
On 2/18/19 4:04 PM, David Hildenbrand wrote: > On 18.02.19 21:40, Nitesh Narayan Lal wrote: >> On 2/18/19 3:31 PM, Michael S. Tsirkin wrote: >>> On Mon, Feb 18, 2019 at 09:04:57PM +0100, David Hildenbrand wrote: >>>>>>>>> So I'm fine with

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-19 Thread Nitesh Narayan Lal
On 2/18/19 9:46 PM, Andrea Arcangeli wrote: > Hello, > > On Mon, Feb 18, 2019 at 03:47:22PM -0800, Alexander Duyck wrote: >> essentially fragmented them. I guess hugepaged went through and >> started trying to reassemble the huge pages and as a result there have >> been apps that ended up consumin

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-19 Thread Nitesh Narayan Lal
On 2/19/19 8:03 AM, David Hildenbrand wrote: > There are two main ways to avoid allocation: > 1. do not add extra data on top of each chunk passed If I am not wrong then this is close to what we have right now. >>> Yes, minus the kthread(s) and eventually with some sort of memory >>> a

Re: [RFC PATCH 0/4] kvm: Report unused guest pages to host

2019-02-07 Thread Nitesh Narayan Lal
On 2/4/19 1:15 PM, Alexander Duyck wrote: > This patch set provides a mechanism by which guests can notify the host of > pages that are not currently in use. Using this data a KVM host can more > easily balance memory workloads between guests and improve overall system > performance by avoiding un

Re: [RFC][Patch v8 4/7] KVM: Disabling page poisoning to prevent corruption

2019-02-07 Thread Nitesh Narayan Lal
On 2/7/19 12:23 PM, Alexander Duyck wrote: > On Mon, Feb 4, 2019 at 2:11 PM Nitesh Narayan Lal wrote: >> This patch disables page poisoning if guest page hinting is enabled. >> It is required to avoid possible guest memory corruption errors. >> Page Poisoning is a feature

Re: [RFC][Patch v8 6/7] KVM: Enables the kernel to isolate and report free pages

2019-02-07 Thread Nitesh Narayan Lal
On 2/7/19 12:43 PM, Alexander Duyck wrote: > On Tue, Feb 5, 2019 at 3:21 PM Michael S. Tsirkin wrote: >> On Tue, Feb 05, 2019 at 04:54:03PM -0500, Nitesh Narayan Lal wrote: >>> On 2/5/19 3:45 PM, Michael S. Tsirkin wrote: >>>> On Mon, Feb 04, 2019 at 03:18:53PM -

Re: [RFC][Patch v8 2/7] KVM: Enabling guest free page hinting via static key

2019-02-08 Thread Nitesh Narayan Lal
On 2/8/19 1:07 PM, Alexander Duyck wrote: > On Mon, Feb 4, 2019 at 2:11 PM Nitesh Narayan Lal wrote: >> This patch enables the guest free page hinting support >> to enable or disable based on the STATIC key which >> could be set via sysctl. >> >>

Re: [RFC][Patch v8 6/7] KVM: Enables the kernel to isolate and report free pages

2019-02-08 Thread Nitesh Narayan Lal
On 2/8/19 12:58 PM, Alexander Duyck wrote: > On Thu, Feb 7, 2019 at 12:50 PM Nitesh Narayan Lal wrote: >> >> On 2/7/19 12:43 PM, Alexander Duyck wrote: >>> On Tue, Feb 5, 2019 at 3:21 PM Michael S. Tsirkin wrote: >>>> On Tue, Feb 05, 2019 at 04:54:03PM -0500

Re: [RFC PATCH 3/4] kvm: Add guest side support for free memory hints

2019-02-08 Thread Nitesh Narayan Lal
On 2/7/19 1:44 PM, Alexander Duyck wrote: > On Thu, 2019-02-07 at 13:21 -0500, Luiz Capitulino wrote: >> On Mon, 04 Feb 2019 10:15:52 -0800 >> Alexander Duyck wrote: >> >>> From: Alexander Duyck >>> >>> Add guest support for providing free memory hints to the KVM hypervisor for >>> freed pages h

[RFC][Patch v8 6/7] KVM: Enables the kernel to isolate and report free pages

2019-02-04 Thread Nitesh Narayan Lal
the buddy. Signed-off-by: Nitesh Narayan Lal --- drivers/virtio/virtio_balloon.c | 56 +++- include/linux/page_hinting.h| 18 ++- include/uapi/linux/virtio_balloon.h | 1 + mm/page_alloc.c | 2 +- virt/kvm/page_hinting.c | 202 +

[RFC][Patch v8 2/7] KVM: Enabling guest free page hinting via static key

2019-02-04 Thread Nitesh Narayan Lal
This patch enables the guest free page hinting support to enable or disable based on the STATIC key which could be set via sysctl. Signed-off-by: Nitesh Narayan Lal --- include/linux/gfp.h | 2 ++ include/linux/page_hinting.h | 5 + kernel/sysctl.c | 9

[RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-04 Thread Nitesh Narayan Lal
The following patch-set proposes an efficient mechanism for handing freed memory between the guest and the host. It enables the guests with no page cache to rapidly free and reclaims memory to and from the host respectively. Benefit: With this patch-series, in our test-case, executed on a single

[RFC][Patch v8 3/7] KVM: Guest free page hinting functional skeleton

2019-02-04 Thread Nitesh Narayan Lal
: Nitesh Narayan Lal --- include/linux/page_hinting.h | 3 ++ virt/kvm/page_hinting.c | 60 +++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/include/linux/page_hinting.h b/include/linux/page_hinting.h index 9bdcf63e1306..2d7ff59f3f6a 100644

[RFC][Patch v8 7/7] KVM: Adding tracepoints for guest page hinting

2019-02-04 Thread Nitesh Narayan Lal
This patch enables to track the pages freed by the guest and the pages isolated by the page hinting code through kernel tracepoints. Signed-off-by: Nitesh Narayan Lal --- include/trace/events/kmem.h | 40 + virt/kvm/page_hinting.c | 10 ++ 2 files

[RFC][Patch v8 4/7] KVM: Disabling page poisoning to prevent corruption

2019-02-04 Thread Nitesh Narayan Lal
. The issue arises when the pattern used for Page Poisoning is 0xaa while the newly allocated page received from the hypervisor by the guest is filled with the pattern 0x00. This will result in memory corruption errors. Signed-off-by: Nitesh Narayan Lal --- include/linux/page_hinting.h | 8

[RFC][Patch v8 5/7] virtio: Enables to add a single descriptor to the host

2019-02-04 Thread Nitesh Narayan Lal
This patch enables the caller to expose a single buffers to the other end using vring descriptor. It also allows the caller to perform this action in synchornous manner by using virtqueue_kick_sync. Signed-off-by: Nitesh Narayan Lal --- drivers/virtio/virtio_ring.c | 72

Re: [RFC][PATCH v11 0/2] mm: Support for page hinting

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 10:58 AM, Alexander Duyck wrote: > On Thu, Jul 11, 2019 at 4:31 AM Nitesh Narayan Lal wrote: >> >> On 7/10/19 7:40 PM, Alexander Duyck wrote: >>> On Wed, Jul 10, 2019 at 12:52 PM Nitesh Narayan Lal >>> wrote: >>> >>> The result

Re: [RFC][PATCH v11 0/2] mm: Support for page hinting

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 11:08 AM, Alexander Duyck wrote: > On Thu, Jul 11, 2019 at 8:04 AM Nitesh Narayan Lal wrote: >> >> On 7/11/19 10:58 AM, Alexander Duyck wrote: >>> On Thu, Jul 11, 2019 at 4:31 AM Nitesh Narayan Lal >>> wrote: >>>> On 7/10/19 7:40 PM

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/10/19 4:45 PM, Dave Hansen wrote: > On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >> +struct zone_free_area { >> +unsigned long *bitmap; >> +unsigned long base_pfn; >> +unsigned long end_pfn; >> +atomic_t free_pages; >> +unsigned l

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 11:25 AM, Nitesh Narayan Lal wrote: > On 7/10/19 4:45 PM, Dave Hansen wrote: >> On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >>> +struct zone_free_area { >>> + unsigned long *bitmap; >>> + unsigned long base_pfn; >>> + unsig

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 12:22 PM, Dave Hansen wrote: > On 7/11/19 8:25 AM, Nitesh Narayan Lal wrote: >> On 7/10/19 4:45 PM, Dave Hansen wrote: >>> On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >>>> +struct zone_free_area { >>>> + unsigned long *bitmap; >>>

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 12:45 PM, Dave Hansen wrote: > On 7/11/19 9:36 AM, Nitesh Narayan Lal wrote: >>>>>> +struct zone_free_area { >>>>>> +unsigned long *bitmap; >>>>>> +unsigned long base_pfn; >>>>&

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/10/19 5:56 PM, Alexander Duyck wrote: > On Wed, Jul 10, 2019 at 12:52 PM Nitesh Narayan Lal wrote: >> This patch introduces the core infrastructure for free page hinting in >> virtual environments. It enables the kernel to track the free pages which >> can be reported

Re: [QEMU Patch] virtio-baloon: Support for page hinting

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 2:55 PM, Michael S. Tsirkin wrote: > On Wed, Jul 10, 2019 at 03:53:03PM -0400, Nitesh Narayan Lal wrote: >> Enables QEMU to perform madvise free on the memory range reported >> by the vm. >> >> Signed-off-by: Nitesh Narayan Lal > Missing second "l

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 7:20 PM, Alexander Duyck wrote: > On Thu, Jul 11, 2019 at 10:58 AM Nitesh Narayan Lal wrote: >> >> On 7/10/19 5:56 PM, Alexander Duyck wrote: >>> On Wed, Jul 10, 2019 at 12:52 PM Nitesh Narayan Lal >>> wrote: >>>> This patch introduces

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-12 Thread Nitesh Narayan Lal
On 7/12/19 12:22 PM, Alexander Duyck wrote: > On Thu, Jul 11, 2019 at 6:13 PM Nitesh Narayan Lal wrote: >> >> On 7/11/19 7:20 PM, Alexander Duyck wrote: >>> On Thu, Jul 11, 2019 at 10:58 AM Nitesh Narayan Lal >>> wrote: >>>> On 7/10/19 5:56 PM

  1   2   3   >