Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 2003 10:57:36 -0600
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        Scott Long <scottl@freebsd.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: API change for bus_dma
Message-ID:  <2947280000.1056905856@aslan.scsiguy.com>
In-Reply-To: <3EFE48E8.1040700@freebsd.org>
References:  <XFMail.20030627112702.jhb@FreeBSD.org> <3EFDC2EF.1060807@freebsd.org> <2768600000.1056836005@aslan.scsiguy.com> <3EFE48E8.1040700@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>> Again, what we want to achieve is as few lock acquires and releases
>> in the common case as possible.  For architectures like x86, the only
>> data structure that needs to be locked for the common case of no deferral
>> and no bounce page allocations is the tag (it will soon hold the S/G list
>> passed to the callback).  Other implementations may need to acquire other
>> locks, but using the client's lock still removes one lock acquire and
>> release in each invocation that is not deferred.
>> 
>> --
>> Justin
> 
> This is becoming wonderfully complex.  What is the purpose of storing
> the S/G list in the tag?  Are we going to enforce a 1:1 relationship
> between tags and maps?  That would really suck for the aac(4) driver.

No.  We are going to enforce only one callback invocation at a time
per tag.  The S/G list is only persistent for the lifetime of the
callback.

The reason for the change is to avoid using the stack for large S/G
lists.

--
Justin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2947280000.1056905856>