summaryrefslogtreecommitdiffstats
path: root/sys/sys
Commit message (Collapse)AuthorAgeFilesLines
* Revert r231673 and r231682 for now, until we can run a full makedim2012-02-141-12/+1
| | | | | | universe with them. Sorry for the breakage. Pointy hat to: me and brooks
* Cleanup of xlocale:theraven2012-02-141-1/+12
| | | | | | | | | | | | | | | | - Address performance regressions encountered by das@ by caching per-thread data in TLS where available. - Add a __NO_TLS flag to cdefs.h to indicate where not available. - Reorganise the xlocale.h definitions into xlocale/*.h so that they can be included from multiple places. - Export the POSIX2008 subset of xlocale when POSIX2008 says it should be exported, independently of whether xlocale.h is included. - Fix the bug where programs using ctype functions always assumed ASCII unless recompiled. - Fix some style(9) violations. Reviewed by: brooks (mentor) Approved by: dim (mentor)
* Add ARM relocations types used for thread-local storagegonzo2012-02-141-0/+4
| | | | Reviewed by: cognet
* The PTRACESTOP() macro is used only once. Inline the only use and removekib2012-02-111-6/+0
| | | | | | the macro. MFC after: 1 week
* Properly name the sysctl to "iflistl" rather than "iflist2", which had beenbz2012-02-111-1/+1
| | | | | | | the prototype name and slipped in in r231505. Spotted in a reply from: bde MFC after: 3 days
* Introduce a new NET_RT_IFLISTL API to query the address list. It worksbz2012-02-112-2/+5
| | | | | | | | | | | on extended and extensible structs if_msghdrl and ifa_msghdrl. This will allow us to extend both the msghdrl structs and eventually if_data in the future without breaking the ABI. Bump __FreeBSD_version to allow ports to more easily detect the new API. Reviewed by: glebius, brooks MFC after: 3 days
* Merge si_name and __si_namebuf.ed2012-02-101-2/+2
| | | | | The si_name pointer always points to the __si_namebuf member inside the same object. Remove it and rename __si_namebuf to si_name.
* Add alias for the partition with type 0x42 to the MBR scheme.ae2012-02-101-0/+1
| | | | MFC after: 1 week
* Mark the automatically attached child with PL_FLAG_CHILD in structkib2012-02-102-0/+2
| | | | | | | lwpinfo flags, for PT_FOLLOWFORK auto-attachment. In collaboration with: Dmitry Mikulin <dmitrym juniper net> MFC after: 1 week
* Add support for mounting devfs inside jails.mm2012-02-091-1/+2
| | | | | | | | | | | | | A new jail(8) option "devfs_ruleset" defines the ruleset enforcement for mounting devfs inside jails. A value of -1 disables mounting devfs in jails, a value of zero means no restrictions. Nested jails can only have mounting devfs disabled or inherit parent's enforcement as jails are not allowed to view or manipulate devfs(8) rules. Utilizes new functions introduced in r231265. Reviewed by: jamie MFC after: 1 month
* Trim 8 unused bytes from struct vnode on 64-bit architectures.kib2012-02-081-2/+2
| | | | Reviewed by: alc
* Fix whitespace inconsistencies in TTY code.ed2012-02-062-4/+4
|
* Rename cache_lookup_times() to cache_lookup() and retire the old API andjhb2012-02-061-3/+1
| | | | ABI stub for cache_lookup().
* Current implementations of sync(2) and syncer vnode fsync() VOP useskib2012-02-062-1/+5
| | | | | | | | | | | | | | | | | | | | | | mnt_noasync counter to temporary remove MNTK_ASYNC mount option, which is needed to guarantee a synchronous completion of the initiated i/o before syscall or VOP return. Global removal of MNTK_ASYNC option is harmful because not only i/o started from corresponding thread becomes synchronous, but all i/o is synchronous on the filesystem which is initiated during sync(2) or syncer activity. Instead of removing MNTK_ASYNC from mnt_kern_flag, provide a local thread flag to disable async i/o for current thread only. Use the opportunity to move DOINGASYNC() macro into sys/vnode.h and consistently use it through places which tested for MNTK_ASYNC. Some testing demonstrated 60-70% improvements in run time for the metadata-intensive operations on async-mounted UFS volumes, but still with great deviation due to other reasons. Reviewed by: mckusick Tested by: scottl MFC after: 2 weeks
* Add new socket options: TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL andglebius2012-02-051-1/+1
| | | | | | | TCP_KEEPCNT, that allow to control initial timeout, idle time, idle re-send interval and idle send count on a per-socket basis. Reviewed by: andre, bz, lstewart
* Make the sys/ucontext.h self-contained by changing the return typekib2012-02-011-1/+1
| | | | | | | of __getcontextx_size(3) from size_t to int. PR: ports/164654 MFC after: 1 month
* If multiple threads call kevent() to get AIO events on same kqueue fd,davidxu2012-02-011-0/+2
| | | | | | | | | | | | | | | it is possible that a single AIO event will be reported to multiple threads, it is not threading friendly, and the existing API can not control this behavior. Allocate a kevent flags field sigev_notify_kevent_flags for AIO event notification in sigevent, and allow user to pass EV_CLEAR, EV_DISPATCH or EV_ONESHOT to AIO kernel code, user can control whether the event should be cleared once it is retrieved by a thread. This change should be comptaible with existing application, because the field should have already been zero-filled, and no additional action will be taken by kernel. PR: kern/156567
* Isolate v_caddr_t in the ie driver.pluknet2012-01-311-1/+0
| | | | Submitted by: Bruce Evans on net@
* Add definition for PT_GNU_RELRO.kib2012-01-301-0/+1
| | | | MFC after: 3 days
* Avoid to check the same cache line/variable from all the lockingattilio2012-01-282-2/+2
| | | | | | | | | | | | | | | | primitives by breaking stop_scheduler into a per-thread variable. Also, store the new td_stopsched very close to td_*locks members as they will be accessed mostly in the same codepaths as td_stopsched and this results in avoiding a further cache-line pollution, possibly. STOP_SCHEDULER() was pondered to use a new 'thread' argument, in order to take advantage of already cached curthread, but in the end there should not really be a performance benefit, while introducing a KPI breakage. In collabouration with: flo Reviewed by: avg MFC after: 3 months (or never) X-MFC: r228424
* exclude kmem_alloc'ed ARC data buffers from kernel minidumps on amd64kmacy2012-01-271-0/+1
| | | | | | | | excluding other allocations including UMA now entails the addition of a single flag to kmem_alloc or uma zone create Reviewed by: alc, avg MFC after: 2 weeks
* Add CAM infrastructure to allow reporting when a drive's long read capacityken2012-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data changes. cam_ccb.h: Add a new advanced information type, CDAI_TYPE_RCAPLONG, for long read capacity data. cam_xpt_internal.h: Add a read capacity data pointer and length to struct cam_ed. cam_xpt.c: Free the read capacity buffer when a device goes away. While we're here, make sure we don't leak memory for other malloced fields in struct cam_ed. scsi_all.c: Update the scsi_read_capacity_16() to take a uint8_t * and a length instead of just a pointer to the parameter data structure. This will hopefully make this function somewhat immune to future changes in the parameter data. scsi_all.h: Add some extra bit definitions to struct scsi_read_capacity_data_long, and bump up the structure size to the full size specified by SBC-3. Change the prototype for scsi_read_capacity_16(). scsi_da.c: Register changes in read capacity data with the transport layer. This allows the transport layer to send out an async notification to interested parties. Update the dasetgeom() API. Use scsi_extract_sense_len() instead of scsi_extract_sense(). scsi_xpt.c: Add support for the new CDAI_TYPE_RCAPLONG advanced information type. Make sure we set the physpath pointer to NULL after freeing it. This allows blindly freeing it in the struct cam_ed destructor. sys/param.h: Bump __FreeBSD_version from 1000005 to 1000006 to make it easier for third party drivers to determine that the read capacity data async notification is available. camcontrol.c, mptutil/mpt_cam.c: Update these for the new scsi_read_capacity_16() argument structure. Sponsored by: Spectra Logic
* Fix comment.trasz2012-01-251-1/+1
|
* Experimental support for booting CHRP-type PowerPC systems from hard disks.nwhitehorn2012-01-251-0/+1
|
* Change kern.proc.rlimit sysctl to:trociny2012-01-221-0/+2
| | | | | | | | | | | | | - retrive only one, specified limit for a process, not the whole array, as it was previously (the sysctl has been added recently and has not been backported to stable yet, so this change is ok); - allow to set a resource limit for another process. Submitted by: Andrey Zonov <andrey at zonov.org> Discussed with: kib Reviewed by: kib MFC after: 2 weeks
* Fix typo.kib2012-01-221-1/+1
| | | | | Submitted by: John Marino <draco marino st> MFC after: 3 days
* Add API for obtaining extended machine context states that cannot bekib2012-01-211-0/+6
| | | | | | | | | | | fit into existing mcontext_t. On i386 and amd64 do return the extended FPU states using getcontextx(3). For other architectures, getcontextx(3) returns the same information as getcontext(2). Tested by: pho MFC after: 1 month
* Close a race in NFS lookup processing that could result in stale name cachejhb2012-01-201-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | entries on one client when a directory was renamed on another client. The root cause for the stale entry being trusted is that each per-vnode nfsnode structure has a single 'n_ctime' timestamp used to validate positive name cache entries. However, if there are multiple entries for a single vnode, they all share a single timestamp. To fix this, extend the name cache to allow filesystems to optionally store a timestamp value in each name cache entry. The NFS clients now fetch the timestamp associated with each name cache entry and use that to validate cache hits instead of the timestamps previously stored in the nfsnode. Another part of the fix is that the NFS clients now use timestamps from the post-op attributes of RPCs when adding name cache entries rather than pulling the timestamps out of the file's attribute cache. The latter is subject to races with other lookups updating the attribute cache concurrently. Some more details: - Add a variant of nfsm_postop_attr() to the old NFS client that can return a vattr structure with a copy of the post-op attributes. - Handle lookups of "." as a special case in the NFS clients since the name cache does not store name cache entries for ".", so we cannot get a useful timestamp. It didn't really make much sense to recheck the attributes on the the directory to validate the namecache hit for "." anyway. - ABI compat shims for the name cache routines are present in this commit so that it is safe to MFC. MFC after: 2 weeks
* Don't expose __generic() when not using C++.ed2012-01-171-1/+1
| | | | | | | | According to the GCC documentation, the constructs used to implement <tgmath.h> are only available in C mode. They only cause breakage when used used with g++. Reported by: tijl
* Provide a function m_get2() that allocates a minimal mbuf thatglebius2012-01-171-0/+48
| | | | | | would fit specified size. Returned mbuf may be a single mbuf, an mbuf with a cluster from packet zone, or an mbuf with jumbo cluster of sufficient size.
* Make sure all intermediate variables holding mount flags (mnt_flag)mckusick2012-01-171-3/+4
| | | | | | | and that all internal kernel calls passing mount flags are declared as uint64_t so that flags in the top 32-bits are not lost. MFC after: 2 weeks
* Make panic strings in m_gettype(), m_getzone(), m_cljset()glebius2012-01-161-3/+3
| | | | consistent.
* m_getzone() should return only cluster zones.glebius2012-01-161-3/+0
|
* Drop support for SIOCSIFADDR, SIOCSIFNETMASK, SIOCSIFBRDADDR, SIOCSIFDSTADDRglebius2012-01-161-1/+1
| | | | | | | ioctl commands. PR: 163524 Reviewed by: net
* Abrogate nchr argument in proc_getargv() and proc_getenvv(): we always wanttrociny2012-01-151-4/+2
| | | | | | | | | | | | | | | to read strings completely to know the actual size. As a side effect it fixes the issue with kern.proc.args and kern.proc.env sysctls, which didn't return the size of available data when calling sysctl(3) with the NULL argument for oldp. Note, in get_ps_strings(), which does actual work for proc_getargv() and proc_getenvv(), we still have a safety limit on the size of data read in case of a corrupted procces stack. Suggested by: kib MFC after: 3 days
* Convert files to UTF-8uqs2012-01-155-5/+5
|
* Introduce vn_path_to_global_path()mm2012-01-151-0/+2
| | | | | | | | | | | | | This function updates path string to vnode's full global path and checks the size of the new path string against the pathlen argument. In vfs_domount(), sys_unmount() and kern_jail_set() this new function is used to update the supplied path argument to the respective global path. Unbreaks jailed zfs(8) with enforce_statfs set to 1. Reviewed by: kib MFC after: 1 month
* Add __generic(), to be able to use a very simple _Generic().ed2012-01-051-0/+18
| | | | | | Already introducing this allows us to be forward compatible with C11 compilers. By implementing <tgmath.h> on top of this interface, it becomes trivial to support both our existing GCC and newer compilers.
* Implement extensions on top of standards instead of the other way around.ed2012-01-031-6/+8
| | | | | Now that index() and rindex() have become unused, simply turn them into wrappers around strchr() and strrchr(), respectively.
* Remove the now unused skpc() function.ed2012-01-012-2/+1
| | | | | | | | | It was only used by ufs and ext2 and I have really strong doubts that there are other pieces of code that also use this function. If it turns out that external drivers use this code as well, I'd be happy to migrate or revert. Bump __FreeBSD_version while there.
* Introducing memcchr(3).ed2012-01-011-0/+1
| | | | | | | | | | | | | | | | | | | | | It seems two of the file system drivers we have in the tree, namely ufs and ext3, use a function called `skpc()'. The meaning of this function does not seem to be documented in FreeBSD, but it turns out one needs to be a VAX programmer to understand what it does. SPKC is an instruction on the VAX that does the opposite of memchr(). It searches for the non-equal character. Add a new function called memcchr() to the tree that has the following advantages over skpc(): - It has a name that makes more sense than skpc(). Just like strcspn() matches the complement of strspn(), memcchr() is the complement of memchr(). - It is faster than skpc(). Similar to our strlen() in libc, it compares entire words, instead of single bytes. It seems that for this routine this yields a sixfold performance increase on amd64. - It has a man page.
* Happy 2012 to FreeBSD users in Samoa.obrien2011-12-311-2/+2
|
* Update LOCKLEAF comment: it should say "vnode".pluknet2011-12-291-1/+1
| | | | Inspired by PR docs/11596.
* Define NULL to nullptr in C++11 mode (not strictly required, but it makestheraven2011-12-271-1/+3
| | | | | | migrating code to C++11 easier). Approved by: dim (mentor)
* Add cdefs-magic to add optional C11 bits to headers.ed2011-12-261-1/+6
|
* The standard is now called C11 -- C12.ed2011-12-261-2/+2
| | | | While there, compare against the proper __STDC_VERSION value.
* Implement hwpmc counting PMC support for PowerPC G4+ (MPC745x/MPC744x).jhibbits2011-12-241-4/+6
| | | | | | | Sampling is in progress. Approved by: nwhitehorn (mentor) MFC after: 9.0-RELEASE
* Some GCC-compatibility definitions. Define clang's feature test pseudomacrostheraven2011-12-241-0/+10
| | | | | | | | to always evaluate to 0 if we are using a compiler that doesn't implement them. This lets us use the macros easily in standard headers (e.g. stdatomic.h, which should be the subject of my next commit). Approved by: dim (mentor)
* Introduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. Thelstewart2011-12-241-12/+68
| | | | | | | | | | | | | | | | | | | | sysclock_getsnapshot() function allows the caller to obtain a snapshot of all the system clock and timecounter state required to create time stamps at a later point. The sysclock_snap2bintime() function converts a previously obtained snapshot into a bintime time stamp according to the specified flags e.g. which system clock, uptime vs absolute time, etc. These KPIs enable useful functionality, including direct comparison of the feedback and feed-forward system clocks and generation of multiple time stamps with different formats from a single timecounter read. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ In collaboration with: Julien Ridoux (jridoux at unimelb edu au)
* Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and usejhb2011-12-231-0/+2
| | | | | | | | | | these to trigger a NOTE_ATTRIB EVFILT_VNODE kevent when the extended attributes of a vnode are changed. Note that OS X already implements this behavior. Reviewed by: rwatson MFC after: 2 weeks
OpenPOWER on IntegriCloud