search for: vhost_can_busy_pol

Displaying 20 results from an estimated 136 matches for "vhost_can_busy_pol".

Did you mean: vhost_can_busy_poll
2018 Jul 03
0
[PATCH v2 net-next 2/4] vhost_net: Avoid tx vring kicks during busyloop
...anged, 22 insertions(+), 13 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 3939c50..811c0e5 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -396,13 +396,10 @@ static inline unsigned long busy_clock(void) return local_clock() >> 10; } -static bool vhost_can_busy_poll(struct vhost_dev *dev, - unsigned long endtime) +static bool vhost_can_busy_poll(unsigned long endtime) { - return likely(!need_resched()) && - likely(!time_after(busy_clock(), endtime)) && - likely(!signal_pending(current)) && - !vhost_has_work(dev...
2018 Jun 29
5
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...insertions(+), 30 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index eeaf6739215f..0e85f628b965 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -391,13 +391,14 @@ static inline unsigned long busy_clock(void) return local_clock() >> 10; } -static bool vhost_can_busy_poll(struct vhost_dev *dev, - unsigned long endtime) +static bool vhost_can_busy_poll(unsigned long endtime) { - return likely(!need_resched()) && - likely(!time_after(busy_clock(), endtime)) && - likely(!signal_pending(current)) && - !vhost_has_work(dev...
2018 Jun 29
5
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...insertions(+), 30 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index eeaf6739215f..0e85f628b965 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -391,13 +391,14 @@ static inline unsigned long busy_clock(void) return local_clock() >> 10; } -static bool vhost_can_busy_poll(struct vhost_dev *dev, - unsigned long endtime) +static bool vhost_can_busy_poll(unsigned long endtime) { - return likely(!need_resched()) && - likely(!time_after(busy_clock(), endtime)) && - likely(!signal_pending(current)) && - !vhost_has_work(dev...
2018 Jul 03
11
[PATCH v2 net-next 0/4] vhost_net: Avoid vq kicks during busyloop
Under heavy load vhost tx busypoll tend not to suppress vq kicks, which causes poor guest tx performance. The detailed scenario is described in commitlog of patch 2. Rx seems not to have that serious problem, but for consistency I made a similar change on rx to avoid rx wakeups (patch 3). Additionary patch 4 is to avoid rx kicks under heavy load during busypoll. Tx performance is greatly improved
2016 Feb 28
1
[PATCH V3 3/3] vhost_net: basic polling support
...+ b/drivers/vhost/net.c > @@ -287,6 +287,44 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) > rcu_read_unlock_bh(); > } > > +static inline unsigned long busy_clock(void) > +{ > + return local_clock() >> 10; > +} > + > +static bool vhost_can_busy_poll(struct vhost_dev *dev, > + unsigned long endtime) > +{ > + return likely(!need_resched()) && > + likely(!time_after(busy_clock(), endtime)) && > + likely(!signal_pending(current)) && > + !vhost_has_work(dev) && > +...
2016 Feb 28
1
[PATCH V3 3/3] vhost_net: basic polling support
...+ b/drivers/vhost/net.c > @@ -287,6 +287,44 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) > rcu_read_unlock_bh(); > } > > +static inline unsigned long busy_clock(void) > +{ > + return local_clock() >> 10; > +} > + > +static bool vhost_can_busy_poll(struct vhost_dev *dev, > + unsigned long endtime) > +{ > + return likely(!need_resched()) && > + likely(!time_after(busy_clock(), endtime)) && > + likely(!signal_pending(current)) && > + !vhost_has_work(dev) && > +...
2016 Jan 20
3
[PATCH V2 3/3] vhost_net: basic polling support
...b/drivers/vhost/net.c > @@ -287,6 +287,41 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) > rcu_read_unlock_bh(); > } > > +static inline unsigned long busy_clock(void) > +{ > + return local_clock() >> 10; > +} > + > +static bool vhost_can_busy_poll(struct vhost_dev *dev, > + unsigned long endtime) > +{ > + return likely(!need_resched()) && > + likely(!time_after(busy_clock(), endtime)) && > + likely(!signal_pending(current)) && > + !vhost_has_work(dev) && > +...
2016 Jan 20
3
[PATCH V2 3/3] vhost_net: basic polling support
...b/drivers/vhost/net.c > @@ -287,6 +287,41 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) > rcu_read_unlock_bh(); > } > > +static inline unsigned long busy_clock(void) > +{ > + return local_clock() >> 10; > +} > + > +static bool vhost_can_busy_poll(struct vhost_dev *dev, > + unsigned long endtime) > +{ > + return likely(!need_resched()) && > + likely(!time_after(busy_clock(), endtime)) && > + likely(!signal_pending(current)) && > + !vhost_has_work(dev) && > +...
2016 Jan 21
1
[PATCH V2 3/3] vhost_net: basic polling support
...py_callback(struct ubuf_info *ubuf, bool success) > >> rcu_read_unlock_bh(); > >> } > >> > >>+static inline unsigned long busy_clock(void) > >>+{ > >>+ return local_clock() >> 10; > >>+} > >>+ > >>+static bool vhost_can_busy_poll(struct vhost_dev *dev, > >>+ unsigned long endtime) > >>+{ > >>+ return likely(!need_resched()) && > >>+ likely(!time_after(busy_clock(), endtime)) && > >>+ likely(!signal_pending(current)) && > >>+...
2016 Jan 21
1
[PATCH V2 3/3] vhost_net: basic polling support
...py_callback(struct ubuf_info *ubuf, bool success) > >> rcu_read_unlock_bh(); > >> } > >> > >>+static inline unsigned long busy_clock(void) > >>+{ > >>+ return local_clock() >> 10; > >>+} > >>+ > >>+static bool vhost_can_busy_poll(struct vhost_dev *dev, > >>+ unsigned long endtime) > >>+{ > >>+ return likely(!need_resched()) && > >>+ likely(!time_after(busy_clock(), endtime)) && > >>+ likely(!signal_pending(current)) && > >>+...
2018 Jun 29
0
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...it a/drivers/vhost/net.c b/drivers/vhost/net.c > index eeaf6739215f..0e85f628b965 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -391,13 +391,14 @@ static inline unsigned long busy_clock(void) > return local_clock() >> 10; > } > > -static bool vhost_can_busy_poll(struct vhost_dev *dev, > - unsigned long endtime) > +static bool vhost_can_busy_poll(unsigned long endtime) > { > - return likely(!need_resched()) && > - likely(!time_after(busy_clock(), endtime)) && > - likely(!signal_pending(current)) &&amp...
2018 Jun 29
0
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...a/drivers/vhost/net.c b/drivers/vhost/net.c > index eeaf6739215f..0e85f628b965 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -391,13 +391,14 @@ static inline unsigned long busy_clock(void) > return local_clock() >> 10; > } > > -static bool vhost_can_busy_poll(struct vhost_dev *dev, > - unsigned long endtime) > +static bool vhost_can_busy_poll(unsigned long endtime) > { > - return likely(!need_resched()) && > - likely(!time_after(busy_clock(), endtime)) && > - likely(!signal_pending(current)) &&am...
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...gt; @@ -437,10 +438,21 @@ static int vhost_net_tx_get_vq_desc(struct >> vhost_net *net, >> ? ????? if (r == vq->num && vq->busyloop_timeout) { >> ????????? preempt_disable(); >> -??????? endtime = busy_clock() + vq->busyloop_timeout; >> -??????? while (vhost_can_busy_poll(vq->dev, endtime) && >> -?????????????? vhost_vq_avail_empty(vq->dev, vq)) >> +??????? if (vq->busyloop_endtime) { >> +??????????? endtime = vq->busyloop_endtime; >> +??????????? vq->busyloop_endtime = 0; > > Looks like endtime may be before cu...
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...gt; @@ -437,10 +438,21 @@ static int vhost_net_tx_get_vq_desc(struct >> vhost_net *net, >> ? ????? if (r == vq->num && vq->busyloop_timeout) { >> ????????? preempt_disable(); >> -??????? endtime = busy_clock() + vq->busyloop_timeout; >> -??????? while (vhost_can_busy_poll(vq->dev, endtime) && >> -?????????????? vhost_vq_avail_empty(vq->dev, vq)) >> +??????? if (vq->busyloop_endtime) { >> +??????????? endtime = vq->busyloop_endtime; >> +??????????? vq->busyloop_endtime = 0; > > Looks like endtime may be before cu...
2018 Jul 03
2
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...VQ_TX: VHOST_NET_VQ_RX); > + > + vhost_disable_notify(&net->dev, vq); > + sock = rvq->private_data; > + busyloop_timeout = rx ? rvq->busyloop_timeout : tvq->busyloop_timeout; > + > + preempt_disable(); > + endtime = busy_clock() + busyloop_timeout; > + while (vhost_can_busy_poll(tvq->dev, endtime) && > + !(sock && sk_has_rx_data(sock->sk)) && > + vhost_vq_avail_empty(tvq->dev, tvq)) > + cpu_relax(); > + preempt_enable(); > + > + if ((rx && !vhost_vq_avail_empty(&net->dev, vq)) || > + (...
2018 Jul 03
2
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...VQ_TX: VHOST_NET_VQ_RX); > + > + vhost_disable_notify(&net->dev, vq); > + sock = rvq->private_data; > + busyloop_timeout = rx ? rvq->busyloop_timeout : tvq->busyloop_timeout; > + > + preempt_disable(); > + endtime = busy_clock() + busyloop_timeout; > + while (vhost_can_busy_poll(tvq->dev, endtime) && > + !(sock && sk_has_rx_data(sock->sk)) && > + vhost_vq_avail_empty(tvq->dev, tvq)) > + cpu_relax(); > + preempt_enable(); > + > + if ((rx && !vhost_vq_avail_empty(&net->dev, vq)) || > + (...
2016 Feb 28
2
[PATCH V3 3/3] vhost_net: basic polling support
...b/drivers/vhost/net.c > @@ -287,6 +287,44 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) > rcu_read_unlock_bh(); > } > > +static inline unsigned long busy_clock(void) > +{ > + return local_clock() >> 10; > +} > + > +static bool vhost_can_busy_poll(struct vhost_dev *dev, > + unsigned long endtime) > +{ > + return likely(!need_resched()) && > + likely(!time_after(busy_clock(), endtime)) && > + likely(!signal_pending(current)) && > + !vhost_has_work(dev) && > +...
2016 Feb 28
2
[PATCH V3 3/3] vhost_net: basic polling support
...b/drivers/vhost/net.c > @@ -287,6 +287,44 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) > rcu_read_unlock_bh(); > } > > +static inline unsigned long busy_clock(void) > +{ > + return local_clock() >> 10; > +} > + > +static bool vhost_can_busy_poll(struct vhost_dev *dev, > + unsigned long endtime) > +{ > + return likely(!need_resched()) && > + likely(!time_after(busy_clock(), endtime)) && > + likely(!signal_pending(current)) && > + !vhost_has_work(dev) && > +...
2016 Feb 26
7
[PATCH V3 0/3] basic busy polling support for vhost_net
This series tries to add basic busy polling for vhost net. The idea is simple: at the end of tx/rx processing, busy polling for new tx added descriptor and rx receive socket for a while. The maximum number of time (in us) could be spent on busy polling was specified ioctl. Test A were done through: - 50 us as busy loop timeout - Netperf 2.6 - Two machines with back to back connected mlx4 - Guest
2016 Feb 26
7
[PATCH V3 0/3] basic busy polling support for vhost_net
This series tries to add basic busy polling for vhost net. The idea is simple: at the end of tx/rx processing, busy polling for new tx added descriptor and rx receive socket for a while. The maximum number of time (in us) could be spent on busy polling was specified ioctl. Test A were done through: - 50 us as busy loop timeout - Netperf 2.6 - Two machines with back to back connected mlx4 - Guest