#
4efe531c |
| 22-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
buf: Add a runningbufclaim() helper
No functional change intended.
Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47696
|
Revision tags: release/13.4.0, release/14.1.0 |
|
#
56a8aca8 |
| 19-May-2024 |
Pawel Jakub Dawidek <pjd@FreeBSD.org> |
Stop treating size 0 as unknown size in vnode_create_vobject().
Whenever file is created, the vnode_create_vobject() function will try to determine its size by calling vn_getsize_locked() as size 0
Stop treating size 0 as unknown size in vnode_create_vobject().
Whenever file is created, the vnode_create_vobject() function will try to determine its size by calling vn_getsize_locked() as size 0 is ambigious: it means either the file size is 0 or the file size is unknown.
Introduce special value for the size argument: VNODE_NO_SIZE. Only when it is given, the vnode_create_vobject() will try to obtain file's size on its own.
Introduce dedicated vnode_disk_create_vobject() for use by g_vfs_open(), so we don't have to call vn_isdisk() in the common case (for regular files).
Handle the case of mediasize==0 in g_vfs_open().
Reviewed by: alc, kib, markj, olce Approved by: oshogbo (mentor), allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D45244
show more ...
|
Revision tags: release/13.3.0 |
|
#
b068bb09 |
| 08-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
Add vnode_pager_clean_{a,}sync(9)
Bump __FreeBSD_version for ZFS use.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D4
Add vnode_pager_clean_{a,}sync(9)
Bump __FreeBSD_version for ZFS use.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43356
show more ...
|
#
ed1a88a3 |
| 09-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
vnode_pager_generic_putpages(): rename maxblksz local to max_offset
Requested by: markj Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://
vnode_pager_generic_putpages(): rename maxblksz local to max_offset
Requested by: markj Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43358
show more ...
|
#
bdb46c21 |
| 08-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
vnode_pager_generic_putpages(): correctly handle clean block at EOF
The loop 'skip clean blocks' checking for the clean blocks in the dirty pages might end up setting the in_hole to true when exactl
vnode_pager_generic_putpages(): correctly handle clean block at EOF
The loop 'skip clean blocks' checking for the clean blocks in the dirty pages might end up setting the in_hole to true when exactly at EOF at the middle of the block, without advancing the prev_offset value. Then the next block is not dirty, and next_offset is clipped back to poffset + maxsize, equal to prev_offset, failing the assertion.
Instead of asserting prev_offset < next_offset, we must skip the write.
Reported by: asomers PR: 276191 Reviewed by: alc, markj Tested by: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43358
show more ...
|
#
29363fb4 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl s
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0 |
|
#
28f957b8 |
| 24-Mar-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
vnode_pager_input: return runningbufspace back
Both vnode_pager_input_smlfs() and vnode_pager_generic_getpages() increment runningbufspace, but also both delegate io completion handling on the pbuf
vnode_pager_input: return runningbufspace back
Both vnode_pager_input_smlfs() and vnode_pager_generic_getpages() increment runningbufspace, but also both delegate io completion handling on the pbuf to either plain bdone() or filesystem-specific strategy routine. Accidentally, for e.g. UFS it is g_vfs_strategy()/g_vfs_done(). The later calls bufdone() which handles runningbufspace reclamation.
For plain bdone() io done handler, nothing would return accounted b_runningbufspace back. Do it in the new helper vnode_pager_input_bdone(), as well as in vnode_pager_generic_getpages_done() explicitly.
Note that potential multiple calls to runningbufwakeup() for the same pbuf or buf completion are safe. runningbufwakeup() clears accounting for the buffer, so second and later calls are nop.
The problem was found due to tarfs using small vnode pager input but not g_vfs_strategy().
Reported by: des Reviewed by: markj, sjg Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39263
show more ...
|
Revision tags: release/12.4.0 |
|
#
f45feecf |
| 22-Sep-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: add vn_getsize
getattr is very expensive and in important cases only gets called to get the size. This can be optimized with a dedicated routine which obtains that statistic.
As a step towards
vfs: add vn_getsize
getattr is very expensive and in important cases only gets called to get the size. This can be optimized with a dedicated routine which obtains that statistic.
As a step towards that goal make size-only consumers use a dedicated routine.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D37885
show more ...
|
Revision tags: release/13.1.0 |
|
#
b8ebd99a |
| 14-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
vm: Use __diagused for variables only used in KASSERT().
|
Revision tags: release/12.3.0 |
|
#
de2e1529 |
| 04-Aug-2021 |
Ka Ho Ng <khng@FreeBSD.org> |
Add vnode_pager_purge_range(9) KPI
This KPI is created in addition to the existing vnode_pager_setsize(9) KPI. The KPI is intended for file systems that are able to turn a range of file into sparse
Add vnode_pager_purge_range(9) KPI
This KPI is created in addition to the existing vnode_pager_setsize(9) KPI. The KPI is intended for file systems that are able to turn a range of file into sparse range, also known as hole-punching.
Sponsored by: The FreeBSD Foundation Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D27194
show more ...
|
#
00a3fe96 |
| 07-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_object_kvme_type(): reimplement by embedding kvme_type into pagerops
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://review
vm_object_kvme_type(): reimplement by embedding kvme_type into pagerops
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30168
show more ...
|
#
d474440a |
| 03-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Constify vm_pager-related virtual tables.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
|
#
192112b7 |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add pgo_getvp method
This eliminates the staircase of conditions in vm_map_entry_set_vnode_text().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Different
Add pgo_getvp method
This eliminates the staircase of conditions in vm_map_entry_set_vnode_text().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
#
c23c555b |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add pgo_mightbedirty method
Used to implement vm_object_mightbedirty()
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://review
Add pgo_mightbedirty method
Used to implement vm_object_mightbedirty()
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
#
180bcaa4 |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_pager: add pgo_set_writeable_dirty method
specialized for swap and vnode pagers, and used to implement vm_object_set_writeable_dirty().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBS
vm_pager: add pgo_set_writeable_dirty method
specialized for swap and vnode pagers, and used to implement vm_object_set_writeable_dirty().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
Revision tags: release/13.0.0 |
|
#
a771bf74 |
| 17-Mar-2021 |
Bryan Drewery <bdrewery@FreeBSD.org> |
Remove unused obj variable missed in r354870.
Sponsored by: Dell EMC
|
#
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 |
|
#
f9cc8410 |
| 18-Sep-2020 |
Eric van Gyzen <vangyzen@FreeBSD.org> |
vm_ooffset_t is now unsigned
vm_ooffset_t is now unsigned. Remove some tests for negative values, or make other adjustments accordingly.
Reported by: Coverity Reviewed by: kib markj Sponsored by: D
vm_ooffset_t is now unsigned
vm_ooffset_t is now unsigned. Remove some tests for negative values, or make other adjustments accordingly.
Reported by: Coverity Reviewed by: kib markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26214
show more ...
|
#
c3aa3bf9 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vm: clean up empty lines in .c and .h files
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
7ad2a82d |
| 19-Aug-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: drop the error parameter from vn_isdisk, introduce vn_isdisk_error
Most consumers pass NULL.
|
#
419e5698 |
| 16-Aug-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Atomically update vm_object vnp_size, where atomic is available.
This will be used later, where it matters on 32bit arches.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Di
Atomically update vm_object vnp_size, where atomic is available.
This will be used later, where it matters on 32bit arches.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25968
show more ...
|
#
440cec3f |
| 12-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
e383ec74 |
| 06-Aug-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r363739 through r363986.
|