git: 0d8cec7658d5 - main - graid: Set G_CF_DIRECT_SEND for task consumer.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 28 Jan 2022 16:32:34 UTC
The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=0d8cec7658d50e4190899376330c2c1eb5d8c659 commit 0d8cec7658d50e4190899376330c2c1eb5d8c659 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2022-01-28 16:09:30 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2022-01-28 16:09:30 +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 --- 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 807cca5b7e50..fc5852d28fd7 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)