20 Jul, 2007
40 commits
-
Move code around to get fewer but larger #ifdef sections. Break some
in-function #ifdefs out into their own functions.Signed-off-by: Peter Zijlstra
Acked-by: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Ensure that all of the lock dependency tracking code is under
CONFIG_PROVE_LOCKING. This allows us to use the held lock tracking code for
other purposes.Signed-off-by: Peter Zijlstra
Acked-by: Ingo Molnar
Acked-by: Jason Baron
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use the lockdep infrastructure to track lock contention and other lock
statistics.It tracks lock contention events, and the first four unique call-sites that
encountered contention.It also measures lock wait-time and hold-time in nanoseconds. The minimum and
maximum times are tracked, as well as a total (which together with the number
of event can give the avg).All statistics are done per lock class, per write (exclusive state) and per read
(shared state).The statistics are collected per-cpu, so that the collection overhead is
minimized via having no global cachemisses.This new lock statistics feature is independent of the lock dependency checking
traditionally done by lockdep; it just shares the lock tracking code. It is
also possible to enable both and runtime disabled either component - thereby
avoiding the O(n^2) lock chain walks for instance.This patch:
raw_spinlock_t should not use lockdep (and doesn't) since lockdep itself
relies on it.Signed-off-by: Peter Zijlstra
Acked-by: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Similar information can easily be obtained with strace -c.
Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The sb_info structure only contains a single pointer to the character device,
there is no need for the added indirection.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Venus returns an ENOENT error on open, so we shouldn't try to grab the
filehandle for the returned fd.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Jan Harkes
Cc: Al Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We ignore signals for about 30 seconds to give userspace a chance to see the
upcall. As we did not block signals we ended up in a busy loop for the
remainder of the period when a signal is received.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make the code that processes upcall responses more straightforward, uncovered
at least one bad assumption. We trusted that vc_inuse would be 0 when upcalls
are aborted, however the device may have been reopened.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
- Make sure device index is not a negative number.
- Unlink queued requests when the device is closed to avoid passing them
to the next opener.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Set MS_NOATIME flag to avoid unnecessary calls when the coda inode is
accessed.Also, set statfs.f_bsize to 4k. 1k is obviously too small for the suggested
IO size.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A directory without children may still be busy when it is the cwd for some
process. We can safely remove such a directory because the VFS prevents
further operations. Also we don't need to call d_delete as it is already
called in vfs_rmdir.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The Coda client sets the directory link count to 1 when it isn't sure how many
subdirectories we have. In this case we shouldn't change the link count in
the kernel when a subdirectory is created or removed.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change the epoch value to forces a refresh instead of clearing the cached
rights mask and block all further accesses to the object.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When open fails the fd in the response is uninitialized and we ended up taking
a reference on the file struct and never released it.Signed-off-by: Jan Harkes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This change passes the --build-id when linking the kernel and when linking
modules, if ld supports it. This is a new GNU ld option that synthesizes an
ELF note section inside the read-only data. The note in this section contains
unique identifying bits called the "build ID", which are generated so as to be
different for any two linked ELF files that aren't identical. The build ID
can be recovered from stripped files, memory dumps, etc. and used to look up
the original program built, locate debuginfo or other details or history
associated with it. For normal program linking, the compiler passes
--build-id to ld by default, but the option is needed when using ld directly
as we do.Signed-off-by: Roland McGrath
Cc: Andi Kleen
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch adds the /sys/kernel/notes magic file. Reading this delivers the
contents of the kernel's .notes section. This lets userland easily glean any
detailed information about the running kernel's build that was stored there at
compile time.Signed-off-by: Roland McGrath
Cc: Andi Kleen
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This changes the s390 linker script to use the asm-generic NOTES macro so that
ELF note sections with SHF_ALLOC set are linked into the kernel image along
with other read-only data. The PT_NOTE also points to their location.This paves the way for putting useful build-time information into ELF notes
that can be found easily later in a kernel memory dump.Signed-off-by: Roland McGrath
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This changes the powerpc linker script to use the asm-generic NOTES macro so
that ELF note sections with SHF_ALLOC set are linked into the kernel image
along with other read-only data. The PT_NOTE also points to their location.This paves the way for putting useful build-time information into ELF notes
that can be found easily later in a kernel memory dump.Signed-off-by: Roland McGrath
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This changes the alpha linker script to use the asm-generic NOTES macro so
that ELF note sections with SHF_ALLOC set are linked into the kernel image
along with other read-only data. The PT_NOTE also points to their location.This paves the way for putting useful build-time information into ELF notes
that can be found easily later in a kernel memory dump.Signed-off-by: Roland McGrath
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This changes the x86_64 linker script to use the asm-generic NOTES macro so
that ELF note sections with SHF_ALLOC set are linked into the kernel image
along with other read-only data. The PT_NOTE also points to their location.This paves the way for putting useful build-time information into ELF notes
that can be found easily later in a kernel memory dump.Signed-off-by: Roland McGrath
Cc: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This changes the i386 linker script and the asm-generic macro it uses so that
ELF note sections with SHF_ALLOC set are linked into the kernel image along
with other read-only data. The PT_NOTE also points to their location.This paves the way for putting useful build-time information into ELF notes
that can be found easily later in a kernel memory dump.Signed-off-by: Roland McGrath
Cc: Andi Kleen
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Looking at the current linus-git tree jbd_debug() define in
include/linux/jbd2.hextern u8 journal_enable_debug;
#define jbd_debug(n, f, a...) \
do { \
if ((n) fs/ext4/inode.c: In function âext4_write_inodeâ:
> fs/ext4/inode.c:2906: warning: comparison is always true due to limited
> range of data type
>
> fs/jbd2/recovery.c: In function âjbd2_journal_recoverâ:
> fs/jbd2/recovery.c:254: warning: comparison is always true due to
> limited range of data type
> fs/jbd2/recovery.c:257: warning: comparison is always true due to
> limited range of data type
>
> fs/jbd2/recovery.c: In function âjbd2_journal_skip_recoveryâ:
> fs/jbd2/recovery.c:301: warning: comparison is always true due to
> limited range of data type
>
Noticed all warnings are occurs when the debug level is 0. Then found
the "jbd2: Move jbd2-debug file to debugfs" patch
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f49d5d019afa4e94253bfc92f0daca3badb990bchanged the jbd2_journal_enable_debug from int type to u8, makes the
jbd_debug comparision is always true when the debugging level is 0. Thus
the compile warning occurs.Thought about changing the jbd2_journal_enable_debug data type back to
int, but can't, because the jbd2-debug is moved to debug fs, where
calling debugfs_create_u8() to create the debugfs entry needs the value
to be u8 type.Even if we changed the data type back to int, the code is still buggy,
kernel should not print jbd2 debug message if the
jbd2_journal_enable_debug is set to 0. But this is not the case.The fix is change the level of debugging to 1. The same should fixed in
ext3/JBD, but currently ext3 jbd-debug via /proc fs is broken, so we
probably should fix it all together.Signed-off-by: Mingming Cao
Cc: Jeff Garzik
Cc: Theodore Tso
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This version brings a number of new checks, and a number of bug
fixes. Of note:- warnings for multiple assignments per line
- warnings for multiple declarations per line
- checks for single statement blocks with bracesThis patch includes an update for feature-removal-schedule.txt to
better target checks.Andy Whitcroft (12):
Version: 0.08
only apply printk checks where there is a string literal
allow suppression of errors for when no patch is found
warn about multiple assignments
warn on declaration of multiple variables
check for kfree() with needless null check
check for single statement braced blocks
check for aggregate initialisation on the next line
handle the => operator
check for spaces between function name and open parenthesis
move to explicit Check: entries in feature-removal-schedule.txt
handle pointer attributesSigned-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Rolf Eike Beer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Update the MAINTAINERS file: Thomas Gleixner has been the de-facto
maintainer of POSIX timers and clocks for quite some time.Signed-off-by: Ingo Molnar
Cc: Thomas Gleixner
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Adrian Bunk
Cc: Tom Zanussi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch adds the documentation for /proc//coredump_filter.
Signed-off-by: Hidehiro Kawai
Cc: Alan Cox
Cc: David Howells
Cc: Hugh Dickins
Cc: Nick Piggin
Cc: "Randy.Dunlap"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch enables core dump filtering for ELF-FDPIC-formatted core file.
Signed-off-by: Hidehiro Kawai
Cc: Alan Cox
Cc: David Howells
Cc: Hugh Dickins
Cc: Nick Piggin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch removes an unused argument from elf_fdpic_dump_segments().
Signed-off-by: Hidehiro Kawai
Cc: Alan Cox
Cc: David Howells
Cc: Hugh Dickins
Cc: Nick Piggin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch enables core dump filtering for ELF-formatted core file.
Signed-off-by: Hidehiro Kawai
Cc: Alan Cox
Cc: David Howells
Cc: Hugh Dickins
Cc: Nick Piggin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch adds an interface to set/reset flags which determines each memory
segment should be dumped or not when a core file is generated./proc//coredump_filter file is provided to access the flags. You can
change the flag status for a particular process by writing to or reading from
the file.The flag status is inherited to the child process when it is created.
Signed-off-by: Hidehiro Kawai
Cc: Alan Cox
Cc: David Howells
Cc: Hugh Dickins
Cc: Nick Piggin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch changes mm_struct.dumpable to a pair of bit flags.
set_dumpable() converts three-value dumpable to two flags and stores it into
lower two bits of mm_struct.flags instead of mm_struct.dumpable.
get_dumpable() behaves in the opposite way.[akpm@linux-foundation.org: export set_dumpable]
Signed-off-by: Hidehiro Kawai
Cc: Alan Cox
Cc: David Howells
Cc: Hugh Dickins
Cc: Nick Piggin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch series is version 5 of the core dump masking feature, which
controls which VMAs should be dumped based on their memory types and
per-process flags.I adopted most of Andrew's suggestion at the previous version. He also
suggested using system call instead of /proc// interface, I decided to
use the latter continuously because adding new system call with pid argument
will give a big impact on the kernel.You can access the per-process flags via /proc//coredump_filter
interface. coredump_filter represents a bitmask of memory types, and if a bit
is set, VMAs of corresponding memory type are written into a core file when
the process is dumped. The bitmask is inherited from the parent process when
a process is created.The original purpose is to avoid longtime system slowdown when a number of
processes which share a huge shared memory are dumped at the same time. To
achieve this purpose, this patch series adds an ability to suppress dumping
anonymous shared memory for specified processes. In this version, three other
memory types are also supported.Here are the coredump_filter bits:
bit 0: anonymous private memory
bit 1: anonymous shared memory
bit 2: file-backed private memory
bit 3: file-backed shared memoryThe default value of coredump_filter is 0x3. This means the new core dump
routine has the same behavior as conventional behavior by default.In this version, coredump_filter bits and mm.dumpable are merged into
mm.flags, and it is accessed by atomic bitops.The supported core file formats are ELF and ELF-FDPIC. ELF has been tested,
but ELF-FDPIC has not been built and tested because I don't have the test
environment.This patch limits a value of suid_dumpable sysctl to the range of 0 to 2.
Signed-off-by: Hidehiro Kawai
Cc: Alan Cox
Cc: David Howells
Cc: Hugh Dickins
Cc: Nick Piggin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove include/linux/rmap.h from kernel-api.tmpl since it no longer
contains kernel-doc. Fixes this warning:Warning(linux-2.6.22//include/linux/rmap.h): no structured comments found
Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds