aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ide (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2012-05-18slub: fix a memory leak in get_partial_node()Joonsoo Kim1-3/+6
In the case which is below, 1. acquire slab for cpu partial list 2. free object to it by remote cpu 3. page->freelist = t then memory leak is occurred. Change acquire_slab() not to zap freelist when it works for cpu partial list. I think it is a sufficient solution for fixing a memory leak. Below is output of 'slabinfo -r kmalloc-256' when './perf stat -r 30 hackbench 50 process 4000 > /dev/null' is done. ***Vanilla*** Sizes (bytes) Slabs Debug Memory ------------------------------------------------------------------------ Object : 256 Total : 468 Sanity Checks : Off Total: 3833856 SlabObj: 256 Full : 111 Redzoning : Off Used : 2004992 SlabSiz: 8192 Partial: 302 Poisoning : Off Loss : 1828864 Loss : 0 CpuSlab: 55 Tracking : Off Lalig: 0 Align : 8 Objects: 32 Tracing : Off Lpadd: 0 ***Patched*** Sizes (bytes) Slabs Debug Memory ------------------------------------------------------------------------ Object : 256 Total : 300 Sanity Checks : Off Total: 2457600 SlabObj: 256 Full : 204 Redzoning : Off Used : 2348800 SlabSiz: 8192 Partial: 33 Poisoning : Off Loss : 108800 Loss : 0 CpuSlab: 63 Tracking : Off Lalig: 0 Align : 8 Objects: 32 Tracing : Off Lpadd: 0 Total and loss number is the impact of this patch. Cc: <stable@vger.kernel.org> Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
2012-05-16slub: remove unused argument of init_kmem_cache_node()Joonsoo Kim1-4/+4
We don't use the argument since commit 3b89d7d881a1dbb4da158f7eb5d6b3ceefc72810 ('slub: move min_partial to struct kmem_cache'), so remove it Acked-by: Christoph Lameter <cl@linux.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
2012-05-16slub: fix a possible memory leakJoonsoo Kim1-1/+1
Memory allocated by kstrdup should be freed, when kmalloc(kmem_size, GFP_KERNEL) is failed. Acked-by: Christoph Lameter <cl@linux.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
2012-05-10Documentations: Fix slabinfo.c directory in vm/slub.txtmajianpeng1-1/+1
Because the place of slabinfo.c changed.So update in slub.txt. Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: majianpeng <majianpeng@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
2012-05-08slub: fix incorrect return type of get_any_partial()Joonsoo Kim1-1/+1
Commit 497b66f2ecc97844493e6a147fd5a7e73f73f408 ('slub: return object pointer from get_partial() / new_slab().') changed return type of some functions. This updates missing part. Signed-off-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
2012-03-31Linux 3.4-rc1Linus Torvalds1-2/+2
2012-03-31vfs: fix out-of-date dentry_unhash() commentJ. Bruce Fields1-1/+1
64252c75a2196a0cf1e0d3777143ecfe0e3ae650 "vfs: remove dget() from dentry_unhash()" changed the implementation but not the comment. Cc: Sage Weil <sage@newdream.net> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31vfs: split __lookup_hashMiklos Szeredi1-64/+44
Split __lookup_hash into two component functions: lookup_dcache - tries cached lookup, returns whether real lookup is needed lookup_real - calls i_op->lookup This eliminates code duplication between d_alloc_and_lookup() and d_inode_lookup(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31untangling do_lookup() - take __lookup_hash()-calling case out of line.Al Viro1-15/+16
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31untangling do_lookup() - switch to calling __lookup_hash()Al Viro1-67/+46
now we have __lookup_hash() open-coded if !dentry case; just call the damn thing instead... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31untangling do_lookup() - merge d_alloc_and_lookup() callersAl Viro1-3/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31untangling do_lookup() - merge failure exits in !dentry caseAl Viro1-15/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31untangling do_lookup() - massage !dentry case towards __lookup_hash()Al Viro1-25/+20
Reorder if-else cases for starters... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31untangling do_lookup() - get rid of need_reval in !dentry caseAl Viro1-6/+1
Everything arriving into if (!dentry) will have need_reval = 1. Indeed, the only way to get there with need_reval reset to 0 would be via if (unlikely(d_need_lookup(dentry))) goto unlazy; if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE)) { status = d_revalidate(dentry, nd); if (unlikely(status <= 0)) { if (status != -ECHILD) need_reval = 0; goto unlazy; ... unlazy: /* no assignments to dentry */ if (dentry && unlikely(d_need_lookup(dentry))) { dput(dentry); dentry = NULL; } and if d_need_lookup() had already been false the first time around, it will remain false on the second call as well. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31untangling do_lookup() - eliminate a loop.Al Viro1-4/+8
d_lookup() *will* fail after successful d_invalidate(), if we are holding i_mutex all along. IOW, we don't need to jump back to l: - we know what path will be taken there and can do that (i.e. d_alloc_and_lookup()) directly. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31untangling do_lookup() - expand the area under ->i_mutexAl Viro1-2/+4
keep holding ->i_mutex over revalidation parts Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31untangling do_lookup() - isolate !dentry stuff from the rest of it.Al Viro1-1/+16
Duplicate the revalidation-related parts into if (!dentry) branch. Next step will be to pull them under i_mutex. This and the next 8 commits are more or less a splitup of patch by Miklos; folks, when you are working with something that convoluted, carve your patches up into easily reviewed steps, especially when a lot of codepaths involved are rarely hit... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31vfs: move MAY_EXEC check from __lookup_hash()Miklos Szeredi1-6/+5
The only caller of __lookup_hash() that needs the exec permission check on parent is lookup_one_len(). All lookup_hash() callers already checked permission in LOOKUP_PARENT walk. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31vfs: don't revalidate just looked up dentryMiklos Szeredi1-3/+1
__lookup_hash() calls ->lookup() if the dentry needs lookup and on success revalidates the dentry (all under dir->i_mutex). While this is harmless it doesn't make a lot of sense. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31vfs: fix d_need_lookup/d_revalidate order in do_lookupMiklos Szeredi1-2/+2
Doing revalidate on a dentry which has not yet been looked up makes no sense. Move the d_need_lookup() check before d_revalidate(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31ext3: move headers to fs/ext3/Al Viro23-668/+437
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31migrate ext2_fs.h guts to fs/ext2/ext2.hAl Viro6-656/+634
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31new helper: ext2_image_size()Al Viro3-8/+30
... implemented that way since the next commit will leave it almost alone in ext2_fs.h - most of the file (including struct ext2_super_block) is going to move to fs/ext2/ext2.h. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31get rid of pointless includes of ext2_fs.hAl Viro4-9/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31ext2: No longer export ext2_fs.h to user spaceThierry Reding2-63/+10
Since the on-disk format has been stable for quite some time, users should either use the headers provided by libext2fs or keep a private copy of this header. For the full discussion, see this thread: https://lkml.org/lkml/2012/3/21/516 While at it, this commit removes all __KERNEL__ guards, which are now unnecessary. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jan Kara <jack@suse.cz> Cc: Ted Ts'o <tytso@mit.edu> Cc: Artem Bityutskiy <dedekind1@gmail.com> Cc: Andreas Dilger <aedilger@gmail.com> Cc: linux-ext4@vger.kernel.org
2012-03-31mtdchar: kill persistently held vfsmountAl Viro1-37/+16
... and mtdchar_notifier along with it; just have ->drop_inode() that will unconditionally get evict them instead of dances on mtd device removal and use simple_pin_fs() instead of kern_mount() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31pstore: trim pstore_get_inode()Al Viro1-18/+8
move mode-dependent parts to callers, kill unused arguments Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31aio: take final put_ioctx() into callers of io_destroy()Al Viro1-6/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31aio: merge aio_cancel_all() with wait_for_all_aios()Al Viro1-15/+7
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31selinuxfs: merge dentry allocation into sel_make_dir()Al Viro1-66/+44
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31ASPM: Fix pcie devices with non-pcie childrenMatthew Garrett1-3/+10
Since 3.2.12 and 3.3, some systems are failing to boot with a BUG_ON. Some other systems using the pata_jmicron driver fail to boot because no disks are detected. Passing pcie_aspm=force on the kernel command line works around it. The cause: commit 4949be16822e ("PCI: ignore pre-1.1 ASPM quirking when ASPM is disabled") changed the behaviour of pcie_aspm_sanity_check() to always return 0 if aspm is disabled, in order to avoid cases where we changed ASPM state on pre-PCIe 1.1 devices. This skipped the secondary function of pcie_aspm_sanity_check which was to avoid us enabling ASPM on devices that had non-PCIe children, causing trouble later on. Move the aspm_disabled check so we continue to honour that scenario. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=42979 and http://bugs.debian.org/665420 Reported-by: Romain Francoise <romain@orebokech.com> # kernel panic Reported-by: Chris Holland <bandidoirlandes@gmail.com> # disk detection trouble Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: stable@vger.kernel.org Tested-by: Hatem Masmoudi <hatem.masmoudi@gmail.com> # Dell Latitude E5520 Tested-by: janek <jan0x6c@gmail.com> # pata_jmicron with JMB362/JMB363 [jn: with more symptoms in log message] Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-31selinux: inline avc_audit() and avc_has_perm_noaudit() into callerLinus Torvalds1-2/+2
Now that all the slow-path code is gone from these functions, we can inline them into the main caller - avc_has_perm_flags(). Now the compiler can see that 'avc' is allocated on the stack for this case, which helps register pressure a bit. It also actually shrinks the total stack frame, because the stack frame that avc_has_perm_flags() always needed (for that 'avc' allocation) is now sufficient for the inlined functions too. Inlining isn't bad - but mindless inlining of cold code (see the previous commit) is. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-31selinux: don't inline slow-path code into avc_has_perm_noaudit()Linus Torvalds1-14/+38
The selinux AVC paths remain some of the hottest (and deepest) codepaths at filename lookup time, and we make it worse by having the slow path cases take up I$ and stack space even when they don't trigger. Gcc tends to always want to inline functions that are just called once - never mind that this might make for slower and worse code in the caller. So this tries to improve on it a bit by making the slow-path cases explicitly separate functions that are marked noinline, causing gcc to at least no longer allocate stack space for them unless they are actually called. It also seems to help register allocation a tiny bit, since gcc now doesn't take the slow case code into account. Uninlining the slow path may also allow us to inline the remaining hot path into the one caller that actually matters: avc_has_perm_flags(). I'll have to look at that separately, but both avc_audit() and avc_has_perm_noaudit() are now small and lean enough that inlining them may make sense. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-31sched: Fix incorrect usage of for_each_cpu_mask() in select_fallback_rq()Srivatsa S. Bhat1-2/+2
The function for_each_cpu_mask() expects a *pointer* to struct cpumask as its second argument, whereas select_fallback_rq() passes the value itself. And moreover, for_each_cpu_mask() has been marked as obselete in include/linux/cpumask.h. So move to the more appropriate for_each_cpu() variant. Reported-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Dave Jones <davej@redhat.com> Cc: Liu Chuansheng <chuansheng.liu@intel.com> Cc: vapier@gentoo.org Cc: rusty@rustcorp.com.au Link: http://lkml.kernel.org/r/4F75BED4.9050005@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-03-31virtio-pci: switch to PM ops macro to initialise PM functionsAmit Shah1-6/+1
Use the SET_SYSTEM_SLEEP_PM_OPS macro to initialise the suspend/resume functions in the new PM API. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2012-03-31virtio-pci: S3 supportAmit Shah1-21/+3
There's no difference in supporting S3 and S4 for virtio devices: the vqs have to be re-created as the device has to be assumed to be reset at restore-time. Since S4 already handles this situation, we can directly use the same code and callbacks for S3 support. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2012-03-31virtio-pci: drop restore_common()Amit Shah1-16/+7
restore_common() was shared between restore and thaw callbacks. With thaw gone, we don't need restore_common() anymore. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2012-03-31virtio: drop thaw PM operationAmit Shah3-34/+1
The thaw operation was used by the balloon driver, but after the last commit there's no reason to have separate thaw and restore callbacks. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2012-03-31virtio: balloon: Allow stats update after restore from S4Amit Shah1-8/+0
There's no reason stats update after restore can't work. If a host requested for stats, and before servicing the request, the guest entered S4, upon restore, the stats request can still be processed and sent off to the host. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2012-03-30sparc32: fix fallout from system.h removalSam Ravnborg3-0/+3
Build failures for the typical configs I use Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-30Documentation: fix typo in ABI/stable/sysfs-driver-usb-usbtmcRafal Kapela1-1/+1
Fix "the the" in ABI/stable/sysfs-driver-usb-usbtmc Signed-off-by: Rafal Kapela <raf.kapela@gmail.com> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-30Documentation: replace install commands with softdepsLucas De Marchi3-5/+4
Install commands should not be used to specify soft dependencies among modules. When loading modules it's much better to have a softdep that modprobe knows what's being done than having to fork/exec another instance of modprobe to load the other module. By using a softdep user has also an option to remove the dependencies when removing the module (and if its refcount dropped to 0) Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-30Documentation: remove references to /etc/modprobe.confLucas De Marchi50-160/+138
Usage of /etc/modprobe.conf file was deprecated by module-init-tools and is no longer parsed by new kmod tool. References to this file are replaced in Documentation, comments and Kconfig according to the context. There are also some references to the old /etc/modules.conf from 2.4 kernels that are being removed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-30Documentation: input.txt: clarify mousedev 'cat' command syntaxRandy Dunlap1-2/+2
Clarify that the 'cat' command does not include the (c, 13, 32) after it. Reported-by: Dan Jidanni Jacobson <jidanni@jidanni.org> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-30Documentation: CodingStyle: add inline assembly guidelinesJosh Triplett1-0/+29
Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-30Documentation: sysrq: Crutcher Dunnavant is unavailableRandy Dunlap1-3/+2
Reported-by: Křištof Želechovski <giecrilj@stegny.2a.pl> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-30Documentation: mention scripts/diffconfig toolJavi Merino1-5/+3
The kconfig documentation suggests using plain 'diff' to compare config files and then adds "Yes, we need something better here". Commit a717417e7f96 ("kconfig: add diffconfig utility") added what that comment was looking for. Signed-off-by: Javi Merino <javi.merino@arm.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-30Documentation: remove 'mach' from dontdiff fileH Hartley Sweeten1-1/+0
The mach entry in the dontdiff file causes all the arch/arm/mach-*/include/mach directories to be skipped. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-30ARM: clps711x: fix missing include fileOlof Johansson1-0/+1
linux/bug.h is needed due to an ARRAY_SIZE being used: arch/arm/mach-clps711x/edb7211-mm.c: In function 'edb7211_map_io': arch/arm/mach-clps711x/edb7211-mm.c:79:9: error: implicit declaration of function 'BUILD_BUG_ON_ZERO' Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-30ARM: fix builds due to missing <asm/system_misc.h> includesOlof Johansson11-0/+12
This does a sweeping change fixing up all the missing system_misc.h and system_info.h includes from the system.h split-up change. These were the ones I came across when building all defconfigs in arch/arm/configs, there might be more but they lack adequate build coverage to be easily caught. I'm expecting to get a lot of these piecemeal by each maintainer, so we might just as well do one sweeping change to get them all at once. Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Imre Kaloz <kaloz@openwrt.org> Cc: Krzysztof Halasa <khc@pm.waw.pl> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Olof Johansson <olof@lixom.net>