A friendly reminder :)
Thanks,
Ben
在 2019/10/4 上午12:41, Andrea Arcangeli 写道:
On Thu, Oct 03, 2019 at 11:49:42AM +0800, Ben Luo wrote:
Currently, no hugepage split code can transfer the reserved bit
from head to tail during the split, so checking the head can't make
a difference
at boot, if any driver sets the
reserved bit of head page before mapping the hugepage in userland,
it needs to set the reserved bit in all subpages to be safe.
Signed-off-by: Ben Luo
---
drivers/vfio/vfio_iommu_type1.c | 26 --
1 file changed, 4 insertions(+), 22 deletions
A friendly reminder.
Thanks,
Ben
在 2019/9/2 下午12:01, Ben Luo 写道:
Currently, VFIO takes a free-then-request-irq way to do interrupt
affinity setting and masking/unmasking for a VM with device passthru
via VFIO. Sometimes it only changes the cookie data of irqaction or even
changes nothing
在 2019/8/30 上午1:06, Alex Williamson 写道:
On Fri, 30 Aug 2019 00:58:22 +0800
Ben Luo wrote:
在 2019/8/28 下午11:55, Alex Williamson 写道:
On Wed, 28 Aug 2019 12:28:04 +0800
Ben Luo wrote:
currently, if the page is not a tail of compound page, it will be
checked twice for the same thing
process.
Signed-off-by: Ben Luo
---
include/linux/interrupt.h | 3 ++
kernel/irq/manage.c | 75 +++
2 files changed, 78 insertions(+)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 5b8328a..09b6a0f 100644
--- a/include
ger a free-then-request-irq action, which actually
changes nothing in irqaction.
This patch makes use of irq_update_devid() and optimize
both cases above, which reduces the risk of losing interrupt
and also cuts some overhead.
Signed-off-by: Ben Luo
---
drivers/vfio/pci/vfio_pci_int
__free_irq()/__free_percpu_irq() need to return if called from IRQ
context because the interrupt handler loop runs with desc->lock dropped
and dev_id can be subject to load and store tearing. Also move WARNs
out of lock region and print out dev_id to help debugging.
Signed-off-by: Ben
to enhance error recovery etc. in free irq per tglx's comments
- enhance error recovery code and debugging info in irq_update_devid
- use __must_check in external referencing of this function
- use EXPORT_SYMBOL_GPL for irq_update_devid
- reformat code of patch 3 for better readability
Ben Luo (3
在 2019/8/31 上午4:06, Alex Williamson 写道:
On Fri, 30 Aug 2019 16:42:06 +0800
Ben Luo wrote:
When userspace (e.g. qemu) triggers a switch between KVM
irqfd and userspace eventfd, only dev_id of irqaction
(i.e. the "trigger" in this patch's context) will be
changed, but a free-then-r
Signed-off-by: Ben Luo
---
drivers/vfio/pci/vfio_pci_intrs.c | 124 ++
1 file changed, 87 insertions(+), 37 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c
b/drivers/vfio/pci/vfio_pci_intrs.c
index 3fa3f72..d3a93d7 100644
--- a/driver
process.
Signed-off-by: Ben Luo
---
include/linux/interrupt.h | 3 ++
kernel/irq/manage.c | 75 +++
2 files changed, 78 insertions(+)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 5b8328a..09b6a0f 100644
--- a/include
__free_irq()/__free_percpu_irq() need to return if called from IRQ
context because the interrupt handler loop runs with desc->lock dropped
and dev_id can be subject to load and store tearing. Also move WARNs
out of lock region and print out dev_id to help debugging.
Signed-off-by: Ben
in irq_update_devid
- use __must_check in external referencing of this function
- use EXPORT_SYMBOL_GPL for irq_update_devid
- reformat code of patch 3 for better readability
Ben Luo (3):
genirq: enhance error recovery code in free irq
genirq: introduce irq_update_devid()
vfio/pci: make use
在 2019/8/28 下午11:55, Alex Williamson 写道:
On Wed, 28 Aug 2019 12:28:04 +0800
Ben Luo wrote:
currently, if the page is not a tail of compound page, it will be
checked twice for the same thing.
Signed-off-by: Ben Luo
---
drivers/vfio/vfio_iommu_type1.c | 3 +--
1 file changed, 1 insertion
在 2019/8/29 上午1:23, Alex Williamson 写道:
On Wed, 28 Aug 2019 18:08:02 +0800
Ben Luo wrote:
在 2019/8/28 上午4:33, Alex Williamson 写道:
On Thu, 22 Aug 2019 23:34:43 +0800
Ben Luo wrote:
When userspace (e.g. qemu) triggers a switch between KVM
irqfd and userspace eventfd, only dev_id of irq
在 2019/8/28 上午4:33, Alex Williamson 写道:
On Thu, 22 Aug 2019 23:34:43 +0800
Ben Luo wrote:
When userspace (e.g. qemu) triggers a switch between KVM
irqfd and userspace eventfd, only dev_id of irq action
(i.e. the "trigger" in this patch's context) will be
changed, but a free-then-r
currently, if the page is not a tail of compound page, it will be
checked twice for the same thing.
Signed-off-by: Ben Luo
---
drivers/vfio/vfio_iommu_type1.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
currently, if the page is not a tail of compound page, it will be
checked twice for the same thing.
Signed-off-by: Ben Luo
---
drivers/vfio/vfio_iommu_type1.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1
e overhead.
Signed-off-by: Ben Luo
---
drivers/vfio/pci/vfio_pci_intrs.c | 112 +-
1 file changed, 74 insertions(+), 38 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c
b/drivers/vfio/pci/vfio_pci_intrs.c
index 3fa3f72..60d3023 100644
--- a/driver
__free_irq()/__free_percpu_irq() need to return if called from IRQ
context because the interrupt handler loop runs with desc->lock dropped
and dev_id can be subject to load and store tearing. Also move WARNs
out of lock region and print out dev_id to help debugging.
Signed-off-by: Ben
process.
Signed-off-by: Ben Luo
---
include/linux/interrupt.h | 3 ++
kernel/irq/manage.c | 75 +++
2 files changed, 78 insertions(+)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 5b8328a..09b6a0f 100644
--- a/include
readability
Ben Luo (3):
genirq: enhance error recovery code in free irq
genirq: introduce irq_update_devid()
vfio/pci: make use of irq_update_devid and optimize irq ops
drivers/vfio/pci/vfio_pci_intrs.c | 112 +-
include/linux/interrupt.h | 3 +
kernel
referencing to different fds' contexts.
So, instead of free/request irq, only update dev_id of irqaction.
This narrows the gap for setting up new irq (and irte, if has)
and also gains some performance benefit.
Signed-off-by: Ben Luo
Reviewed-by: Liu Jiang
Reviewed-by: Thomas Gleixner
---
include/linux
e overhead.
Signed-off-by: Ben Luo
Reviewed-by: Liu Jiang
Reviewed-by: Zou Nanhai
Reviewed-by: Yunsheng Lin
---
drivers/vfio/pci/vfio_pci_intrs.c | 101 --
1 file changed, 63 insertions(+), 38 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c
b/driver
Per Thomas Gleixner's comments:
1) free_irq/free_percpu_irq returns if called from IRQ context
2) move WARN out of the locked region and print out dev_id
Signed-off-by: Ben Luo
---
kernel/irq/manage.c | 32
1 file changed, 20 insertions(+), 12 deletions(-)
diff
EXPORT_SYMBOL_GPL for update_irq_devid
- reformat code of patch 3 for better readability
Ben Luo (3):
genirq: enhance error recovery code in free irq
genirq: introduce update_irq_devid()
vfio_pci: make use of update_irq_devid and optimize irq ops
drivers/vfio/pci/vfio_pci_intrs.c | 101
e overhead.
Signed-off-by: Ben Luo
Reviewed-by: Liu Jiang
Reviewed-by: Zou Nanhai
Reviewed-by: Yunsheng Lin
---
drivers/vfio/pci/vfio_pci_intrs.c | 99 ---
1 file changed, 61 insertions(+), 38 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c
b/driver
referencing to different fds' contexts.
So, instead of free/request irq, only update dev_id of irqaction.
This narrows the gap for setting up new irq (and irte, if has)
and also gains some performance benefit.
Signed-off-by: Ben Luo
Reviewed-by: Liu Jiang
Reviewed-by: Thomas Gleixner
---
include/linux
1 to enhance error recovery etc. in free irq per tglx's comments
- enhance error recovery code and debugging info in update_irq_devid
- use __must_check in external referencing of update_irq_devid
- use EXPORT_SYMBOL_GPL for update_irq_devid
- reformat code of patch 3 for better readability
Ben
Per Thomas Gleixner's comments:
1) free_irq/free_percpu_irq returns if called from IRQ context
2) move WARN out of the locked region and print out dev_id
Signed-off-by: Ben Luo
---
kernel/irq/manage.c | 32
1 file changed, 20 insertions(+), 12 deletions(-)
diff
e overhead.
Signed-off-by: Ben Luo
Reviewed-by: Liu Jiang
---
drivers/vfio/pci/vfio_pci_intrs.c | 100 +++---
1 file changed, 62 insertions(+), 38 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c
b/drivers/vfio/pci/vfio_pci_intrs.c
index 3fa3f72..1323
referencing to different fds' contexts.
So, instead of free/request irq, only update dev_id of irqaction.
This narrows the gap for setting up new irq (and irte, if has)
and also gains some performance benefit.
Signed-off-by: Ben Luo
Reviewed-by: Liu Jiang
---
include/linux/interrupt.h | 3 ++
kernel
the risk of losing interrupt, this may lead to a
VM hung forever in waiting IO completion
This patchset solved this issue by:
patch 1 introduces update_irq_devid to only update dev_id of irqaction
patch 2 make use of update_irq_devid and optimize irq operations in VFIO
Ben Luo (2):
genirq
33 matches
Mail list logo