/[base]/head/sys/geom/cache/g_cache.c
ViewVC logotype

Log of /head/sys/geom/cache/g_cache.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 368124 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 28 12:12:51 2020 UTC (3 years, 7 months ago) by kib
File length: 25870 byte(s)
Diff to previous 366811
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


Revision 366811 - (view) (download) (annotate) - [select for diffs]
Modified Sun Oct 18 16:24:08 2020 UTC (3 years, 8 months ago) by trasz
File length: 25870 byte(s)
Diff to previous 365226
Make g_attach() return ENXIO for orphaned providers; update various
classes to add missing error checking.

Reviewed by:	imp
MFC after:	2 weeks
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D26658


Revision 365226 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 1 22:14:09 2020 UTC (3 years, 10 months ago) by mjg
File length: 25838 byte(s)
Diff to previous 363411
geom: clean up empty lines in .c and .h files


Revision 363411 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 22 02:15:21 2020 UTC (3 years, 11 months ago) by delphij
File length: 25840 byte(s)
Diff to previous 363034
Consistently use gctl_get_provider instead of home-grown variants.

Reviewed by:		cem, imp
MFC after:		2 weeks
Differential revision:	https://reviews.freebsd.org/D25739


Revision 363034 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 9 02:52:39 2020 UTC (3 years, 11 months ago) by delphij
File length: 26145 byte(s)
Diff to previous 358333
sys/geom: consistently use _PATH_DEV instead of hardcoding "/dev/".

Reviewed by:	cem
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25565


Revision 358333 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 26 14:26:36 2020 UTC (4 years, 4 months ago) by kaktus
File length: 26139 byte(s)
Diff to previous 350694
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


Revision 350694 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 7 19:28:35 2019 UTC (4 years, 10 months ago) by cem
File length: 26056 byte(s)
Diff to previous 332387
GEOM: Reduce unnecessary log interleaving with sbufs

Similar to what was done for device_printfs in r347229.

Convert g_print_bio() to a thin shim around g_format_bio(), which acts on an
sbuf; documented in g_bio.9.

Reviewed by:	markj
Discussed with:	rlibby
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D21165


Revision 332387 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 10 19:18:16 2018 UTC (6 years, 2 months ago) by kevans
File length: 26029 byte(s)
Diff to previous 326270
Annotate geom modules with MODULE_VERSION

GEOM ELI may double ask the password during boot. Once at loader time, and
once at init time.

This happens due a module loading bug. By default GEOM ELI caches the
password in the kernel, but without the MODULE_VERSION annotation, the
kernel loads over the kernel module, even if the GEOM ELI was compiled into
the kernel. In this case, the newly loaded module
purges/invalidates/overwrites the GEOM ELI's password cache, which causes
the double asking.

MFC Note: There's a pc98 component to the original submission that is
omitted here due to pc98 removal in head. This part will need to be revived
upon MFC.

Reviewed by:	imp
Submitted by:	op
Obtained from:	opBSD
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D14992


Revision 326270 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 27 15:17:37 2017 UTC (6 years, 7 months ago) by pfg
File length: 25998 byte(s)
Diff to previous 269691
sys/geom: adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


Revision 269691 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 7 21:56:37 2014 UTC (9 years, 10 months ago) by imp
File length: 25946 byte(s)
Diff to previous 259096
Unsigned values can never be less than 0.


Revision 259096 - (view) (download) (annotate) - [select for diffs]
Modified Sun Dec 8 09:34:56 2013 UTC (10 years, 6 months ago) by jhibbits
File length: 25957 byte(s)
Diff to previous 259080
Partially revert r259080.  bde@ pointed out that there are a lot more style bugs
going on in here than can be fixed, and I introduced some of my own.  Rather
than fix the whole host of them, back out my bugs.

Found by:	bde
X-MFC with:	r259080


Revision 259080 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 7 19:55:34 2013 UTC (10 years, 6 months ago) by jhibbits
File length: 25938 byte(s)
Diff to previous 243333
Fix some integer signs.  These unsigned integers should all be signed.

Found by:	clang (powerpc64)


Revision 243333 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 20 12:32:18 2012 UTC (11 years, 7 months ago) by jh
File length: 25957 byte(s)
Diff to previous 227309
- Don't pass geom and provider names as format strings.
- Add __printflike() attributes.
- Remove an extra argument for the g_new_geomf() call in swapongeom_ev().

Reviewed by:	pjd


Revision 227309 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 7 15:43:11 2011 UTC (12 years, 7 months ago) by ed
File length: 25951 byte(s)
Diff to previous 223921
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.

The SYSCTL_NODE macro defines a list that stores all child-elements of
that node. If there's no SYSCTL_DECL macro anywhere else, there's no
reason why it shouldn't be static.


Revision 223921 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 11 05:22:31 2011 UTC (12 years, 11 months ago) by ae
File length: 25940 byte(s)
Diff to previous 221446
Include sys/sbuf.h directly.

Reviewed by:	pjd


Revision 221446 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 4 17:37:37 2011 UTC (13 years, 2 months ago) by ae
File length: 25918 byte(s)
Diff to previous 219029
Remove unneeded checks, g_new_xxx functions can not fail.

MFC after:	1 week


Revision 219029 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 25 10:24:35 2011 UTC (13 years, 4 months ago) by netchild
File length: 26425 byte(s)
Diff to previous 170289
Add some FEATURE macros for various GEOM classes.

No FreeBSD version bump, the userland application to query the features will
be committed last and can serve as an indication of the availablility if
needed.

Sponsored by:	Google Summer of Code 2010
Submitted by:	kibab
Reviewed by:	silence on geom@ during 2 weeks
X-MFC after:	to be determined in last commit with code from this project


Revision 170289 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 4 18:25:08 2007 UTC (17 years, 1 month ago) by dwmalone
File length: 26382 byte(s)
Diff to previous 163048
Despite several examples in the kernel, the third argument of
sysctl_handle_int is not sizeof the int type you want to export.
The type must always be an int or an unsigned int.

Remove the instances where a sizeof(variable) is passed to stop
people accidently cut and pasting these examples.

In a few places this was sysctl_handle_int was being used on 64 bit
types, which would truncate the value to be exported.  In these
cases use sysctl_handle_quad to export them and change the format
to Q so that sysctl(1) can still print them.


Revision 163048 - (view) (download) (annotate) - [select for diffs]
Added Fri Oct 6 08:27:07 2006 UTC (17 years, 9 months ago) by ru
File length: 26392 byte(s)
A GEOM cache can speed up read performance by sending fixed size
read requests to its consumer.  It has been developed to address
the problem of a horrible read performance of a 64k blocksize FS
residing on a RAID3 array with 8 data components, where a single
disk component would only get 8k read requests, thus effectively
killing disk performance under high load.  Documentation will be
provided later.  I'd like to thank Vsevolod Lobko for his bright
ideas, and Pawel Jakub Dawidek for helping me fix the nasty bug.


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.27