kernel - Remove PG_ZERO and zeroidle (page-zeroing) entirely* Remove the PG_ZERO flag and remove all page-zeroing optimizations, entirely. Aftering doing a substantial amount of testing, these
kernel - Remove PG_ZERO and zeroidle (page-zeroing) entirely* Remove the PG_ZERO flag and remove all page-zeroing optimizations, entirely. Aftering doing a substantial amount of testing, these optimizations, which existed all the way back to CSRG BSD, no longer provide any benefit on a modern system. - Pre-zeroing a page only takes 80ns on a modern cpu. vm_fault overhead in general is ~at least 1 microscond. - Pre-zeroing a page leads to a cold-cache case on-use, forcing the fault source (e.g. a userland program) to actually get the data from main memory in its likely immediate use of the faulted page, reducing performance. - Zeroing the page at fault-time is actually more optimal because it does not require any reading of dynamic ram and leaves the cache hot. - Multiple synth and build tests show that active idle-time zeroing of pages actually reduces performance somewhat and incidental allocations of already-zerod pages (from page-table tear-downs) do not affect performance in any meaningful way.* Remove bcopyi() and obbcopy() -> collapse into bcopy(). These other versions existed because bcopy() used to be specially-optimized and could not be used in all situations. That is no longer true.* Remove bcopy function pointer argument to m_devget(). It is no longer used. This function existed to help support ancient drivers which might have needed a special memory copy to read and write mapped data. It has long been supplanted by BUSDMA.
show more ...
kernel: Use DEVMETHOD_END in the drivers.
if: Per-cpu ifnet/ifaddr statistics, step 1/3Wrap ifnet/ifaddr stats updating, setting and extraction into macros;ease upcoming changes.
bpf: Use bpf global token instead mplock to protect bpf stuffsSubmitted-by: tuxillo@ w/ modification
kernel/plip: A little indent fix.
bus: Pass intsrerupt description to setup_intr bus methodIf no interrupt description is supplied, then the device's namewill be used.Add bus_setup_intr_descr(), which allow device drivers to pas
bus: Pass intsrerupt description to setup_intr bus methodIf no interrupt description is supplied, then the device's namewill be used.Add bus_setup_intr_descr(), which allow device drivers to passinterrupt description. Reimplement bus_setup_intr() usingbus_setup_intr_descr().
kernel: Use NULL for pointers.
legacy devices: Utilize bus_alloc_legacy_irq_resource()
kernel: Use NULL for DRIVER_MODULE()'s evh & arg (which are pointers).This is just cosmetics for easier reading.
Remove bogus checks after kmalloc(M_WAITOK) which never returns NULL.Reviewed-by: hasso
Rename printf -> kprintf in sys/ and add some defines where necessary(files which are used in userland, too).
Do a major clean-up of the BUSDMA architecture. A large number ofessentially machine-independant drivers use the structures and definitionsin machine-dependant directories that are really machine-
Do a major clean-up of the BUSDMA architecture. A large number ofessentially machine-independant drivers use the structures and definitionsin machine-dependant directories that are really machine-independant innature.Split <machine/bus_dma.h> into machine-depdendant and machine-independant partsand make the primary access run through <sys/bus_dma.h>.Remove <machine/bus.h>, <machine/bus_memio.h> and <machine/bus_pio.h>. Theoptimizations related to bus_memio.h and bus_pio.h made a huge mess,introduced machine-specific knowledge into essentially machine-independantdrivers, and required specific #include file orderings to do their job.They may be reintroduced in some other form later on.Move <machine/resource.h> to <sys/bus_resource.h>. The contents of the fileis machine-independant or can be made a superset across many platforms.Make <sys/bus.h> include <sys/bus_dma.h> and <sys/bus_resource.h> andinclude <sys/bus.h> where necessary. Remove all #include's of<machine/resource.h> and <machine/bus.h>. That is, make the BUSDMAinfrastructure integral to I/O-mapped and memory-mapped accesses to devicesand remove a large chunk of machine-specific dependancies from drivers.bus_if.h and device_if.h are now required to be present when using <sys/bus.h>.
Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 1
Make all network interrupt service routines MPSAFE part 1/3.Replace the critical section that was previously used to serialize accesswith the LWKT serializer. Integrate the serializer into the IF
Make all network interrupt service routines MPSAFE part 1/3.Replace the critical section that was previously used to serialize accesswith the LWKT serializer. Integrate the serializer into the IFNET structure.Note that kern.intr_mpsafe must be set to 1 for network interrupts to actuallyrun MPSAFE. Also note that any interrupts shared with othre non-MP driverswill cause all drivers on that interrupt to run with the Big Giant Lock.Network interrupt - Each network driver then simply passes that serializerto bus_setup_intr() so only a single serializer is required to process theentire interrupt path. LWKT serialization support is already 100% integratedinto the interrupt subsystem so it will already be held as of when theregistered interrupt procedure is called.Ioctl and if_* functions - All callers of if_* functions (such as if_start,if_ioctl, etc) now obtain the IFNET serializer before making the call. Thusall of these entry points into the driver will now be serialized.if_input - All code that calls if_input now ensures that the serializeris held. It will either already be held (when called from a driver), orthe serializer will be wrapped around the call. When packets are forwardedor bridged between interfaces, the target interface serializer will bedropped temporarily to avoid a deadlock.Device Driver access - dev_* entry points into certain pseudo-networkdevices now obtain and release the serializer. This had to be done ona device-by-device basis (but there are only a few such devices).Thanks to several people for helping test the patch, in particularSepherosa Ziehau.
Cleanup some of the newbus infrastructure.* Change the device_identify API to return success/failure, like most of the other newbus methods. This may be used for conflict resolution in the fut
Cleanup some of the newbus infrastructure.* Change the device_identify API to return success/failure, like most of the other newbus methods. This may be used for conflict resolution in the future.* Clearly document the device_identify method and formalize its use by adding discrimination between initial bus probes and bus rescans. Do not re-execute static identification code that has already been run every time a new driver is added at run-time.* Clearly document the do-ISA-last hack.* Provide generic routines for the most common device_identify operations (psueo or synthesized devices that operate under other devices, such as lpt operating under ppbus, which are not 'scanned' by the parent bus).* Remove the hacks that install and initialize the nexus device. Instead, use the existing DRIVER_MODULE infrastructure to install nexus under root_bus.* Document the boot-time initialization path so it doesn't take the next guy 8 hours to figure out what code is actually being run when.
Remove the INTR_TYPE_* flags. The interrupt type is no longer used tofigure out which spl*() set an interrupt belongs to, because, well, spl'sno longer exist.
Remove unnecessary bzero(softc).With following exceptions: - ed(4) if_ed_cbus.c - snc(4)They are PC-98 only.
Convert from splhigh to critical sections.
Get rid of bus_{disable,enable}_intr(), it wasn't generic enough forour needs.Implement some generic atomic.h functions to aid in the implementation ofa low level mutex.Implement a generic low
Get rid of bus_{disable,enable}_intr(), it wasn't generic enough forour needs.Implement some generic atomic.h functions to aid in the implementation ofa low level mutex.Implement a generic low level sleep-mutex serializer, kern/lwkt_serialize.c.The serializer is designed to be a replacement for SPL calls but may alsobe used for other very low level work (e.g. lockmgr interlocks).Add a serializer argument to BUS_SETUP_INTR(). When non-NULL, the interrupthandler will no longer be protected by an SPL so e.g. spl*() will nolonger protect against that device's interrupts.The IF queueing and dequeueing mechanisms may no longer depend on outsideSPL state because network driver interrupt handlers are no longer required toenter splnet(). Use critical sections for the moment. The IFQ andIFF_OACTIVE interactions are not yet MP safe.
Use ifq_set_maxlen instead of messing with the fields directly.
- Add support for attaching alternative DLTs to an interface. The function is named bpfattach_dlt, FreeBSD used bpfattach2.- Change bpf_mtap to take the bpf_if directly.- Add support for BIOCSDLT
- Add support for attaching alternative DLTs to an interface. The function is named bpfattach_dlt, FreeBSD used bpfattach2.- Change bpf_mtap to take the bpf_if directly.- Add support for BIOCSDLT and BIOCGDLT to recieve a list of DLTs available on an interface.Obtained-from: FreeBSD- Add bpf_ptap, which takes an mbuf and a header, builds a temporary mbuf chain and calls bpf_mtap on that.Inspired-by: FreeBSD's bpf_mtap2- Use the new interface for all drivers doing this by hand before.- Include the formerly commented out support for radio headers in wi(4) and wlan(4).- Change if_loop, i4b_ipr, disc and ic to prepend a uint32_t, not an int.
General netif malloc() flags cleanup. Use M_INTWAIT or M_WAITOK insteadof M_NOWAIT. Generally use M_WAITOK in the attach code or ioctl codetypically called from userland, and M_INTWAIT for routin
General netif malloc() flags cleanup. Use M_INTWAIT or M_WAITOK insteadof M_NOWAIT. Generally use M_WAITOK in the attach code or ioctl codetypically called from userland, and M_INTWAIT for routines that mightbe called during non-boot operations. Since M*WAIT flags guarentee anon-NULL result, also remove now-unnecessary NULL checks.
Eliminate use of curthread in if_ioctl functions by passing down theucred structure.
if_xname support Part 2/2: Convert remaining netif devices and implement fullsupport for if_xname. Restructure struct ifnet in net/if_var.h, pulling ina few minor additional changes from current i
if_xname support Part 2/2: Convert remaining netif devices and implement fullsupport for if_xname. Restructure struct ifnet in net/if_var.h, pulling ina few minor additional changes from current including making if_dunit an int,and making if_flags an int.Submitted-by: Max Laier <max@love2party.net>
Add a DECLARE_DUMMY_MODULE() so we can get linker_set module namesfor modules that normally use DRIVER_MODULE(). The problem is thatDRIVER_MODULE() will define names that do not match the module n
Add a DECLARE_DUMMY_MODULE() so we can get linker_set module namesfor modules that normally use DRIVER_MODULE(). The problem is thatDRIVER_MODULE() will define names that do not match the module name,so a DECLARE_DUMMY_MODULE() is needed for the kernel to be able tofigure out that a module has been statitically compiled in.
12