Re: [PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands

2020-03-10 Thread Hannes Reinecke
On 3/11/20 7:22 AM, Christoph Hellwig wrote: > On Tue, Mar 10, 2020 at 09:08:56PM +, John Garry wrote: >> On 10/03/2020 18:32, Christoph Hellwig wrote: >>> On Wed, Mar 11, 2020 at 12:25:28AM +0800, John Garry wrote: From: Hannes Reinecke Allocate a separate 'reserved_cmd_q' for

Re: [PATCH RFC v2 01/24] scsi: add 'nr_reserved_cmds' field to the SCSI host template

2020-03-10 Thread Hannes Reinecke
On 3/11/20 12:08 AM, Ming Lei wrote: > On Wed, Mar 11, 2020 at 12:25:27AM +0800, John Garry wrote: >> From: Hannes Reinecke >> >> Add a new field 'nr_reserved_cmds' to the SCSI host template to >> instruct the block layer to set aside a tag space for reserved >> commands. >> >> Signed-off-by: Hann

[PATCH -next 000/491] treewide: use fallthrough;

2020-03-10 Thread Joe Perches
es matched by all F: patterns in in each section. Done via the perl script below and the previously posted cvt_fallthrough.pl script. Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/ These patches are based on next-20200310 and are available in gi

Re: [PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands

2020-03-10 Thread Christoph Hellwig
On Tue, Mar 10, 2020 at 09:08:56PM +, John Garry wrote: > On 10/03/2020 18:32, Christoph Hellwig wrote: > > On Wed, Mar 11, 2020 at 12:25:28AM +0800, John Garry wrote: > > > From: Hannes Reinecke > > > > > > Allocate a separate 'reserved_cmd_q' for sending reserved commands. > > > > Why? Re

Re: [PATCH RFC v2 01/24] scsi: add 'nr_reserved_cmds' field to the SCSI host template

2020-03-10 Thread Ming Lei
On Wed, Mar 11, 2020 at 12:25:27AM +0800, John Garry wrote: > From: Hannes Reinecke > > Add a new field 'nr_reserved_cmds' to the SCSI host template to > instruct the block layer to set aside a tag space for reserved > commands. > > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/scsi_lib.

Re: [PATCH v3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread David Hildenbrand
> Am 10.03.2020 um 22:25 schrieb Michael S. Tsirkin : > > On Tue, Mar 10, 2020 at 08:13:19PM +0100, David Hildenbrand wrote: >>> Should this have: >>> >>> Cc: sta...@vger.kernel.org # 4.19+ >> >> I guess as nothing will actually "crash" it's not worth stable. > > > No - it's a regression, i

Re: [PATCH v3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread Michael S. Tsirkin
On Tue, Mar 10, 2020 at 08:13:19PM +0100, David Hildenbrand wrote: > > Should this have: > > > > Cc: sta...@vger.kernel.org # 4.19+ > > I guess as nothing will actually "crash" it's not worth stable. No - it's a regression, it would be a stable candidate from that POV. The issue is the patch si

Re: [PATCH v3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread David Hildenbrand
On 10.03.20 20:05, David Rientjes wrote: > On Tue, 10 Mar 2020, David Hildenbrand wrote: > >> Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") >> changed the behavior when deflation happens automatically. Instead of >> deflating when called by the OOM handler, the shrinke

Re: [PATCH v3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread David Rientjes via Virtualization
On Tue, 10 Mar 2020, David Hildenbrand wrote: > Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") > changed the behavior when deflation happens automatically. Instead of > deflating when called by the OOM handler, the shrinker is used. > > However, the balloon is not simp

Re: [PATCH RFC v2 22/24] scsi: drop scsi command list

2020-03-10 Thread Christoph Hellwig
On Wed, Mar 11, 2020 at 12:25:48AM +0800, John Garry wrote: > From: Hannes Reinecke > > No users left, kill it. > > Signed-off-by: Hannes Reinecke Wasn't this part of a series from Hannes that already got merged? ___ Virtualization mailing list Virtu

Re: [PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands

2020-03-10 Thread Christoph Hellwig
On Wed, Mar 11, 2020 at 12:25:28AM +0800, John Garry wrote: > From: Hannes Reinecke > > Allocate a separate 'reserved_cmd_q' for sending reserved commands. Why? Reserved command specifically are not in any way tied to queues. ___ Virtualization mailin

Re: [PATCH v3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread Tyler Sanderson via Virtualization
On Tue, Mar 10, 2020 at 4:39 AM David Hildenbrand wrote: > > Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") > changed the behavior when deflation happens automatically. Instead of > deflating when called by the OOM handler, the shrinker is used. > > However, the balloon

Re: [PATCH v1] MAINTAINERS: Add myself as virtio-balloon co-maintainer

2020-03-10 Thread Michael S. Tsirkin
On Tue, Mar 10, 2020 at 12:54:11PM +0100, David Hildenbrand wrote: > As suggested by Michael, let's add me as co-maintainer of virtio-balloon. > While at it, also add "include/linux/balloon_compaction.h" to the file > list. > > Cc: Michael S. Tsirkin > Cc: Jason Wang > Cc: Greg Kroah-Hartman >

Re: [PATCH v1 07/11] virtio-mem: Allow to offline partially unplugged memory blocks

2020-03-10 Thread David Hildenbrand
On 10.03.20 12:59, Michal Hocko wrote: > On Tue 10-03-20 12:46:05, David Hildenbrand wrote: >> On 10.03.20 12:43, Michal Hocko wrote: >>> On Mon 02-03-20 14:49:37, David Hildenbrand wrote: >>> [...] +static void virtio_mem_notify_going_offline(struct virtio_mem *vm, +

Re: [PATCH v1 07/11] virtio-mem: Allow to offline partially unplugged memory blocks

2020-03-10 Thread Michal Hocko
On Tue 10-03-20 12:46:05, David Hildenbrand wrote: > On 10.03.20 12:43, Michal Hocko wrote: > > On Mon 02-03-20 14:49:37, David Hildenbrand wrote: > > [...] > >> +static void virtio_mem_notify_going_offline(struct virtio_mem *vm, > >> + unsigned long mb_id) > >>

[PATCH v1] MAINTAINERS: Add myself as virtio-balloon co-maintainer

2020-03-10 Thread David Hildenbrand
As suggested by Michael, let's add me as co-maintainer of virtio-balloon. While at it, also add "include/linux/balloon_compaction.h" to the file list. Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Greg Kroah-Hartman Signed-off-by: David Hildenbrand --- MAINTAINERS | 9 + 1 file changed, 9

Re: [PATCH v1 06/11] mm: Allow to offline unmovable PageOffline() pages via MEM_GOING_OFFLINE

2020-03-10 Thread David Hildenbrand
On 10.03.20 12:47, Michal Hocko wrote: > On Mon 02-03-20 14:49:36, David Hildenbrand wrote: >> virtio-mem wants to allow to offline memory blocks of which some parts >> were unplugged (allocated via alloc_contig_range()), especially, to later >> offline and remove completely unplugged memory blocks

Re: [PATCH v1 06/11] mm: Allow to offline unmovable PageOffline() pages via MEM_GOING_OFFLINE

2020-03-10 Thread Michal Hocko
On Mon 02-03-20 14:49:36, David Hildenbrand wrote: > virtio-mem wants to allow to offline memory blocks of which some parts > were unplugged (allocated via alloc_contig_range()), especially, to later > offline and remove completely unplugged memory blocks. The important part > is that PageOffline()

Re: [PATCH v1 07/11] virtio-mem: Allow to offline partially unplugged memory blocks

2020-03-10 Thread David Hildenbrand
On 10.03.20 12:43, Michal Hocko wrote: > On Mon 02-03-20 14:49:37, David Hildenbrand wrote: > [...] >> +static void virtio_mem_notify_going_offline(struct virtio_mem *vm, >> +unsigned long mb_id) >> +{ >> +const unsigned long nr_pages = PFN_DOWN(vm->subbl

Re: [PATCH v1 07/11] virtio-mem: Allow to offline partially unplugged memory blocks

2020-03-10 Thread Michal Hocko
On Mon 02-03-20 14:49:37, David Hildenbrand wrote: [...] > +static void virtio_mem_notify_going_offline(struct virtio_mem *vm, > + unsigned long mb_id) > +{ > + const unsigned long nr_pages = PFN_DOWN(vm->subblock_size); > + unsigned long pfn; > +

[PATCH v3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread David Hildenbrand
Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") changed the behavior when deflation happens automatically. Instead of deflating when called by the OOM handler, the shrinker is used. However, the balloon is not simply some other slab cache that should be shrunk when under

Re: [PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread David Hildenbrand
On 10.03.20 12:19, Michael S. Tsirkin wrote: > On Tue, Mar 10, 2020 at 12:12:50PM +0100, David Hildenbrand wrote: static void virtio_balloon_unregister_shrinker(struct virtio_balloon *vb) @@ -971,7 +950,22 @@ static int virtballoon_probe(struct virtio_device *vdev)

Re: [PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread Michael S. Tsirkin
On Tue, Mar 10, 2020 at 12:12:50PM +0100, David Hildenbrand wrote: > >> static void virtio_balloon_unregister_shrinker(struct virtio_balloon *vb) > >> @@ -971,7 +950,22 @@ static int virtballoon_probe(struct virtio_device > >> *vdev) > >> VIRTIO_BALLOO

Re: [PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread David Hildenbrand
>> static void virtio_balloon_unregister_shrinker(struct virtio_balloon *vb) >> @@ -971,7 +950,22 @@ static int virtballoon_probe(struct virtio_device *vdev) >>VIRTIO_BALLOON_CMD_ID_STOP); >> spin_lock_init(&vb->free_page_list_lock); >>

Re: [PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread Michael S. Tsirkin
On Tue, Mar 10, 2020 at 11:39:03AM +0100, David Hildenbrand wrote: > Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") > changed the behavior when deflation happens automatically. Instead of > deflating when called by the OOM handler, the shrinker is used. > > However, the

[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread David Hildenbrand
Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") changed the behavior when deflation happens automatically. Instead of deflating when called by the OOM handler, the shrinker is used. However, the balloon is not simply some other slab cache that should be shrunk when under

[PATCH 15/15] iommu: Move fwspec->iommu_priv to struct dev_iommu

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Move the pointer for iommu private data from struct iommu_fwspec to struct dev_iommu. Tested-by: Will Deacon # arm-smmu Signed-off-by: Joerg Roedel --- include/linux/iommu.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/iommu.h b/i

[PATCH 09/15] iommu/arm-smmu-v3: Use accessor functions for iommu private data

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Make use of dev_iommu_priv_set/get() functions in the code. Tested-by: Hanjun Guo Signed-off-by: Joerg Roedel --- drivers/iommu/arm-smmu-v3.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-

[PATCH 14/15] iommu/virtio: Use accessor functions for iommu private data

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Make use of dev_iommu_priv_set/get() functions. Signed-off-by: Joerg Roedel --- drivers/iommu/virtio-iommu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c index cce329d71fba..8ead57

[PATCH 10/15] iommu/arm-smmu: Use accessor functions for iommu private data

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Make use of dev_iommu_priv_set/get() functions and simplify the code where possible with this change. Tested-by: Will Deacon # arm-smmu Signed-off-by: Joerg Roedel --- drivers/iommu/arm-smmu.c | 56 +--- 1 file changed, 29 insertions(+),

[PATCH 03/15] drm/msm/mdp5: Remove direct access of dev->iommu_fwspec

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Use the accessor functions instead of directly dereferencing dev->iommu_fwspec. Signed-off-by: Joerg Roedel --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gp

[PATCH 02/15] ACPI/IORT: Remove direct access of dev->iommu_fwspec

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Use the accessor functions instead of directly dereferencing dev->iommu_fwspec. Tested-by: Hanjun Guo Signed-off-by: Joerg Roedel --- drivers/acpi/arm64/iort.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi

[PATCH 05/15] iommu: Rename struct iommu_param to dev_iommu

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel The term dev_iommu aligns better with other existing structures and their accessor functions. Tested-by: Will Deacon # arm-smmu Signed-off-by: Joerg Roedel --- drivers/iommu/iommu.c | 28 ++-- include/linux/device.h | 6 +++--- include/linux/iommu.

[PATCH 13/15] iommu/qcom: Use accessor functions for iommu private data

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Make use of dev_iommu_priv_set/get() functions. Signed-off-by: Joerg Roedel --- drivers/iommu/qcom_iommu.c | 61 ++ 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c ind

[PATCH 06/15] iommu: Move iommu_fwspec to struct dev_iommu

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Move the iommu_fwspec pointer in struct device into struct dev_iommu. This is a step in the effort to reduce the iommu related pointers in struct device to one. Tested-by: Will Deacon # arm-smmu Signed-off-by: Joerg Roedel --- drivers/iommu/iommu.c | 3 +++ include/linux/

[PATCH 08/15] iommu: Introduce accessors for iommu private data

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Add dev_iommu_priv_get/set() functions to access per-device iommu private data. This makes it easier to move the pointer to a different location. Tested-by: Will Deacon # arm-smmu Signed-off-by: Joerg Roedel --- include/linux/iommu.h | 10 ++ 1 file changed, 10 inse

[PATCH 00/15 v2] iommu: Move iommu_fwspec out of 'struct device'

2020-03-10 Thread Joerg Roedel
Hi, here is a patch-set to rename iommu_param to dev_iommu and establish it as a struct for generic per-device iommu-data. Also move the iommu_fwspec pointer from struct device into dev_iommu to have less iommu-related pointers in struct device. The bigger part of this patch-set moves the iommu_p

[PATCH 07/15] iommu/arm-smmu: Fix uninitilized variable warning

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Some unrelated changes in the iommu code caused a new warning to appear in the arm-smmu driver: CC drivers/iommu/arm-smmu.o drivers/iommu/arm-smmu.c: In function 'arm_smmu_add_device': drivers/iommu/arm-smmu.c:1441:2: warning: 'smmu' may be used uninitialized in this f

[PATCH 01/15] iommu: Define dev_iommu_fwspec_get() for !CONFIG_IOMMU_API

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel There are users outside of the IOMMU code that need to call that function. Define it for !CONFIG_IOMMU_API too so that compilation does not break. Reported-by: kbuild test robot Signed-off-by: Joerg Roedel --- include/linux/iommu.h | 4 1 file changed, 4 insertions(+)

[PATCH 11/15] iommu/renesas: Use accessor functions for iommu private data

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Make use of dev_iommu_priv_set/get() functions. Signed-off-by: Joerg Roedel --- drivers/iommu/ipmmu-vmsa.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index ecb3f9464dd5..310cf09feea3 1006

[PATCH 12/15] iommu/mediatek: Use accessor functions for iommu private data

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Make use of dev_iommu_priv_set/get() functions. Signed-off-by: Joerg Roedel --- drivers/iommu/mtk_iommu.c| 13 ++--- drivers/iommu/mtk_iommu_v1.c | 14 +++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/dri

[PATCH 04/15] iommu/tegra-gart: Remove direct access of dev->iommu_fwspec

2020-03-10 Thread Joerg Roedel
From: Joerg Roedel Use the accessor functions instead of directly dereferencing dev->iommu_fwspec. Signed-off-by: Joerg Roedel --- drivers/iommu/tegra-gart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c index 3fb7ba