uipc_syscalls.c (ef90af83a58199ef3980d8c9a7dad07ec9b4bea3) | uipc_syscalls.c (255c1caae364c686a9f87d97a31c70728f9377f1) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * sendfile(2) and related extensions: 6 * Copyright (c) 1998, David Greenman. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 109 unchanged lines hidden (view full) --- 118static int getpeername1(struct thread *td, struct getpeername_args *uap, 119 int compat); 120 121counter_u64_t sfstat[sizeof(struct sfstat) / sizeof(uint64_t)]; 122 123/* 124 * sendfile(2)-related variables and associated sysctls 125 */ | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * sendfile(2) and related extensions: 6 * Copyright (c) 1998, David Greenman. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 109 unchanged lines hidden (view full) --- 118static int getpeername1(struct thread *td, struct getpeername_args *uap, 119 int compat); 120 121counter_u64_t sfstat[sizeof(struct sfstat) / sizeof(uint64_t)]; 122 123/* 124 * sendfile(2)-related variables and associated sysctls 125 */ |
126int nsfbufs; 127int nsfbufspeak; 128int nsfbufsused; | 126static SYSCTL_NODE(_kern_ipc, OID_AUTO, sendfile, CTLFLAG_RW, 0, 127 "sendfile(2) tunables"); |
129static int sfreadahead = 1; | 128static int sfreadahead = 1; |
129SYSCTL_INT(_kern_ipc_sendfile, OID_AUTO, readahead, CTLFLAG_RW, 130 &sfreadahead, 0, "Number of sendfile(2) read-ahead MAXBSIZE blocks"); |
|
130 | 131 |
131SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, 132 "Maximum number of sendfile(2) sf_bufs available"); 133SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, 134 "Number of sendfile(2) sf_bufs at peak usage"); 135SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, 136 "Number of sendfile(2) sf_bufs in use"); 137SYSCTL_INT(_kern_ipc, OID_AUTO, sfreadahead, CTLFLAG_RW, &sfreadahead, 0, 138 "Number of sendfile(2) read-ahead MAXBSIZE blocks"); | |
139 | 132 |
140 | |
141static void 142sfstat_init(const void *unused) 143{ 144 145 COUNTER_ARRAY_ALLOC(sfstat, sizeof(struct sfstat) / sizeof(uint64_t), 146 M_WAITOK); 147} 148SYSINIT(sfstat, SI_SUB_MBUF, SI_ORDER_FIRST, sfstat_init, NULL); --- 2912 unchanged lines hidden --- | 133static void 134sfstat_init(const void *unused) 135{ 136 137 COUNTER_ARRAY_ALLOC(sfstat, sizeof(struct sfstat) / sizeof(uint64_t), 138 M_WAITOK); 139} 140SYSINIT(sfstat, SI_SUB_MBUF, SI_ORDER_FIRST, sfstat_init, NULL); --- 2912 unchanged lines hidden --- |