search for: arch_implements_flush_dcache_pag

Displaying 20 results from an estimated 38 matches for "arch_implements_flush_dcache_pag".

2019 Apr 23
7
[RFC PATCH V3 0/6] vhost: accelerate metadata access
This series tries to access virtqueue metadata through kernel virtual address instead of copy_user() friends since they had too much overheads like checks, spec barriers or even hardware feature toggling. This is done through setup kernel address through direct mapping and co-opreate VM management with MMU notifiers. Test shows about 23% improvement on TX PPS. TCP_STREAM doesn't see obvious
2019 Jun 06
2
[PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition
...mm) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index c5d950cf7627..d9f36c479fa7 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -95,8 +95,9 @@ struct vhost_uaddr { bool write; }; -#define VHOST_ARCH_CAN_ACCEL_UACCESS defined(CONFIG_MMU_NOTIFIER) && \ - ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 +#if defined(CONFIG_MMU_NOTIFIER) && ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 +#define VHOST_ARCH_CAN_ACCEL_UACCESS +#endif /* The virtqueue structure describes a queue attached to a device. */ struct vhost_virtqueue { @@ -109,7 +110,7 @@ struct vhost_virtqueue { struct vring_avai...
2019 Jun 06
2
[PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition
...mm) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index c5d950cf7627..d9f36c479fa7 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -95,8 +95,9 @@ struct vhost_uaddr { bool write; }; -#define VHOST_ARCH_CAN_ACCEL_UACCESS defined(CONFIG_MMU_NOTIFIER) && \ - ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 +#if defined(CONFIG_MMU_NOTIFIER) && ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 +#define VHOST_ARCH_CAN_ACCEL_UACCESS +#endif /* The virtqueue structure describes a queue attached to a device. */ struct vhost_virtqueue { @@ -109,7 +110,7 @@ struct vhost_virtqueue { struct vring_avai...
2019 Jul 26
2
[PATCH] vhost: disable metadata prefetch optimization
...| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 819296332913..42a8c2a13ab1 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -96,7 +96,7 @@ struct vhost_uaddr { }; #if defined(CONFIG_MMU_NOTIFIER) && ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 -#define VHOST_ARCH_CAN_ACCEL_UACCESS 1 +#define VHOST_ARCH_CAN_ACCEL_UACCESS 0 #else #define VHOST_ARCH_CAN_ACCEL_UACCESS 0 #endif -- MST
2019 Jul 26
2
[PATCH] vhost: disable metadata prefetch optimization
...| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 819296332913..42a8c2a13ab1 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -96,7 +96,7 @@ struct vhost_uaddr { }; #if defined(CONFIG_MMU_NOTIFIER) && ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 -#define VHOST_ARCH_CAN_ACCEL_UACCESS 1 +#define VHOST_ARCH_CAN_ACCEL_UACCESS 0 #else #define VHOST_ARCH_CAN_ACCEL_UACCESS 0 #endif -- MST
2019 Jun 06
0
[PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition
...ers/vhost/vhost.h > index c5d950cf7627..d9f36c479fa7 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -95,8 +95,9 @@ struct vhost_uaddr { > bool write; > }; > > -#define VHOST_ARCH_CAN_ACCEL_UACCESS defined(CONFIG_MMU_NOTIFIER) && \ > - ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 > +#if defined(CONFIG_MMU_NOTIFIER) && ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 > +#define VHOST_ARCH_CAN_ACCEL_UACCESS > +#endif > > /* The virtqueue structure describes a queue attached to a device. */ > struct vhost_virtqueue { > @@ -109,7 +110,7 @@ struct vh...
2019 Jul 26
0
[PATCH] vhost: disable metadata prefetch optimization
...ion(-) > > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 819296332913..42a8c2a13ab1 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -96,7 +96,7 @@ struct vhost_uaddr { > }; > > #if defined(CONFIG_MMU_NOTIFIER) && ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 > -#define VHOST_ARCH_CAN_ACCEL_UACCESS 1 > +#define VHOST_ARCH_CAN_ACCEL_UACCESS 0 > #else > #define VHOST_ARCH_CAN_ACCEL_UACCESS 0 > #endif
2019 Aug 07
0
[PATCH V3 01/10] vhost: disable metadata prefetch optimization
...| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 819296332913..42a8c2a13ab1 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -96,7 +96,7 @@ struct vhost_uaddr { }; #if defined(CONFIG_MMU_NOTIFIER) && ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 -#define VHOST_ARCH_CAN_ACCEL_UACCESS 1 +#define VHOST_ARCH_CAN_ACCEL_UACCESS 0 #else #define VHOST_ARCH_CAN_ACCEL_UACCESS 0 #endif -- 2.18.1
2019 Sep 05
0
[PATCH 2/2] vhost: re-introducing metadata acceleration through kernel virtual address
...m_user() and may not for arch that has virtual tagged cache since extra cache flushing is needed to eliminate the alias. This will result complex logic and bad performance. For those archs, this patch simply go for copy_to/from_user() friends. This is done by ruling out kernel mapping codes through ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE. Note that this is only done when device IOTLB is not enabled. We could use similar method to optimize IOTLB in the future. Tests shows at most about 22% improvement on TX PPS when using virtio-user + vhost_net + xdp1 + TAP on 4.0GHz Kaby Lake. SMAP on | SMAP off Before: 4.9Mpps | 6.9Mp...
2019 Apr 09
2
[PATCH net] vhost: flush dcache page when logging dirty pages
We set dirty bit through setting up kmaps and access them through kernel virtual address, this may result alias in virtually tagged caches that require a dcache flush afterwards. Cc: Christoph Hellwig <hch at infradead.org> Cc: James Bottomley <James.Bottomley at HansenPartnership.com> Cc: Andrea Arcangeli <aarcange at redhat.com> Fixes: 3a4d5c94e9593 ("vhost_net: a
2019 Apr 09
2
[PATCH net] vhost: flush dcache page when logging dirty pages
We set dirty bit through setting up kmaps and access them through kernel virtual address, this may result alias in virtually tagged caches that require a dcache flush afterwards. Cc: Christoph Hellwig <hch at infradead.org> Cc: James Bottomley <James.Bottomley at HansenPartnership.com> Cc: Andrea Arcangeli <aarcange at redhat.com> Fixes: 3a4d5c94e9593 ("vhost_net: a
2019 Aug 07
11
[PATCH V3 00/10] Fixes for metadata accelreation
Hi all: This series try to fix several issues introduced by meta data accelreation series. Please review. Changes from V2: - use seqlck helper to synchronize MMU notifier with vhost worker Changes from V1: - try not use RCU to syncrhonize MMU notifier with vhost worker - set dirty pages after no readers - return -EAGAIN only when we find the range is overlapped with metadata Jason Wang (9):
2019 Sep 05
8
[PATCH 0/2] Revert and rework on the metadata accelreation
Hi: Per request from Michael and Jason, the metadata accelreation is reverted in this version and rework in next version. Please review. Thanks Jason Wang (2): Revert "vhost: access vq metadata through kernel virtual address" vhost: re-introducing metadata acceleration through kernel virtual address drivers/vhost/vhost.c | 202 +++++++++++++++++++++++++-----------------
2019 Sep 05
8
[PATCH 0/2] Revert and rework on the metadata accelreation
Hi: Per request from Michael and Jason, the metadata accelreation is reverted in this version and rework in next version. Please review. Thanks Jason Wang (2): Revert "vhost: access vq metadata through kernel virtual address" vhost: re-introducing metadata acceleration through kernel virtual address drivers/vhost/vhost.c | 202 +++++++++++++++++++++++++-----------------
2013 Mar 27
0
[PATCH 04/22] block: Convert bio_for_each_segment() to bvec_iter
...he_page(bv->bv_page); + bio_for_each_segment(bv, bio, iter) { + char *data = bvec_kmap_irq(&bv, &flags); + memset(data, 0, bv.bv_len); + flush_dcache_page(bv.bv_page); bvec_kunmap_irq(data, &flags); } } @@ -1676,10 +1676,10 @@ void bio_check_pages_dirty(struct bio *bio) #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE void bio_flush_dcache_pages(struct bio *bi) { - int i; struct bio_vec *bvec; + struct bvec_iter iter; - bio_for_each_segment(bvec, bi, i) + bio_for_each_segment(bvec, bi, iter) flush_dcache_page(bvec->bv_page); } EXPORT_SYMBOL(bio_flush_dcache_pages); diff --git a/fs/gfs2/lops.c b/fs...
2013 Mar 27
0
[PATCH 04/22] block: Convert bio_for_each_segment() to bvec_iter
...he_page(bv->bv_page); + bio_for_each_segment(bv, bio, iter) { + char *data = bvec_kmap_irq(&bv, &flags); + memset(data, 0, bv.bv_len); + flush_dcache_page(bv.bv_page); bvec_kunmap_irq(data, &flags); } } @@ -1676,10 +1676,10 @@ void bio_check_pages_dirty(struct bio *bio) #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE void bio_flush_dcache_pages(struct bio *bi) { - int i; struct bio_vec *bvec; + struct bvec_iter iter; - bio_for_each_segment(bvec, bi, i) + bio_for_each_segment(bvec, bi, iter) flush_dcache_page(bvec->bv_page); } EXPORT_SYMBOL(bio_flush_dcache_pages); diff --git a/fs/gfs2/lops.c b/fs...
2019 Sep 06
1
[PATCH 1/2] Revert "vhost: access vq metadata through kernel virtual address"
...T_NUM_ADDRS = 3, > }; > > -struct vhost_map { > - int npages; > - void *addr; > - struct page **pages; > -}; > - > -struct vhost_uaddr { > - unsigned long uaddr; > - size_t size; > - bool write; > -}; > - > -#if defined(CONFIG_MMU_NOTIFIER) && ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE == 0 > -#define VHOST_ARCH_CAN_ACCEL_UACCESS 0 > -#else > -#define VHOST_ARCH_CAN_ACCEL_UACCESS 0 > -#endif > - > /* The virtqueue structure describes a queue attached to a device. */ > struct vhost_virtqueue { > struct vhost_dev *dev; > @@ -111,22 +90,7 @@ struct vh...
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
...he_page(bv->bv_page); + bio_for_each_segment(bv, bio, iter) { + char *data = bvec_kmap_irq(&bv, &flags); + memset(data, 0, bv.bv_len); + flush_dcache_page(bv.bv_page); bvec_kunmap_irq(data, &flags); } } @@ -1677,10 +1677,10 @@ void bio_check_pages_dirty(struct bio *bio) #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE void bio_flush_dcache_pages(struct bio *bi) { - int i; struct bio_vec *bvec; + struct bvec_iter iter; - bio_for_each_segment(bvec, bi, i) + bio_for_each_segment(bvec, bi, iter) flush_dcache_page(bvec->bv_page); } EXPORT_SYMBOL(bio_flush_dcache_pages); @@ -1830,7 +1830,7 @@ void bio_t...
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
...he_page(bv->bv_page); + bio_for_each_segment(bv, bio, iter) { + char *data = bvec_kmap_irq(&bv, &flags); + memset(data, 0, bv.bv_len); + flush_dcache_page(bv.bv_page); bvec_kunmap_irq(data, &flags); } } @@ -1677,10 +1677,10 @@ void bio_check_pages_dirty(struct bio *bio) #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE void bio_flush_dcache_pages(struct bio *bi) { - int i; struct bio_vec *bvec; + struct bvec_iter iter; - bio_for_each_segment(bvec, bi, i) + bio_for_each_segment(bvec, bi, iter) flush_dcache_page(bvec->bv_page); } EXPORT_SYMBOL(bio_flush_dcache_pages); @@ -1830,7 +1830,7 @@ void bio_t...
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
...he_page(bv->bv_page); + bio_for_each_segment(bv, bio, iter) { + char *data = bvec_kmap_irq(&bv, &flags); + memset(data, 0, bv.bv_len); + flush_dcache_page(bv.bv_page); bvec_kunmap_irq(data, &flags); } } @@ -1677,10 +1677,10 @@ void bio_check_pages_dirty(struct bio *bio) #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE void bio_flush_dcache_pages(struct bio *bi) { - int i; struct bio_vec *bvec; + struct bvec_iter iter; - bio_for_each_segment(bvec, bi, i) + bio_for_each_segment(bvec, bi, iter) flush_dcache_page(bvec->bv_page); } EXPORT_SYMBOL(bio_flush_dcache_pages); @@ -1830,7 +1830,7 @@ void bio_t...