git: efb36504c51c - stable/13 - graid: Set G_CF_DIRECT_SEND for task consumer.

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Fri, 11 Feb 2022 01:10:37 UTC
The branch stable/13 has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=efb36504c51c39b2d5900d21bfbf0f73c8e94a2e

commit efb36504c51c39b2d5900d21bfbf0f73c8e94a2e
Author:     Alexander Motin <mav@FreeBSD.org>
AuthorDate: 2022-01-28 16:09:30 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2022-02-11 00:50:45 +0000

    graid: Set G_CF_DIRECT_SEND for task consumer.
    
    Unlike normal consumers all taste consumer I/O is synchronous, done
    with g_read_data() and without any locks held.  It makes no sense to
    delegate I/O submission to g_down thread.
    
    This should remove number of context switches during disk retaste.
    
    MFC after:      2 weeks
    
    (cherry picked from commit 0d8cec7658d50e4190899376330c2c1eb5d8c659)
---
 sys/geom/raid/g_raid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/geom/raid/g_raid.c b/sys/geom/raid/g_raid.c
index 31adb0f2b513..d88f1fb316c8 100644
--- a/sys/geom/raid/g_raid.c
+++ b/sys/geom/raid/g_raid.c
@@ -2227,7 +2227,7 @@ g_raid_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
 	 */
 	gp->orphan = g_raid_taste_orphan;
 	cp = g_new_consumer(gp);
-	cp->flags |= G_CF_DIRECT_RECEIVE;
+	cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
 	if (g_attach(cp, pp) != 0)
 		goto ofail2;
 	if (g_access(cp, 1, 0, 0) != 0)