#
0e5c50bf |
| 07-Jan-2022 |
Alexander Motin <mav@FreeBSD.org> |
cam: Relax callouts precisions.
On large systems even relatively rare callouts may fire many times per second. This should allow them to aggregate better, since we do not require any precision when
cam: Relax callouts precisions.
On large systems even relatively rare callouts may fire many times per second. This should allow them to aggregate better, since we do not require any precision when polling for media change, etc.
MFC after: 2 weeks
show more ...
|
#
bb844118 |
| 04-Jan-2022 |
Robert Wing <rew@FreeBSD.org> |
cam: don't lock while handling an AC_UNIT_ATTENTION
Don't take the device_mtx lock in daasync() when handling an AC_UNIT_ATTENTION. Instead, assert the lock is held before modifying the periph's sof
cam: don't lock while handling an AC_UNIT_ATTENTION
Don't take the device_mtx lock in daasync() when handling an AC_UNIT_ATTENTION. Instead, assert the lock is held before modifying the periph's softc flags.
The device_mtx lock is taken in xptdevicetraverse() before daasync() is eventually called in xpt_async_bcast().
PR: 240917, 226510, 226578 Reviewed by: imp MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D27735
show more ...
|
#
e0ceec67 |
| 20-Dec-2021 |
Wojciech Macek <wma@FreeBSD.org> |
cam: don't send scsi commands on shutdown when reboot method RB_NOSYNC
Don't send the SCSI comand SYNCHRONIZE CACHE on devices that are still open when RB_NOSYNC is the reboot method. This may avoid
cam: don't send scsi commands on shutdown when reboot method RB_NOSYNC
Don't send the SCSI comand SYNCHRONIZE CACHE on devices that are still open when RB_NOSYNC is the reboot method. This may avoid recursive panics when doadump is called due to a SCSI/CAM/USB error/bug.
Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: imp Differential revision: https://reviews.freebsd.org/D31549
show more ...
|
Revision tags: release/12.3.0 |
|
#
c154feac |
| 25-Nov-2021 |
Scott Long <scottl@FreeBSD.org> |
Fix "set but not used" warnings in CAM.
|
#
6637b746 |
| 24-Nov-2021 |
Warner Losh <imp@FreeBSD.org> |
cam: Remove all the write-only variables
Delete all the write only variables in CAM. At worst, the only behavior change would be to prevent core dumps from chasing NULL pointers (though I think in a
cam: Remove all the write-only variables
Delete all the write only variables in CAM. At worst, the only behavior change would be to prevent core dumps from chasing NULL pointers (though I think in all these cases the pointers can't be NULL).
Sponsored by: Netflix
show more ...
|
#
1da11b8a |
| 14-Aug-2021 |
Gordon Bergling <gbe@FreeBSD.org> |
Fix a common typo in source code comments
- s/definitons/definitions/
MFC after: 5 days
|
#
303477d3 |
| 11-Aug-2021 |
Alexander Motin <mav@FreeBSD.org> |
cam(4): Mark all sysctls as CTLFLAG_MPSAFE.
This code does not use Giant lock for very long time.
MFC after: 2 weeks
|
#
60fb9e10 |
| 01-Aug-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
cam: enable kern.cam.da.enable_uma_ccbs by default
This makes the da(4) driver use UMA for its CCBs by default, like ada(4) already does. Please let me know via email if you notice any suspicious k
cam: enable kern.cam.da.enable_uma_ccbs by default
This makes the da(4) driver use UMA for its CCBs by default, like ada(4) already does. Please let me know via email if you notice any suspicious kernel messages,
Reviewed By: imp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31257
show more ...
|
#
a081a943 |
| 06-Jul-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
cam: drop unused 'saved_ccb' field from softcs
No functional changes. Do not MFC this, it changes kernel ABI.
Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://re
cam: drop unused 'saved_ccb' field from softcs
No functional changes. Do not MFC this, it changes kernel ABI.
Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D30698
show more ...
|
#
8252fe56 |
| 16-May-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
cam: Fix race condition in dainit()
Previously, daregister() could have been called before dainit() initialized the UMA zone. This would trip a KASSERT.
Reported By: pho Tested By: pho Sponsored b
cam: Fix race condition in dainit()
Previously, daregister() could have been called before dainit() initialized the UMA zone. This would trip a KASSERT.
Reported By: pho Tested By: pho Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc.
show more ...
|
#
3394d423 |
| 15-May-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
cam: allocate CCBs from UMA for SCSI and ATA IO
This patch makes it possible for CAM to use small CCBs allocated from an periph-specific UMA zone instead of the usual, huge ones. The end result is t
cam: allocate CCBs from UMA for SCSI and ATA IO
This patch makes it possible for CAM to use small CCBs allocated from an periph-specific UMA zone instead of the usual, huge ones. The end result is that CCBs issued via da(4) take 544B (size of ccb_scsiio) instead of the usual 2kB (size of 'union ccb', ~1.5kB, rounded up by malloc(9)). For ATA it's 272B. We waste less memory, we avoid zeroing the unused 1kB, and it should be easier to allocate those CCBs in low memory conditions. It should also be possible to use uma_zone_reserve(9) to improve behaviour in low memory conditions even further.
Note that this does not change the size, or the layout, of CCBs as such. CCBs get allocated in various different ways, in particular on the stack, and I don't want to redo all that. Instead, this provides an opt-in mechanism for the periph to declare "my start() callback is fine with receiving a CCB allocated from this UMA zone". In other words, most of the code works exactly as it used to; the change only happens to IOs issued by xpt_run_allockq(), which is - conveniently - pretty much all that matters for performance.
The reason for doing it this way is that it's pretty small, localized change, and can be implemented gradually and iteratively: take a periph, make sure its start() callback only casts the CCBs it takes to a particular type of CCB, for example ccb_scsiio, and that it only casts CCBs returned by cam_periph_getccb() to that type, then add UMA zone for that size, and declare it safe to XPT.
This is disabled by default. Set 'kern.cam.ada.enable_uma_ccbs=1' and 'kern.cam.da.enable_uma_ccbs=1' tunables to enable it. Testing is welcome; I will flip the default to enable in two weeks from now.
Reviewed By: imp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28674
show more ...
|
Revision tags: release/13.0.0 |
|
#
076686fe |
| 30-Mar-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
cam: make sure to clear CCBs allocated on the stack
This is required for small CCBs support, where we need to track whether the CCB was allocated from an UMA zone or not. There are no (intended) fu
cam: make sure to clear CCBs allocated on the stack
This is required for small CCBs support, where we need to track whether the CCB was allocated from an UMA zone or not. There are no (intended) functional changes with the current source.
Reviewed By: imp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D29484
show more ...
|
#
b3fce46a |
| 03-Mar-2021 |
Warner Losh <imp@FreeBSD.org> |
cam: remove redundant scsi_vpd_block_characteristics definition
There were two definitions for the SCSI VPD Block Device Characteristics (page 0xb1): struct scsi_vpd_block_characteristics and struct
cam: remove redundant scsi_vpd_block_characteristics definition
There were two definitions for the SCSI VPD Block Device Characteristics (page 0xb1): struct scsi_vpd_block_characteristics and struct scsi_vpd_block_device_characteristics. The latter is more complete and more widely used. Convert uses of the former to the latter by tweaking the da driver and removing sturct scsi_vpd_block_characteristics.
show more ...
|
#
e07ac3f2 |
| 11-Feb-2021 |
John Baldwin <jhb@FreeBSD.org> |
cam: Don't permit crashdumps on non-pollable devices.
If a disk's SIM doesn't support polling, then it can't be used to store crashdumps. Leave d_dump NULL in that case so that dumpon(8) fails grac
cam: Don't permit crashdumps on non-pollable devices.
If a disk's SIM doesn't support polling, then it can't be used to store crashdumps. Leave d_dump NULL in that case so that dumpon(8) fails gracefully rather than having dumps fail at crash time.
Reviewed by: scottl, mav, imp MFC after: 2 weeks Sponsored by: Chelsio Differential Revision: https://reviews.freebsd.org/D28454
show more ...
|
#
cd853791 |
| 28-Nov-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pag
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value.
Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work.
Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav.
Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225
show more ...
|
Revision tags: release/12.2.0 |
|
#
863f967f |
| 07-Oct-2020 |
Warner Losh <imp@FreeBSD.org> |
cam: Add quirk for Samsung MZ7* behind a SATA-to-SAS interposer
Sometimes, this drive will be present in the system such that the the firmware identification string doesn't start with ATA, such as w
cam: Add quirk for Samsung MZ7* behind a SATA-to-SAS interposer
Sometimes, this drive will be present in the system such that the the firmware identification string doesn't start with ATA, such as when it's behind a SATA-to-SAS interposer. Add another quirk for that.
Submitted by: github user mr44er Github PR: 423
show more ...
|
#
27dcd3d9 |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
cam: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
72f8ed61 |
| 28-Apr-2020 |
Warner Losh <imp@FreeBSD.org> |
Change the flags back to an enum
This was changed in the review process for the flags sysctl. The reasons for the change are no longer valid as the code changed after that. Cast the one place where
Change the flags back to an enum
This was changed in the review process for the flags sysctl. The reasons for the change are no longer valid as the code changed after that. Cast the one place where it might make a difference (but I don't think it does). This restores the ability to see flags for softc in gdb.
show more ...
|
#
37096740 |
| 20-Mar-2020 |
Ed Maste <emaste@FreeBSD.org> |
sys/cam: remove doubled ;s
|
#
75dfc66c |
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|
#
7029da5c |
| 26-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
show more ...
|
#
24a22d1d |
| 22-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge r358179 through r358238.
PR: 244251
|
#
1731d530 |
| 21-Feb-2020 |
Warner Losh <imp@FreeBSD.org> |
We pass a pointer to the flags to dabitsysctl, not an integer. Adjust the handler to accept a poitner to a u_int. To make the type of the softc flags stable and defined, make it a u_int. Cast the enu
We pass a pointer to the flags to dabitsysctl, not an integer. Adjust the handler to accept a poitner to a u_int. To make the type of the softc flags stable and defined, make it a u_int. Cast the enum types to u_int for arg2 so when passing to dabitsysctl it's a u_int.
Noticed by: emax@ Differential Revision: https://reviews.freebsd.org/D23785
show more ...
|
#
3c4ad300 |
| 17-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358000 through r358048.
|
#
13532153 |
| 17-Feb-2020 |
Scott Long <scottl@FreeBSD.org> |
Add rudamentary support for UFS to probe whether a block device supports the BIO_SPEEDUP command. Add complimentary support to the CAM periphs that support it. This is a redo of r357710.
|