Date: Sat, 12 Jan 2013 22:00:35 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r245343 - projects/altix2/sys/dev/isp Message-ID: <201301122200.r0CM0ZDb085933@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Sat Jan 12 22:00:35 2013 New Revision: 245343 URL: http://svnweb.freebsd.org/changeset/base/245343 Log: Slightly optimize the request and response queue synchronization. We have a single map that's used for both and we only need to synchronize 1 request and 1 rsponse. Avoid using busdma_sync with post R/W that may force a platform to synchronize 80KB worth of cache and instead use busdma_sync_range twice: once for the request with post write (64B) and once for the response with post read (64B). Modified: projects/altix2/sys/dev/isp/isp_freebsd.h Modified: projects/altix2/sys/dev/isp/isp_freebsd.h ============================================================================== --- projects/altix2/sys/dev/isp/isp_freebsd.h Sat Jan 12 21:52:04 2013 (r245342) +++ projects/altix2/sys/dev/isp/isp_freebsd.h Sat Jan 12 22:00:35 2013 (r245343) @@ -431,8 +431,10 @@ case SYNC_SFORDEV: \ break; \ } \ case SYNC_REQUEST: \ - busdma_sync(isp->isp_osinfo.cdmd, \ - BUSDMA_SYNC_PREREAD | BUSDMA_SYNC_PREWRITE); \ + busdma_sync_range(isp->isp_osinfo.cdmd, BUSDMA_SYNC_PREWRITE, \ + isp->isp_rquest_dma + (offset * size), size); \ + busdma_sync_range(isp->isp_osinfo.cdmd, BUSDMA_SYNC_PREREAD, \ + isp->isp_result_dma + (offset * size), size); \ break; \ case SYNC_SFORCPU: \ { \ @@ -441,8 +443,10 @@ case SYNC_SFORCPU: \ break; \ } \ case SYNC_RESULT: \ - busdma_sync(isp->isp_osinfo.cdmd, \ - BUSDMA_SYNC_POSTREAD | BUSDMA_SYNC_POSTWRITE); \ + busdma_sync_range(isp->isp_osinfo.cdmd, BUSDMA_SYNC_POSTWRITE, \ + isp->isp_rquest_dma + (offset * size), size); \ + busdma_sync_range(isp->isp_osinfo.cdmd, BUSDMA_SYNC_POSTREAD, \ + isp->isp_result_dma + (offset * size), size); \ break; \ case SYNC_REG: \ bus_space_barrier(isp->isp_osinfo.bus_tag, \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301122200.r0CM0ZDb085933>