| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
you tag a socket with an uint32_t value. The cookie can then be
used by the kernel for various purposes, e.g. setting the skipto
rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has
been implemented; however there is nothing ipfw-specific in its
implementation).
The ipfw-related code that uses the optopn will be committed separately.
This change adds a field to 'struct socket', but the struct is not
part of any driver or userland-visible ABI so the change should be
harmless.
See the discussion at
http://lists.freebsd.org/pipermail/freebsd-ipfw/2009-October/004001.html
Idea and code from Paul Joe, small modifications and manpage
changes by myself.
Submitted by: Paul Joe
MFC after: 1 week
|
|
|
|
| |
Submitted by: bde
|
|
|
|
| |
Discussed with: kib
|
|
|
|
|
| |
Submitted by: gianni
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
| |
contents of the ones that were not empty were stale and unused.
- Now that <machine/mutex.h> no longer exists, there is no need to allow it
to override various helper macros in <sys/mutex.h>.
- Rename various helper macros for low-level operations on mutexes to live
in the _mtx_* or __mtx_* namespaces. While here, change the names to more
closely match the real API functions they are backing.
- Drop support for including <sys/mutex.h> in assembly source files.
Suggested by: bde (1, 2)
|
|
|
|
|
| |
PR: bin/148894
Submitted by: olgeni
|
|
|
|
|
|
| |
line number information is preserved in witness.
Reviewed by: jhb
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
it to run as taskqueue_drain(9) does.
Requested by: hselasky
Original code: jeff
Reviewed by: jhb
MFC after: 2 weeks
|
|
|
|
|
| |
was lauched. Few seconds event burst, accumulated during long startup,
reported to cause panic in SCHED_ULE priority calculation logic.
|
|
|
|
|
|
| |
the code behavior.
Submitted by: Lucius Windschuh
|
| |
|
|
|
|
|
|
|
|
|
| |
a shorter message (userland generally only sees the first 6 to 8
characters) when waiting for the allproc lock. Use "-" when idle to math
the behavior of other kthreads.
Reviewed by: attilio
MFC after: 1 week
|
|
|
|
|
|
| |
This is requested by bge.
Also move the sysctl into file kern_cpuset.c, because it should
always be there, it is independent of thread scheduler.
|
|
|
|
|
|
|
| |
This should fix callout precision drop to 1/4s after 25 days of uptime
with HZ = 1000.
Submitted by: Taku YAMAMOTO <taku@tackymt.homeip.net>
|
|
|
|
| |
MFC: do not
|
|
|
|
|
| |
Found with: Coverity Prevent(tm)
CID: 8632
|
|
|
|
|
|
| |
also add sysconf() key _SC_CPUSET_SIZE to get sysctl value.
Submitted by: gcooper
|
|
|
|
|
|
|
| |
ensures 'bootverbose' is in a valid state for all SYSINITs.
Reported by: avg
MFC after: 1 week
|
|
|
|
| |
- Use long word to figure out sizeof kernel cpuset, hope it works.
|
|
|
|
| |
kernel is using.
|
|
|
|
| |
it should help interactivity in edge cases.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
existing code caused problems with some SCSI controllers.
A new sysctl kern.cam.ada.spindown_shutdown has been added that controls
whether or not to spin-down disks when shutting down.
Spinning down the disks unloads/parks the heads - this is
much better than removing power when the disk is still
spinning because otherwise an Emergency Unload occurs which may cause damage
to the actuator.
PR: kern/140752
Submitted by: olli
Reviewed by: arundel
Discussed with: mav
MFC after: 2 weeks
|
|
|
|
|
|
| |
branch some time ago.
MFC after: two weeks
|
|
|
|
|
|
| |
hash if it can directly exit, otherwise let exit1() do it.
The change should be in r213950, but for unknown reason,
it was lost.
|
|
|
|
|
|
|
|
|
|
|
| |
MOD_UNLOAD. This makes it possible to add custom hooks for other module
events.
Return EOPNOTSUPP when there is no callback available.
Pointed out by: jhb
Reviewed by: jhb
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
may be left. This fixes a memory leak that can occur when tracing is
disabled on a process via disabling tracing of a specific file (or if
an I/O error occurs with the tracefile) if the process's next system
call is exit(). The trace disabling code clears p_traceflag, so exit1()
doesn't do any KTRACE-related cleanup leading to the leak. I chose to
make the free'ing of pending records synchronous rather than patching
exit1().
- Move KTRACE-specific logic out of kern_(exec|exit|fork).c and into
kern_ktrace.c instead. Make ktrace_mtx private to kern_ktrace.c as a
result.
MFC after: 1 month
|
|
|
|
|
|
|
|
|
| |
unreached code as pointed out in a Chinese forum [1].
[1] http://www.freebsdchina.org/forum/viewtopic.php?t=50619
Pointed out by: btw616 <btw s qq com>
MFC after: 1 month
|
|
|
|
|
| |
- Check NULL pointer, move timeout calculation code outside of
process lock.
|
|
|
|
|
|
|
| |
device appear when mounting root from ZFS.
Reviewed by: marcel
Approved by: mav (mentor)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
root file system (starting with devfs and a synthesized configuration) can
contain directives for mounting another file system as root. The old root
file system is re-mounted under the new root file system (with /.mount or
/mnt as the mount point) to allow access to the underlying file system.
The configuration allows for creating vnode-backed memory disks that can
subsequently be mounted as root. This allows for an efficient and low-
cost way to distribute and boot FreeBSD software images that reside on
some storage media.
When trying a mount, the kernel will wait for the device in question to
arrive. The timeout is configurable and is part of the configuration.
This allows arbitrarily complex GEOM configurations to be constructed
on the fly.
A side-effect of this change is that all root specifications, whether
compiled into the kernel or typed at the prompt can contain root mount
options.
|
|
|
|
| |
mount option. Otherwise errors tend to get printed multiple times.
|
|
|
|
|
| |
kern_shutdown.c. This makes it easier for emulators and other
parts of the kernel to initiate a reboot.
|
|
|
|
|
|
|
|
| |
counter on SMU-based systems, which causes FreeBSD to reject the RTC time
when used in a dual-boot environment. Since we don't use the day-of-week
counter anyway, solve this by just not checking that it matches.
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
- In thr_exit() and kthread_exit(), only remove thread from
hash if it can directly exit, otherwise let exit1() do it.
- In thread_suspend_check(), fix cleanup code when thread needs
to exit.
This change seems fixed the "Bad link elm " panic found by
Peter Holm.
Stress testing: pho
|
|
|
|
|
|
|
|
|
| |
Move debug.ncnegfactor to vfs.ncnegfactor [1].
Provide some descriptions for the namecache related sysctls [1].
Based on the submission by: Rogier R. Mulhuijzen <drwilco drwilco net> [1]
MFC after: 2 weeks
X-MFC-note: remove debug.ncnegfactor in HEAD after MFC
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of using SIGISMEMBER to test every interesting signal, just
unmask the signal set and let cursig() return one, get the signal
after it returns, call reschedule_signal() after signals are blocked
again.
In kern_sigprocmask(), don't call reschedule_signal() when it is
unnecessary.
In reschedule_signal(), replace SIGISEMPTY() + SIGISMEMBER() with
sig_ffs(), rename variable 'i' to sig.
|
|
|
|
|
|
|
|
| |
that does not rely on the lifetime of pointers being the same. This also
restores the task KBI.
Suggested by: jhb
MFC after: 1 month
|
|
|
|
| |
maintain pending set correctly.
|
|
|
|
|
|
| |
in at least one 3rd party driver.
Requested by: jhb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is based on the same approach as used in panic().
In theory parallel execution of generic_stop_cpus() could lead to two CPUs
stopping each other and everyone else, and thus a total system halt.
Also, in theory, we should have some smarter locking here, because two
(or more CPUs) could be stopping unrelated sets of CPUs.
But in practice, it seems, this function is only used to stop
"all other" CPUs.
Additionally, I took this opportunity to make amd64-specific suspend_cpus()
function use generic_stop_cpus() instead of rolling out essentially
duplicate code.
This code is based on code by Sandvine Incorporated.
Suggested by: mdf
Reviewed by: jhb, jkim (earlier version)
MFC after: 2 weeks
|
|
|
|
| |
added to or removed from thread hash table multiple times.
|
|
|
|
|
|
|
|
|
|
| |
breakage for old mount(2) syscall, since most struct <filesystem>_args
embed export_args. The mount(2) is supposed to provide ABI
compatibility for pre-nmount mount(8) binaries, so restore ABI to
pre-r184588.
Requested and reviewed by: bde
MFC after: 2 weeks
|
|
|
|
|
|
| |
Suggested by: alc
Reviewed by: alc
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
This is to prevent caching of its value in a register when it is checked
and modified by multiple CPUs in parallel.
Also, move the variable into the scope of the only function that uses it.
Reviewed by: jhb
Hint from: mdf
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
rwlock to protect the table. In old code, thread lookup is done with
process lock held, to find a thread, kernel has to iterate through
process and thread list, this is quite inefficient.
With this change, test shows in extreme case performance is
dramatically improved.
Earlier patch was reviewed by: jhb, julian
|
|
|
|
|
|
|
|
| |
process address.
Add "tdaddr" keyword to ps(1) to display this thread address.
Distilled from Sandvine's patch set by Mark Johnston.
|
|
|
|
|
|
|
| |
Based on a patch from Sandvine Incorporated via emaste.
Reviewed by: emaste
MFC after: 1 week
|