[PATCH] Stability fixes for IPS driver for 4.x

Scott Long scottl at samsco.org
Sun Apr 10 22:34:47 PDT 2005


David Sze wrote:
> At 09:17 AM 09/04/2005 -0600, Scott Long wrote this to All:
> 
>> All,
>>
>> Thanks to the keen eye of David Sze, the cause of the instability in 
>> the ips driver in FreeBSD 4.x might have been found.  If it's 
>> affecting you,
>> please try the attached patch and let me know the results.  I'll 
>> commit it when everyone is happy with it.
> 
> 
> Scott,
> 
> I think there's a problem with the ips_commands.c patch.  After the 
> bufq_first call succeeds, bufq_remove must be called before the splx or 
> else the iobuf can get issued twice.  However, if the subsequent 
> ips_get_free_cmd fails, the iobuf must be put back on the bufq.

Yes, I forgot that synchronization is a bit different here than in 
5.x/6.0.  Your second patch with the MfC is exactly what I had in
mind for the ips_start_io_request() function.

> 
> Two patches are attached to this message:
> 
> 1.  ips.RELENG_4.stability.patch is just the stability patch as described.
> 
> 2.  ips.RELENG_4.mfc-and-stability.patch is an MFC of your IPS cleanup 
> and optimization that you committed to HEAD on 01/28/05, plus the 
> stability patch as described.
> 
> Both patches survived a "make -j8 buildworld" for me.
> 
> The problem I'm having now is that ips does not appear to be PAE-ified.  
> With either patch the bus_dmamap_create call fails.  Any pointers would 
> be appreciated, this is new territory for me.
> 

Making a driver PAE-ified means either teaching it to do 64-bit
scatter-gather (assuming that the peripheral hardware can do this
and that it's documented), or teaching the driver to correctly handle
EINPROGRESS from bus_dmamap_load() along with using the proper busdma
tag limits.  The strategy I took with 6.x/5.x was the second one since
I didn't have good IPS docs in front of me and I wanted it follow the
APIs correctly.  I did test it with 8GB of memory and it performed
correctly under load.  I haven't taken a close enough look at your
MFC patch to say for sure if it's correct or not.  I'm not sure if
I'll have time to take another look in the next few days, unfortunately.
Is there any chance you could test 5.x/6.0 under load with PAE just to
validate the assertion that it works correctly there?

Thanks,

Scott




More information about the freebsd-stable mailing list