| #
b272101a |
| 30-Oct-2023 |
Aaron LI <aly@aaronly.me> |
Various minor whitespace cleanups
Accumulated along the way.
|
| #
fb1dde20 |
| 10-Nov-2023 |
Aaron LI <aly@aaronly.me> |
kernel: No need to handle mbuf allocation failures if use M_WAITOK
|
|
Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, v6.2.1, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3 |
|
| #
944cd60c |
| 25-Sep-2019 |
Sascha Wildner <saw@online.de> |
<sys/time.h>: Add 3rd arg to timespecadd()/sub() and make them public.
* Switch to the three argument versions of the timespecadd() and timespecsub() macros. These are now the predominant ones. Fr
<sys/time.h>: Add 3rd arg to timespecadd()/sub() and make them public.
* Switch to the three argument versions of the timespecadd() and timespecsub() macros. These are now the predominant ones. FreeBSD, OpenBSD, NetBSD, and Solaris (albeit only for the kernel) have them.
* Make those macros public too. This allows for a number of cleanups where they were defined locally.
Pointed-out-by: zrj Reviewed-by: dillon
show more ...
|
|
Revision tags: v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc, v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4 |
|
| #
b5523eac |
| 19-Feb-2015 |
Sascha Wildner <saw@online.de> |
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.
The main reason is that our having to use the MB_WAIT and MB_DONTWAIT flags was a recurring issue when porting drivers from FreeBSD
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.
The main reason is that our having to use the MB_WAIT and MB_DONTWAIT flags was a recurring issue when porting drivers from FreeBSD because it tended to get forgotten and the code would compile anyway with the wrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflags for an objcache_get() or objcache_reclaimlist call (which use M_WAITOK and M_NOWAIT), it was just one big converting back and forth with some sanitization in between.
This commit allows M_* again for the mbuf functions and keeps the sanitizing as it was before: when M_WAITOK is among the passed flags, objcache functions will be called with M_WAITOK and when it is absent, they will be called with M_NOWAIT. All other flags are scrubbed by the MB_OCFLAG() macro which does the same as the former MBTOM().
Approved-by: dillon
show more ...
|
|
Revision tags: v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.4.3 |
|
| #
e368a6e9 |
| 20-Aug-2013 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
tcp: Implement asynchronous pru_connect
This is mainly used to improve TCP nonblocking connect(2) performance.
Before this commit the user space thread uses nonblocking connect(2) will have to wait
tcp: Implement asynchronous pru_connect
This is mainly used to improve TCP nonblocking connect(2) performance.
Before this commit the user space thread uses nonblocking connect(2) will have to wait for the netisr completes the SYN output. This could be performance hit for nonblocking connect(2). First, the user space thread is put into sleep, even if the connect(2) is nonblocking. Second, it does not make too much sense for nonblocking connect(2) to wait for the SYN output.
TCP's asynchronous pru_connect implementation will set ISCONNECTING before dispatching netmsg to netisr0. The errors like EADDRNOTAVAIL, i.e. out of local port space, will be notified through kevent(2) or getsockopt(2) SOL_SOCKET/SO_ERROR.
NFS and other kernel code still use old synchronized pru_connect. This commit only affects connect(2) syscall.
Sysctl node kern.ipc.soconnect_async is added to enable and disable asynchronous pru_connect. It is enabled by default.
The performance measurement (i7-2600 w/ bnx(4)), using tools/tools/netrate/accept_connect/kq_connect_client:
kq_connect_client -4 SERVADDR -p SERVPORT -i 8 -c 32 -l 30 (8 processes, each creates 32 connections simultaniously, run 30 secs)
16 runs average:
asynchronous pru_connect synchronized pru_connect 220979.89 conns/s 189106.88 conns/s
This commit gives ~16% performance improvement for nonblocking connect(2)
show more ...
|
|
Revision tags: v3.4.2, v3.4.1, v3.4.0, v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3 |
|
| #
820041fb |
| 11-Jul-2012 |
Matthew Dillon <dillon@apollo.backplane.com> |
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
|
| #
9c104da7 |
| 11-Jul-2012 |
Sascha Wildner <saw@online.de> |
kernel/smb: Fix a duplicated check (from FreeBSD).
|
|
Revision tags: v3.0.2, v3.0.1, v3.1.0, v3.0.0 |
|
| #
884717e1 |
| 06-Dec-2011 |
Sascha Wildner <saw@online.de> |
kernel: Replace all usage of MALLOC()/FREE() with kmalloc()/kfree().
|
| #
86d7f5d3 |
| 26-Nov-2011 |
John Marino <draco@marino.st> |
Initial import of binutils 2.22 on the new vendor branch
Future versions of binutils will also reside on this branch rather than continuing to create new binutils branches for each new version.
|
|
Revision tags: v2.12.0, v2.13.0, v2.10.1, v2.11.0, v2.10.0, v2.9.1, v2.8.2, v2.8.1, v2.8.0, v2.9.0, v2.6.3, v2.7.3, v2.6.2, v2.7.2, v2.7.1, v2.6.1, v2.7.0, v2.6.0, v2.5.1, v2.4.1, v2.5.0, v2.4.0 |
|
| #
e54488bb |
| 19-Aug-2009 |
Matthew Dillon <dillon@apollo.backplane.com> |
AMD64 - Refactor uio_resid and size_t assumptions.
* uio_resid changed from int to size_t (size_t == unsigned long equivalent).
* size_t assumptions in most kernel code has been refactored to opera
AMD64 - Refactor uio_resid and size_t assumptions.
* uio_resid changed from int to size_t (size_t == unsigned long equivalent).
* size_t assumptions in most kernel code has been refactored to operate in a 64 bit environment.
* In addition, the 2G limitation for VM related system calls such as mmap() has been removed in 32 bit environments. Note however that because read() and write() return ssize_t, these functions are still limited to a 2G byte count in 32 bit environments.
show more ...
|
|
Revision tags: v2.3.2, v2.3.1, v2.2.1 |
|
| #
e28f12ac |
| 07-Apr-2009 |
Matthew Dillon <dillon@apollo.backplane.com> |
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
|
| #
2038fb68 |
| 06-Apr-2009 |
Sascha Wildner <saw@online.de> |
Replace all casts of NULL to something with NULL.
|
|
Revision tags: v2.2.0, v2.3.0, v2.1.1, v2.0.1 |
|
| #
e7b4468c |
| 05-Jan-2008 |
Sascha Wildner <swildner@dragonflybsd.org> |
For kmalloc(), MALLOC() and contigmalloc(), use M_ZERO instead of explicitly bzero()ing.
Reviewed-by: sephe
|
| #
e5d03018 |
| 18-May-2007 |
Matthew Dillon <dillon@dragonflybsd.org> |
Cleanup shutdown(2) usage and make it consistent. The implementation in rsh was particularly amusing.
Submitted-by: "Nuno Antunes" <nuno.antunes@gmail.com>
|
| #
6d49aa6f |
| 22-Apr-2007 |
Matthew Dillon <dillon@dragonflybsd.org> |
Give the sockbuf structure its own header file and supporting source file. Move all sockbuf-specific functions from kern/uipc_socket2.c into the new kern/uipc_sockbuf.c and move all the sockbuf-speci
Give the sockbuf structure its own header file and supporting source file. Move all sockbuf-specific functions from kern/uipc_socket2.c into the new kern/uipc_sockbuf.c and move all the sockbuf-specific structures from sys/socketvar.h to sys/sockbuf.h.
Change the sockbuf structure to only contain those fields required to properly management a chain of mbufs. Create a signalsockbuf structure to hold the remaining fields (e.g. selinfo, mbmax, etc).
Change the so_rcv and so_snd structures in the struct socket from a sockbuf to a signalsockbuf.
Remove the recently added sorecv_direct structure which was being used to provide a direct mbuf path to consumers for socket I/O. Use the newly revamped sockbuf base structure instead. This gives mbuf consumers direct access to the sockbuf API functions for use outside of a struct socket. This will also allow new API functions to be added to the sockbuf interface to ease the job of parsing data out of chained mbufs.
show more ...
|
| #
d8a9a23b |
| 20-Apr-2007 |
Matthew Dillon <dillon@dragonflybsd.org> |
Clean up the so_pru_soreceive() API a bit to make it easier to read mbuf chains without having to use a fake UIO.
|
| #
8067b633 |
| 18-Feb-2007 |
Simon Schubert <corecode@dragonflybsd.org> |
1:1 Userland threading stage 2.14/4:
Extend select to be usable for multiple LWPs in one proc.
|
| #
efda3bd0 |
| 05-Sep-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 1
|
| #
9ba76b73 |
| 13-Jun-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
Add kernel syscall support for explicit blocking and non-blocking I/O regardless of the setting applied to the file pointer.
send/sendmsg/sendto/recv/recvmsg/recfrom: New MSG_ flags defined in sys/s
Add kernel syscall support for explicit blocking and non-blocking I/O regardless of the setting applied to the file pointer.
send/sendmsg/sendto/recv/recvmsg/recfrom: New MSG_ flags defined in sys/socket.h may be passed to these functions to override the settings applied to the file pointer on a per-I/O basis.
MSG_FBLOCKING - Force the operation to be blocking MSG_FNONBLOCKING- Force the operation to be non-blocking
pread/preadv/pwrite/pwritev: These system calls have been renamed and wrappers will be added to libc. The new system calls are prefixed with a double underscore (like getcwd vs __getcwd) and include an additional flags argument. The new flags are defined in sys/fcntl.h and may be used to override settings applied to the file pointer on a per-I/O basis.
Additionally, the internal __ versions of these functions now accept an offset of -1 to mean 'degenerate into a read/readv/write/writev' (i.e. use the offset in the file pointer and update it on completion).
O_FBLOCKING - Force the operation to be blocking O_FNONBLOCKING - Force the operation to be non-blocking O_FAPPEND - Force the write operation to append (to a regular file) O_FOFFSET - (implied of the offset != -1) - offset is valid O_FSYNCWRITE - Force a synchronous write O_FASYNCWRITE - Force an asynchronous write O_FUNBUFFERED - Force an unbuffered operation (O_DIRECT) O_FBUFFERED - Force a buffered operation (negate O_DIRECT)
If the flags do not specify an operation (e.g. neither FBLOCKING or FNONBLOCKING are set), then the settings in the file pointer are used.
The original system calls will become wrappers in libc, without the flags arguments. The new system calls will be made available to libc_r to allow it to perform non-blocking I/O without having to mess with a descriptor's file flags.
NOTE: the new __pread and __pwrite system calls are backwards compatible with the originals due to a pad byte that libc always set to 0. The new __preadv and __pwritev system calls are NOT backwards compatible, but since they were added to HEAD just two months ago I have decided to not renumber them either.
NOTE: The subrev has been bumped to 1.5.4 and installworld will refuse to install if you are not running at least a 1.5.4 kernel.
show more ...
|
| #
87de5057 |
| 06-May-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
The thread/proc pointer argument in the VFS subsystem originally existed for... well, I'm not sure *WHY* it originally existed when most of the time the pointer couldn't be anything other then curth
The thread/proc pointer argument in the VFS subsystem originally existed for... well, I'm not sure *WHY* it originally existed when most of the time the pointer couldn't be anything other then curthread or curproc or the code wouldn't work. This is particularly true of lockmgr locks.
Remove the pointer argument from all VOP_*() functions, all fileops functions, and most ioctl functions.
show more ...
|
| #
99ae8c41 |
| 08-Dec-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
SB_NOINTR must be set for the socket to prevent nbssn_recv() from hard looping on EWOULDBLOCK.
|
| #
636ae7e8 |
| 10-Jun-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
spl->critical section conversion.
|
| #
cfa2ba21 |
| 06-Jun-2004 |
Matthew Dillon <dillon@dragonflybsd.org> |
Remove the canwait argument to dup_sockaddr(). Callers of dup_sockaddr() all assume that it just works, so it really has to work. Since interrupts are now threads we can use M_INTWAIT. While it is
Remove the canwait argument to dup_sockaddr(). Callers of dup_sockaddr() all assume that it just works, so it really has to work. Since interrupts are now threads we can use M_INTWAIT. While it is possible that a memory deadlock issue exists here (e.g. if swapping over NFS), it isn't likely in this case.
show more ...
|
| #
74f1caca |
| 02-Jun-2004 |
Eirik Nygaard <eirikn@dragonflybsd.org> |
Change mbug allocation flags from M_ to MB_ to avoid confusion with malloc flags.
Requested by: Jeffrey Hsu
|
| #
e4700d00 |
| 05-Mar-2004 |
Jeffrey Hsu <hsu@dragonflybsd.org> |
Once we distribute socket protocol processing requests to different processors, we no longer have a process context to refer to, so eliminate the use of curproc in soreserve() by passing the sockbuf
Once we distribute socket protocol processing requests to different processors, we no longer have a process context to refer to, so eliminate the use of curproc in soreserve() by passing the sockbuf resource limit all the down from the system call code to sbreserve().
Eliminate the use of curproc in unp_attach() by passing down the fields it needs from the proc structure. Define a pru_attach_info structure to hold the information the attach usrreq function requires.
The thread argument to in_pcballoc() is unused, so we don't need to pass a thread structure down to in_pcballoc().
show more ...
|