summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo.alfred2012-11-281-1/+1
| | | | Pointed out by: marck
* Pull out the debugging code from the critical path and make sure itadrian2012-11-281-37/+37
| | | | happens _after_ all of the time delta calculations.
* Partially bring r242520 to ext2fs.pfg2012-11-281-0/+12
| | | | | | | | | | | | | | | | | | | | | When a file is first being written, the dynamic block reallocation (implemented by ext2_reallocblks) relocates the file's blocks so as to cluster them together into a contiguous set of blocks on the disk. When the cluster crosses the boundary into the first indirect block, the first indirect block is initially allocated in a position immediately following the last direct block. Block reallocation would usually destroy locality by moving the indirect block out of the way to keep the data blocks contiguous. The issue was diagnosed long ago by Bruce Evans on ffs and surfaced on ext2fs when block reallocaton was ported. This is only a partial solution based on the similarities with FFS. We still require more review of the allocation details that vary in ext2fs. Reported by: bde MFC after: 1 week
* Complete r243631 by applying the remainder of kern_mbuf.c that gotandre2012-11-271-16/+18
| | | | | | | lost while merging into the commit tree. MFC after: 1 month X-MFC-with: r243631
* Fix r243627 by testing against the head socket instead of the socketandre2012-11-271-1/+1
| | | | | | | just created. MFC after: 1 week X-MFC-with: r243627
* Autoconfigure nfsd threads based on ncpu.alfred2012-11-271-20/+97
| | | | | | | | | | | | | | | | Rick Macklem and I discussed the default number of nfsd threads and concluded that it is too low to perform adiquitely on today's hardware. We decided to auto tune the number of nfsds based on the number of cpus in the system. While I'm here I've also added: 1) ability to set the minthreads/maxthreads from userland. 2) ability to run nfsd in debug mode via the cli. Reviewed by: rmacklem MFC after: 2 weeks
* Allow setting of NULL titles with f_dialog_[back]title().dteske2012-11-271-2/+2
| | | | Approved by: adrian (co-mentor) (implicit)
* Change self-initialization to occur when loaded versus the previous behaviordteske2012-11-271-34/+5
| | | | | | | | | which was to self-initialize during the first function-call. This didn't work so well because the first call was may or may-not be within a sub-shell (which prevented proper setup of the pass-thru file descriptor, resulting in dialogs that would not display). Approved by: adrian (co-mentor) (implicit)
* Comments.dteske2012-11-271-2/+2
| | | | Approved by: adrian (co-mentor) (implicit)
* Base the mbuf related limits on the available physical memory orandre2012-11-275-25/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel memory, whichever is lower. The overall mbuf related memory limit must be set so that mbufs (and clusters of various sizes) can't exhaust physical RAM or KVM. The limit is set to half of the physical RAM or KVM (whichever is lower) as the baseline. In any normal scenario we want to leave at least half of the physmem/kvm for other kernel functions and userspace to prevent it from swapping too easily. Via a tunable kern.maxmbufmem the limit can be upped to at most 3/4 of physmem/kvm. At the same time divorce maxfiles from maxusers and set maxfiles to physpages / 8 with a floor based on maxusers. This way busy servers can make use of the significantly increased mbuf limits with a much larger number of open sockets. Tidy up ordering in init_param2() and check up on some users of those values calculated here. Out of the overall mbuf memory limit 2K clusters and 4K (page size) clusters to get 1/4 each because these are the most heavily used mbuf sizes. 2K clusters are used for MTU 1500 ethernet inbound packets. 4K clusters are used whenever possible for sends on sockets and thus outbound packets. The larger cluster sizes of 9K and 16K are limited to 1/6 of the overall mbuf memory limit. When jumbo MTU's are used these large clusters will end up only on the inbound path. They are not used on outbound, there it's still 4K. Yes, that will stay that way because otherwise we run into lots of complications in the stack. And it really isn't a problem, so don't make a scene. Normal mbufs (256B) weren't limited at all previously. This was problematic as there are certain places in the kernel that on allocation failure of clusters try to piece together their packet from smaller mbufs. The mbuf limit is the number of all other mbuf sizes together plus some more to allow for standalone mbufs (ACK for example) and to send off a copy of a cluster. Unfortunately there isn't a way to set an overall limit for all mbuf memory together as UMA doesn't support such a limiting. NB: Every cluster also has an mbuf associated with it. Two examples on the revised mbuf sizing limits: 1GB KVM: 512MB limit for mbufs 419,430 mbufs 65,536 2K mbuf clusters 32,768 4K mbuf clusters 9,709 9K mbuf clusters 5,461 16K mbuf clusters 16GB RAM: 8GB limit for mbufs 33,554,432 mbufs 1,048,576 2K mbuf clusters 524,288 4K mbuf clusters 155,344 9K mbuf clusters 87,381 16K mbuf clusters These defaults should be sufficient for even the most demanding network loads. MFC after: 1 month
* Update comment to prefer M_NOWAIT over M_DONTWAIT andandre2012-11-271-2/+2
| | | | | | M_WAITOK over M_WAIT. MFC after: 1 week
* Fix a race on listen socket teardown where while draining theandre2012-11-271-4/+21
| | | | | | | | | | | | accept queues a new socket/connection may be added to the queue due to a race on the ACCEPT_LOCK. The submitted patch is slightly changed in comments, teardown and locking order and extended with KASSERT's. Submitted by: Vijay Singh <vijju.singh-at-gmail-dot-com> Found by: His team. MFC after: 1 week
* Remove unused and unnecessary CSUM_IP_FRAGS checksumming capability.andre2012-11-275-8/+5
| | | | | | | | Checksumming the IP header of fragments is no different from doing normal IP headers. Discussed with: yongari MFC after: 1 week
* fix a panic resulting from a stray '&'bschmidt2012-11-271-1/+1
| | | | MFC after: 1 week
* Add DELACK to list of timers.andre2012-11-271-1/+1
| | | | MFC after: 1 week
* Respect NO_FSCHG and don't set 'schg' flag on passwd/yppasswd is defined.pjd2012-11-271-0/+2
| | | | MFC after: 2 weeks
* Pass allocated unit number to make_dev, otherwise kernel panics later whiledavidxu2012-11-271-1/+1
| | | | | | cloning second tap. Reviewed by: kevlo,ed
* * Fix another culprit of my "committed from the wrong directory" nonsense;adrian2012-11-271-2/+12
| | | | | | | | | | | now this works for non-debug and debug builds. * Add a comment reminding me (or someone) to audit all of the relevant math to ensure there's no weird wrapping issues still lurking about. But yes, this does seem to be mostly working. Pointy-hat-to: adrian, yet again
* Add kern.capmode_coredump sysctl/tunable to allow processes in capability modepjd2012-11-271-2/+13
| | | | | | | | to dump core. Reviewed by: rwatson Obtained from: WHEEL Systems MFC after: 2 weeks
* - Add NOCAPCHECK flag to namei that allows lookup to work even if the processpjd2012-11-274-2/+8
| | | | | | | | | | | | is in capability mode. - Add VN_OPEN_NOCAPCHECK flag for vn_open_cred() to will ne converted into NOCAPCHECK namei flag. This functionality will be used to enable core dumps for sandboxed processes. Reviewed by: rwatson Obtained from: WHEEL Systems MFC after: 2 weeks
* Regenerate after r243610.pjd2012-11-271-1/+1
|
* Allow to use kill(2) in capability mode, but process can send a signal onlypjd2012-11-272-0/+13
| | | | | | | | | to himself. For example abort(3) at first tries to do kill(getpid(), SIGABRT) which was failing in capability mode, so the code was failing back to exit(1). Reviewed by: rwatson Obtained from: WHEEL Systems MFC after: 2 weeks
* Allow to modify kern.sugid_coredump and kern.corefile from loader.conf.pjd2012-11-271-0/+2
| | | | Obtained from: WHEEL Systems
* More style fixes.pjd2012-11-271-4/+4
|
* Style fixes (mostly whitespaces).pjd2012-11-271-35/+39
|
* Correct some debugging output.adrian2012-11-271-1/+1
|
* Make sure that tcp_timer_activate() correctly sees TCP_OFFLOAD (or not).np2012-11-271-0/+1
|
* Do not enable data cache until later in kernel init. Stale bits ingonzo2012-11-271-1/+1
| | | | | | | cache might cause erroneus behavior on early stage. Submitted by: Ian Lepore Tested on: Atmel, Marvell, and Eyxnos
* Better safe than sorry: reinitialize eh after ng_ether(4) andglebius2012-11-271-0/+2
| | | | | | if_bridge(4) processing, since mbuf may be modified there. Submitted by: youngari
* Take first active vnode correctly.davidxu2012-11-271-1/+1
| | | | | Reviewed by: kib MFC after: 3 days
* Fix buildadrian2012-11-271-0/+2
|
* Auto size the tcbhashsize structure based on max sockets.alfred2012-11-271-4/+61
| | | | | | While here, also make the code that enforces power-of-two more forgiving, instead of just resetting to 512, graciously round-down to the next lower power of two.
* Add in a totally hacked up copy of the AR5416 descriptor decoding stuff,adrian2012-11-271-0/+470
| | | | | | as well as TDMA related things. I used this to debug TDMA related issues in -HEAD.
* Improve the TDMA debugging:adrian2012-11-271-2/+123
| | | | | | * add some further debugging prints, which are quite nice to have * add in ALQ hooks (optional!) to allow for the TDMA information to be logged in-line with the TX and RX descriptor information.
* Add in specific TDMA logging types.adrian2012-11-271-0/+49
|
* Fix the TDMA nexttbtt programming for 802.11n chips.adrian2012-11-271-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing logic wrapped programming nexttbtt at 65535 TU. This is not good enough for the 11n chips, whose nexttbtt register (GENERIC_TIMER_0) has an initial value from 0..2^31-1 TSF. So converting the TU to TSF had the counter wrap at (65535 << 10) TSF. Once this wrap occured, the nexttbtt value was very very low, much lower than the current TSF value. At this point, the nexttbtt timer would constantly fire, leading to the TX queue being constantly gated open.. and when this occured, the sender was not correctly transmitting in its slot but just able to continuously transmit. The master would then delay transmitting its beacon until after the air became free (which I guess would be after the burst interval, before the next burst interval would quickly follow) and that big delta in master beacon TX would start causing big swings in the slot timing adjustment. With this change, the nexttbtt value is allowed to go all the way up to the maximum value permissable by the 32 bit representation. I haven't yet tested it to that point; I really should. The AR5212 HAL now filters out values above 65535 TU for the beacon configuration (and the relevant legal values for SWBA, DBA and NEXTATIM) and the AR5416 HAL just dutifully programs in what it should. With this, TDMA is now useful on the 802.11n chips. Tested: * AR5416, AR9280 TDMA slave * AR5413 TDMA slave
* Add a note about the magic values here; don't change them.adrian2012-11-271-0/+5
|
* When programming the beacon timer configuration, be very explicit aboutadrian2012-11-271-4/+13
| | | | | | | | | | | | | | | | | | | | what the maximum legal values are. The current beacon timer configuration from TDMA wraps things at HAL_BEACON_PERIOD-1 TU. For the 11a chips this is fine, but for the 11n chips it's not enough resolution. Since the 11a chips have a limit on what's "valid", just enforce this so when I do write larger values in, they get suitably wrapped before programming. Tested: * AR5413, TDMA slave Todo: * Run it for a (lot) longer on a clear channel, ensure that no strange slippages occur. * Re-validate this on STA configurations, just to be sure.
* Allow this file to build on FreeBSD.jmallett2012-11-271-0/+2
|
* Add NOTES and Makefile in order to generate LINT. NOTES contains prettymarcel2012-11-272-0/+95
| | | | | | | | much all the union of all the kernel configuration files, including all the CPU types, Marvell SOC types and at91 board types. Any device not supported (read: does not compile) has been removed, which is a fairly small set actually. As such, LINT gives us very good coverage without having to build a zillion kernels.
* Allow building LINT by defining both SAMPLE_AT_RESET on the one handmarcel2012-11-271-3/+4
| | | | | and SAMPLE_AT_RESET_{LO|HI} on the other. It doesn't matter which values they take, as long as they are defined.
* Don't include arm/xscale/i8134x/i81342reg.h when we're compiling LINT.marcel2012-11-271-1/+7
| | | | The definitions in i81342reg.h clash with those in i80321reg.h.
* Remove print_kernel_section_addr(). All statements in that functionmarcel2012-11-271-13/+0
| | | | | | | expand to uncompilable code when the kernel configuration contains "options DEBUG", such as it is for LINT. The toolchain is often a better approach to figure this out, as it doesn't require one to boot the kernel.
* Don't define intr_disable and intr_restore as macros. The macrosmarcel2012-11-271-8/+24
| | | | | | | | | | | | interfere with structure fields of the same name in drivers, like the intr_disable function pointer in struct cphy_ops in cxgb(4). Instead define intr_disable and intr_restore as inline functions. With intr_disable() an inline function, the I32_bit and F32_bit macros now need to be visible in MI code and given the rather poor names, this is not at all good. Define ARM_CPSR_F32 and ARM_CPSR_I32 and use that instead of F32_bit and I32_bit (resp) for now.
* Unbreak building a kernel with EHCI: there's no ehci_atmelarm.c.marcel2012-11-261-1/+0
|
* Pull in r168610 from upstream libc++:dim2012-11-263-0/+23
| | | | | | | | | | | | | | | When using libc++ headers on FreeBSD, in combination with -std=c++98, -ansi or -std=c++03, the long long type is not supported. So in this case, several functions and types, like lldiv_t, strtoll(), are not declared. This should make it possible to use the libc++ headers in c++98 mode. Note: libc++ is originally designed as a c++0x or higher library, so you should still take care when using it with c++98 or c++03. Noted by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp> MFC after: 1 week
* Fix problem with the Samsung 840 PRO series SSD detection.mav2012-11-261-0/+8
| | | | | | | | The device reports support for SATA Asynchronous Notification in its IDENTIFY data, but returns error on attempt to enable that feature. Make SATA XPT of CAM only report these errors, but not fail the device. MFC after: 1 week
* drbr_enqueue() awlays consumes mbuf, no matter did itglebius2012-11-261-27/+13
| | | | | | | | | | | | | | | fail or not. The mbuf pointer is no longer valid, so can't be reused after. Fix igb_mq_start() where mbuf pointer was used after drbr_enqueue(). This eventually leads us to all invocations of igb_mq_start_locked() called with third argument as NULL. This allows us to simplify this function. Submitted by: Karim Fodil-Lemelin <fodillemlinkarim gmail.com> Reviewed by: jfv
* Re-initialize eh pointer after m_adj()glebius2012-11-261-0/+1
| | | | | Submitted by: Kohji Okuno <okuno.kohji jp.panasonic.com> Reviewed by: yongari
* Fix typo in weekly line which made it to rotated after reaching > 1 Kb.glebius2012-11-261-1/+1
| | | | | PR: conf/173857 Submitted by: Matt Smith <matt xtaz.co.uk>
OpenPOWER on IntegriCloud