Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2016 08:57:25 +0000
From:      "sepherosa_gmail.com (Sepherosa Ziehau)" <phabric-noreply@FreeBSD.org>
To:        freebsd-virtualization@freebsd.org
Subject:   [Differential] [Request, 10 lines] D5276: hyperv/hn: Use taskqueue_enqueue()
Message-ID:  <differential-rev-PHID-DREV-bl63sdhvw5ko2c6tvsfu-req@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

--b1_257aab858dd35c55cd87df5f4039c6fb
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: 8bit

sepherosa_gmail.com created this revision.
sepherosa_gmail.com added reviewers: network, adrian, delphij, royger, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com.
sepherosa_gmail.com added subscribers: freebsd-net-list, freebsd-virtualization-list.

REVISION SUMMARY
  This also eases experiment on the non-fast taskqueue.

REVISION DETAIL
  https://reviews.freebsd.org/D5276

AFFECTED FILES
  sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c

CHANGE DETAILS
  diff --git a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  --- a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  +++ b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  @@ -1549,7 +1549,7 @@
   			return;
   	}
   do_sched:
  -	taskqueue_enqueue_fast(sc->hn_tx_taskq, &sc->hn_start_task);
  +	taskqueue_enqueue(sc->hn_tx_taskq, &sc->hn_start_task);
   }
   
   static void
  @@ -1566,10 +1566,8 @@
   		atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE);
   		sched = hn_start_locked(ifp, sc->hn_direct_tx_size);
   		NV_UNLOCK(sc);
  -		if (sched) {
  -			taskqueue_enqueue_fast(sc->hn_tx_taskq,
  -			    &sc->hn_start_task);
  -		}
  +		if (sched)
  +			taskqueue_enqueue(sc->hn_tx_taskq, &sc->hn_start_task);
   	} else {
   do_sched:
   		/*
  @@ -1579,7 +1577,7 @@
   		 * races.
   		 */
   		atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE);
  -		taskqueue_enqueue_fast(sc->hn_tx_taskq, &sc->hn_txeof_task);
  +		taskqueue_enqueue(sc->hn_tx_taskq, &sc->hn_txeof_task);
   	}
   }

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: sepherosa_gmail.com, network, adrian, delphij, royger, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com
Cc: freebsd-virtualization-list, freebsd-net-list

--b1_257aab858dd35c55cd87df5f4039c6fb
Content-Type: text/x-patch; charset=utf-8; name="D5276.13288.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="D5276.13288.patch"

ZGlmZiAtLWdpdCBhL3N5cy9kZXYvaHlwZXJ2L25ldHZzYy9odl9uZXR2c2NfZHJ2X2ZyZWVic2Qu
YyBiL3N5cy9kZXYvaHlwZXJ2L25ldHZzYy9odl9uZXR2c2NfZHJ2X2ZyZWVic2QuYwotLS0gYS9z
eXMvZGV2L2h5cGVydi9uZXR2c2MvaHZfbmV0dnNjX2Rydl9mcmVlYnNkLmMKKysrIGIvc3lzL2Rl
di9oeXBlcnYvbmV0dnNjL2h2X25ldHZzY19kcnZfZnJlZWJzZC5jCkBAIC0xNTQ5LDcgKzE1NDks
NyBAQAogCQkJcmV0dXJuOwogCX0KIGRvX3NjaGVkOgotCXRhc2txdWV1ZV9lbnF1ZXVlX2Zhc3Qo
c2MtPmhuX3R4X3Rhc2txLCAmc2MtPmhuX3N0YXJ0X3Rhc2spOworCXRhc2txdWV1ZV9lbnF1ZXVl
KHNjLT5obl90eF90YXNrcSwgJnNjLT5obl9zdGFydF90YXNrKTsKIH0KIAogc3RhdGljIHZvaWQK
QEAgLTE1NjYsMTAgKzE1NjYsOCBAQAogCQlhdG9taWNfY2xlYXJfaW50KCZpZnAtPmlmX2Rydl9m
bGFncywgSUZGX0RSVl9PQUNUSVZFKTsKIAkJc2NoZWQgPSBobl9zdGFydF9sb2NrZWQoaWZwLCBz
Yy0+aG5fZGlyZWN0X3R4X3NpemUpOwogCQlOVl9VTkxPQ0soc2MpOwotCQlpZiAoc2NoZWQpIHsK
LQkJCXRhc2txdWV1ZV9lbnF1ZXVlX2Zhc3Qoc2MtPmhuX3R4X3Rhc2txLAotCQkJICAgICZzYy0+
aG5fc3RhcnRfdGFzayk7Ci0JCX0KKwkJaWYgKHNjaGVkKQorCQkJdGFza3F1ZXVlX2VucXVldWUo
c2MtPmhuX3R4X3Rhc2txLCAmc2MtPmhuX3N0YXJ0X3Rhc2spOwogCX0gZWxzZSB7CiBkb19zY2hl
ZDoKIAkJLyoKQEAgLTE1NzksNyArMTU3Nyw3IEBACiAJCSAqIHJhY2VzLgogCQkgKi8KIAkJYXRv
bWljX2NsZWFyX2ludCgmaWZwLT5pZl9kcnZfZmxhZ3MsIElGRl9EUlZfT0FDVElWRSk7Ci0JCXRh
c2txdWV1ZV9lbnF1ZXVlX2Zhc3Qoc2MtPmhuX3R4X3Rhc2txLCAmc2MtPmhuX3R4ZW9mX3Rhc2sp
OworCQl0YXNrcXVldWVfZW5xdWV1ZShzYy0+aG5fdHhfdGFza3EsICZzYy0+aG5fdHhlb2ZfdGFz
ayk7CiAJfQogfQogCgo=


--b1_257aab858dd35c55cd87df5f4039c6fb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?differential-rev-PHID-DREV-bl63sdhvw5ko2c6tvsfu-req>