On Tue, Jun 16, 2020 at 02:53:33PM +1000, Stephen Rothwell wrote:
> Hi,
>
> I have removed the leaks tree
> (https://git.kernel.org/pub/scm/linux/kernel/git/tobin/leaks.git#leaks-next)
> from linux-next because it has not been updated in more than a year.
> If you would like it reinstated, please
On Sat, Jun 29, 2019 at 08:06:24PM +0100, Al Viro wrote:
> On Sat, Jun 29, 2019 at 05:38:03AM +0100, Al Viro wrote:
>
> > PS: the problem is not gone in the next iteration of the patchset in
> > question. The patch I'm proposing (including dput_to_list() and _ONLY_
> > compile-tested) follows.
In order to support object migration on the dentry cache we need to have
a determined object state at all times. Without a constructor the object
would have a random state after allocation.
Provide a dentry constructor.
Signed-off-by: Tobin C. Harding
---
fs/dcache.c | 30
ho "N1 N1" > move
Signed-off-by: Tobin C. Harding
---
mm/Kconfig | 7 ++
mm/slub.c | 247 +
2 files changed, 254 insertions(+)
diff --git a/mm/Kconfig b/mm/Kconfig
index f0c76ba47695..c1438b9e578b 100644
--- a/mm/Kconfig
++
, no other value accepted.
This feature relies on SMO being enable for the cache, this is done with
a call to, after the isolate/migrate functions have been defined.
kmem_cache_setup_mobility(s, isolate, migrate)
Signed-off-by: Tobin C. Harding
---
mm/slub.c | 130
by Matthew Wilcox and was modified to work
with slab object migration.
Cc: Matthew Wilcox
Signed-off-by: Tobin C. Harding
---
lib/xarray.c | 61
1 file changed, 61 insertions(+)
diff --git a/lib/xarray.c b/lib/xarray.c
index 861c042daa1d
ber of objects):
# cd /sys/kernel/debug/smo
# echo 'test' > callfn
[3.576617] smo: test using nr_objs: 1000 keep: 10
[3.580169] smo: Module tests completed successfully
Signed-off-by: Tobin C. Harding
---
tools/testing/slab/Makefile | 10 +
tools/testing/slab/slub_defrag.
Wilcox
Signed-off-by: Tobin C. Harding
---
include/linux/xarray.h | 3 +++
init/main.c| 2 ++
lib/radix-tree.c | 2 +-
lib/xarray.c | 48 ++
4 files changed, 45 insertions(+), 10 deletions(-)
diff --git a/include/linux/xarray.h
to enable SMO a call to kmem_cache_setup_mobility() must be
made, we do this during initialization of the dcache.
Implement isolate and 'migrate' functions for the dentry slab cache.
Enable SMO for the dcache during initialization.
Signed-off-by: Tobin C. Harding
---
fs/dcache.c | 75
partial slab.
Signed-off-by: Tobin C. Harding
---
tools/testing/slab/Makefile | 2 +-
tools/testing/slab/slub_defrag_xarray.c | 211
2 files changed, 212 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/slab/slub_defrag_xarray.c
diff --git
...
verified movable slabs are shrinkable
Removing module slub_defrag ...
Signed-off-by: Tobin C. Harding
---
tools/testing/slab/slub_defrag.c | 1 +
tools/testing/slab/slub_defrag.py | 451 ++
2 files changed, 452 insertions(+)
create mode 100755 tools/testing/slab
Add output for the newly added defrag_used_ratio sysfs knob.
Signed-off-by: Tobin C. Harding
---
tools/vm/slabinfo.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index d2c22f9ee2d8..ef4ff93df4cc 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm
Add output line for NUMA remote node defrag ratio.
Signed-off-by: Tobin C. Harding
---
tools/vm/slabinfo.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index cbfc56c44c2f..d2c22f9ee2d8 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm
'
callbacks.
Signed-off-by: Tobin C. Harding
---
include/linux/slab.h | 70
include/linux/slub_def.h | 3 ++
mm/slub.c| 59 +
3 files changed, 126 insertions(+), 6 deletions(-)
diff --git a/include
-C lists caches that use a ctor.
-M lists caches that support object migration.
Add command line options to show caches with a constructor and caches
that are movable (i.e. have migrate function).
Signed-off-by: Tobin C. Harding
---
tools/vm/slabinfo.c | 40
It is advantageous to have all defragmentable slabs together at the
beginning of the list of slabs so that there is no need to scan the
complete list. Put defragmentable caches first when adding a slab cache
and others last.
Signed-off-by: Tobin C. Harding
---
mm/slab_common.c | 2 +-
mm/slub.c
all to the
recently added function:
void kmem_cache_setup_mobility(struct kmem_cache *,
kmem_cache_isolate_func,
kmem_cache_migrate_func);
Signed-off-by: Tobin C. Harding
---
Documentation/ABI/testing/sysfs-kernel-s
that the migration works and does not appear to break
anything.
Patch #14 and #15 depend on
CONFIG_SLBU_DEBUG_ON or boot with 'slub_debug'
Thanks for taking the time to look at this.
Tobin
Tobin C. Harding (15):
slub: Add isolate() and migrate() methods
tools/vm/slabinfo
On Wed, May 29, 2019 at 04:16:51PM +, Roman Gushchin wrote:
> On Wed, May 29, 2019 at 01:54:06PM +1000, Tobin C. Harding wrote:
> > On Tue, May 21, 2019 at 02:05:38AM +, Roman Gushchin wrote:
> > > On Tue, May 21, 2019 at 11:31:18AM +1000, Tobin C. Harding wrote:
>
On Tue, May 21, 2019 at 02:05:38AM +, Roman Gushchin wrote:
> On Tue, May 21, 2019 at 11:31:18AM +1000, Tobin C. Harding wrote:
> > On Tue, May 21, 2019 at 12:57:47AM +, Roman Gushchin wrote:
> > > On Mon, May 20, 2019 at 03:40:17PM +1000, Tobin C. Harding wrote:
>
On Tue, May 21, 2019 at 02:05:38AM +, Roman Gushchin wrote:
> On Tue, May 21, 2019 at 11:31:18AM +1000, Tobin C. Harding wrote:
> > On Tue, May 21, 2019 at 12:57:47AM +, Roman Gushchin wrote:
> > > On Mon, May 20, 2019 at 03:40:17PM +1000, Tobin C. Harding wrote:
>
On Tue, May 21, 2019 at 01:04:10AM +, Roman Gushchin wrote:
> On Mon, May 20, 2019 at 03:40:14PM +1000, Tobin C. Harding wrote:
> > We have just implemented Slab Movable Objects (SMO). On NUMA systems
> > slabs can become unbalanced i.e. many slabs on one node while other
>
On Tue, May 21, 2019 at 12:57:47AM +, Roman Gushchin wrote:
> On Mon, May 20, 2019 at 03:40:17PM +1000, Tobin C. Harding wrote:
> > In an attempt to make the SMO patchset as non-invasive as possible add a
> > config option CONFIG_DCACHE_SMO (under "Memory Management option
On Tue, May 21, 2019 at 12:51:57AM +, Roman Gushchin wrote:
> On Mon, May 20, 2019 at 03:40:05PM +1000, Tobin C. Harding wrote:
> > Internal fragmentation can occur within pages used by the slub
> > allocator. Under some workloads large numbers of pages can be used by
> &g
:
- Move all objects to specified node.
echo "N1" > move
- Move all objects from specified node to other specified
node (from N1 -> to N2):
echo "N1 N2" > move
This also enables shrinking slabs on a specific node:
echo "N1 N1"
.
Implement isolate and 'migrate' functions for the dentry slab cache.
Signed-off-by: Tobin C. Harding
---
fs/dcache.c | 76 +
1 file changed, 76 insertions(+)
diff --git a/fs/dcache.c b/fs/dcache.c
index b7318615979d..0dfe580c2d42 100644
--- a/fs
, no other value accepted.
This feature relies on SMO being enable for the cache, this is done with
a call to, after the isolate/migrate functions have been defined.
kmem_cache_setup_mobility(s, isolate, migrate)
Signed-off-by: Tobin C. Harding
---
mm/slub.c | 120
b
mobility is enabled and the isolate/migrate functions are built in.
Add CONFIG_DCACHE_SMO to guard the partial shrinking of the dcache via
Slab Movable Objects infrastructure.
Signed-off-by: Tobin C. Harding
---
fs/dcache.c | 4
mm/Kconfig | 7 +++
2 files changed, 11 insertions(+)
diff
partial slab.
Signed-off-by: Tobin C. Harding
---
tools/testing/slab/Makefile | 2 +-
tools/testing/slab/slub_defrag_xarray.c | 211
2 files changed, 212 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/slab/slub_defrag_xarray.c
diff --git
In order to support object migration on the dentry cache we need to have
a determined object state at all times. Without a constructor the object
would have a random state after allocation.
Provide a dentry constructor.
Signed-off-by: Tobin C. Harding
---
fs/dcache.c | 30
Add output line for NUMA remote node defrag ratio.
Signed-off-by: Tobin C. Harding
---
tools/vm/slabinfo.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index cbfc56c44c2f..d2c22f9ee2d8 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm
...
verified movable slabs are shrinkable
Removing module slub_defrag ...
Signed-off-by: Tobin C. Harding
---
tools/testing/slab/slub_defrag.c | 1 +
tools/testing/slab/slub_defrag.py | 451 ++
2 files changed, 452 insertions(+)
create mode 100755 tools/testing/slab
ber of objects):
# cd /sys/kernel/debug/smo
# echo 'test' > callfn
[3.576617] smo: test using nr_objs: 1000 keep: 10
[3.580169] smo: Module tests completed successfully
Signed-off-by: Tobin C. Harding
---
tools/testing/slab/Makefile | 10 +
tools/testing/slab/slub_defrag.
Add output for the newly added defrag_used_ratio sysfs knob.
Signed-off-by: Tobin C. Harding
---
tools/vm/slabinfo.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index d2c22f9ee2d8..ef4ff93df4cc 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm
Wilcox
Signed-off-by: Tobin C. Harding
---
include/linux/xarray.h | 3 +++
init/main.c| 2 ++
lib/radix-tree.c | 2 +-
lib/xarray.c | 48 ++
4 files changed, 45 insertions(+), 10 deletions(-)
diff --git a/include/linux/xarray.h
by Matthew Wilcox and was modified to work
with slab object migration.
Cc: Matthew Wilcox
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Harding
---
lib/xarray.c | 61
1 file changed, 61 insertions(+)
diff --git a/lib/xarray.c b/lib
It is advantageous to have all defragmentable slabs together at the
beginning of the list of slabs so that there is no need to scan the
complete list. Put defragmentable caches first when adding a slab cache
and others last.
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Harding
all to the
recently added function:
void kmem_cache_setup_mobility(struct kmem_cache *,
kmem_cache_isolate_func,
kmem_cache_migrate_func);
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Hard
-C lists caches that use a ctor.
-M lists caches that support object migration.
Add command line options to show caches with a constructor and caches
that are movable (i.e. have migrate function).
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Harding
---
tools/vm/slabinfo.c | 40
mercilessly correct me :)
Thanks for looking at this,
Tobin.
Tobin C. Harding (16):
slub: Add isolate() and migrate() methods
tools/vm/slabinfo: Add support for -C and -M options
slub: Sort slab cache list
slub: Slab defrag core
tools/vm/slabinfo: Add remote node defrag ratio output
'
callbacks.
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Harding
---
include/linux/slab.h | 70
include/linux/slub_def.h | 3 ++
mm/slub.c| 59 +
3 files changed, 126 insertions(+), 6
On Thu, May 16, 2019 at 08:40:29AM +0200, Greg Kroah-Hartman wrote:
> On Thu, May 16, 2019 at 10:07:16AM +1000, Tobin C. Harding wrote:
> > Currently kobject_add_varg() calls kobject_set_name_vargs() then returns
> > the return value of kobject_add_internal(). kobject
the principle of
least surprise.
Check return value of kobject_add_internal() and free previously
allocated memory on failure.
Signed-off-by: Tobin C. Harding
---
Hi Greg,
Pretty excited by this one, if this is correct it means that kobject
initialisation code, in the error path, can now use either
On Wed, May 15, 2019 at 12:55:55PM +0200, Greg Kroah-Hartman wrote:
> From: "Tobin C. Harding"
>
> [ Upstream commit bdfad5aec1392b93495b77b864d58d7f101dc1c1 ]
Greg you are not going to back port all of these kobject fixes are you?
There is going to be a _lot_ of t
kfree() after kobject_put(). Who ever wrote this was on crack.
Fixes: 7e8039795a80 ("powerpc/cacheinfo: Fix kobject memleak")
Signed-off-by: Tobin C. Harding
---
FTR
git log --pretty=format:"%h%x09%an%x09%ad%x09%s" | grep 7e8039795a80
7e8039795a80Tobin C. Harding
On Mon, May 13, 2019 at 09:14:05AM +0200, Greg Kroah-Hartman wrote:
> On Mon, May 13, 2019 at 01:32:13PM +1000, Tobin C. Harding wrote:
> > If a call to kobject_init_and_add() fails we must call kobject_put()
> > otherwise we leak memory.
> >
> > Function always calls k
-by: Tobin C. Harding
---
Is it ok to send patches during the merge window?
Applies on top of Linus' mainline tag: v5.1
Happy to rebase if there are conflicts.
thanks,
Tobin.
fs/ocfs2/filecheck.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
index
On Fri, May 10, 2019, at 19:40, Petr Mladek wrote:
> On Fri 2019-05-10 12:35:38, Tobin C. Harding wrote:
> > On Wed, May 01, 2019 at 09:54:16AM +0200, Rafael J. Wysocki wrote:
> > > On Wed, May 1, 2019 at 1:38 AM Tobin C. Harding wrote:
> > > > TODO
> >
On Wed, May 01, 2019 at 09:54:16AM +0200, Rafael J. Wysocki wrote:
> On Wed, May 1, 2019 at 1:38 AM Tobin C. Harding wrote:
> >
> > Hi,
> >
> > Looks like I've created a bit of confusion trying to fix memleaks in
> > calls to kobject_init_and_add().
On Fri, May 03, 2019 at 09:56:07AM +0200, Johan Hovold wrote:
> On Fri, May 03, 2019 at 11:40:15AM +1000, Tobin C. Harding wrote:
> > On Thu, May 02, 2019 at 10:39:22AM +0200, Johan Hovold wrote:
> > > On Thu, May 02, 2019 at 06:25:39PM +1000, Tobin C. Harding wrote: >
&
On Thu, May 02, 2019 at 10:39:22AM +0200, Johan Hovold wrote:
> On Thu, May 02, 2019 at 06:25:39PM +1000, Tobin C. Harding wrote: > Adding
> Jon to CC
> >
> > On Thu, May 02, 2019 at 09:38:23AM +0200, Johan Hovold wrote:
> > > On Thu, May 02, 2019 at 12:31:40PM
ly be more explicit
> as to exactly what needs to happen here once you register a kobject with the
> kobject core.
>
> Cc: Tobin C. Harding
> Fixes: 1fd7c3b438a2 ("kobject: Improve doc clarity kobject_init_and_add()")
> Signed-off-by: Greg Kroah-Hartman
>
&g
On Thu, May 02, 2019 at 10:34:12AM +0200, Petr Mladek wrote:
> On Wed 2019-05-01 09:38:03, Tobin C. Harding wrote:
> > Hi,
> >
> > Looks like I've created a bit of confusion trying to fix memleaks in
> > calls to kobject_init_and_add(). Its spread over various patch
On Thu, May 02, 2019 at 09:30:44AM +0200, Petr Mladek wrote:
> On Thu 2019-05-02 09:12:32, Greg Kroah-Hartman wrote:
> > On Thu, May 02, 2019 at 12:31:42PM +1000, Tobin C. Harding wrote:
> > > Currently we use custom logic to track kobject initialization. Recently
> >
Adding Jon to CC
On Thu, May 02, 2019 at 09:38:23AM +0200, Johan Hovold wrote:
> On Thu, May 02, 2019 at 12:31:40PM +1000, Tobin C. Harding wrote:
> > kernel-doc comments have a prescribed format. This includes parenthesis
> > on the function name. To be _particularly_ correct
On Thu, May 02, 2019 at 09:28:08AM +0200, Greg Kroah-Hartman wrote:
> On Thu, May 02, 2019 at 09:17:42AM +0200, Greg Kroah-Hartman wrote:
> > On Thu, May 02, 2019 at 07:56:16AM +1000, Tobin C. Harding wrote:
> > > On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wro
ash during this. Was hoping to run the livepatch tests but
not sure how to at this moment. Is dynamic Ftrace and livepatch testing
something that can even be done in a VM or do I need to do this or
baremetal?
Thanks for taking the time to look at this.
Tobin
Tobin C. Harding (5):
livepa
Currently error return from kobject_init_and_add() is not followed by a
call to kobject_put(). This means there is a memory leak.
Add call to kobject_put() in error path of kobject_init_and_add().
Signed-off-by: Tobin C. Harding
---
kernel/livepatch/core.c | 12 +---
1 file changed, 9
Currently we use custom logic to track kobject initialization. Recently
a predicate function was added to the kobject API so we now no longer
need to do this.
Use kobject API to check for initialized state of kobjects instead of
using custom logic to track state.
Signed-off-by: Tobin C. Harding
Currently the docstring for kobject_get_path() mentions 'kset'. The
kset is not used in the function callchain starting from this function.
Remove docstring reference to kset from the function kobject_get_path().
Signed-off-by: Tobin C. Harding
---
lib/kobject.c | 5 ++---
1 file changed, 2
->state_initialized.
Signed-off-by: Tobin C. Harding
---
include/linux/kobject.h | 2 ++
lib/kobject.c | 12
2 files changed, 14 insertions(+)
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 1ab0d624fb36..65a317b65d9c 100644
--- a/include/linux/kobject.h
++
present.
Signed-off-by: Tobin C. Harding
---
lib/kobject.c | 43 ++-
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/lib/kobject.c b/lib/kobject.c
index 3eacd5b4643f..0181f102cd1c 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -18,7 +18,7
On Wed, May 01, 2019 at 01:10:22PM +0200, Greg Kroah-Hartman wrote:
> On Wed, May 01, 2019 at 09:38:03AM +1000, Tobin C. Harding wrote:
> > Hi,
> >
> > Looks like I've created a bit of confusion trying to fix memleaks in
> > calls to kobject_init_and_add(). Its
On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote:
> On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote:
> > (Note at bottom on reasons for 'To' list 'Cc' list)
> >
> > Hi,
> >
> > kobject_init_and_add() seems to be
On Wed, May 01, 2019 at 09:54:16AM +0200, Rafael J. Wysocki wrote:
> On Wed, May 1, 2019 at 1:38 AM Tobin C. Harding wrote:
> >
> > Hi,
> >
> > Looks like I've created a bit of confusion trying to fix memleaks in
> > calls to kobject_init_and_add().
Hi,
Looks like I've created a bit of confusion trying to fix memleaks in
calls to kobject_init_and_add(). Its spread over various patches and
mailing lists so I'm starting a new thread and CC'ing anyone that
commented on one of those patches.
If there is a better way to go about this discussion
On Sun, Apr 28, 2019 at 09:40:00AM +1000, Tobin C. Harding wrote:
> Currently error return from kobject_init_and_add() is not followed by a
> call to kobject_put(). This means there is a memory leak.
>
> Add call to kobject_put() in error path of kobject_init_and_add().
>
> Si
On Tue, Apr 30, 2019 at 12:44:55PM +0200, Miroslav Benes wrote:
> On Tue, 30 Apr 2019, Greg Kroah-Hartman wrote:
>
> > On Tue, Apr 30, 2019 at 10:15:33AM +1000, Tobin C. Harding wrote:
> > > Currently error return from kobject_init_and_add() is not followed by a
>
On Tue, Apr 30, 2019 at 10:28:15AM +1000, Tobin C. Harding wrote:
[snip]
Please do not consider this series for merge. There is a bit of
confusion here.
There are a few of theses patches live on various LKML lists. Have to
consolidate all the knowledge. When I _actually_ know how to use
On Tue, Apr 30, 2019 at 01:00:05PM +0200, Miroslav Benes wrote:
> On Tue, 30 Apr 2019, Tobin C. Harding wrote:
>
> > The correct cleanup function after a call to kobject_init_and_add() has
> > succeeded is kobject_del() _not_ kobject_put(). kobject_del() calls
> > kob
On Tue, Apr 30, 2019 at 05:08:11PM +0200, Petr Mladek wrote:
> On Tue 2019-04-30 10:15:34, Tobin C. Harding wrote:
> > The correct cleanup function after a call to kobject_init_and_add() has
> > succeeded is kobject_del() _not_ kobject_put(). kobject_del() calls
> > kobject_
the error path of
> kobject_init_and_add().
>
> Signed-off-by: Viresh Kumar
> ---
> Tobin fixed this for schedutil already.
For what its worth:
Reviewed-by: Tobin C. Harding
Thanks Viresh, one less for me to do!
Tobin
On Tue, Apr 30, 2019 at 11:26:27AM +0530, Viresh Kumar wrote:
> On 29-04-19, 22:52, tip-bot for Tobin C. Harding wrote:
> > Commit-ID: 8bf7ab9c79f3d1a5f02ebac369f656de9ec0aca8
> > Gitweb:
> > https://git.kernel.org/tip/8bf7ab9c79f3d1a5f02ebac369f656de9ec0aca8
> > A
Commit-ID: 9a4f26cc98d81b67ecc23b890c28e2df324e29f3
Gitweb: https://git.kernel.org/tip/9a4f26cc98d81b67ecc23b890c28e2df324e29f3
Author: Tobin C. Harding
AuthorDate: Tue, 30 Apr 2019 10:11:44 +1000
Committer: Ingo Molnar
CommitDate: Tue, 30 Apr 2019 07:57:23 +0200
sched/cpufreq: Fix
Commit-ID: 8bf7ab9c79f3d1a5f02ebac369f656de9ec0aca8
Gitweb: https://git.kernel.org/tip/8bf7ab9c79f3d1a5f02ebac369f656de9ec0aca8
Author: Tobin C. Harding
AuthorDate: Tue, 30 Apr 2019 10:11:44 +1000
Committer: Ingo Molnar
CommitDate: Tue, 30 Apr 2019 06:24:09 +0200
sched/cpufreq: Fix
On Tue, Apr 30, 2019 at 06:24:43AM +0200, Ingo Molnar wrote:
>
> * Tobin C. Harding wrote:
>
> > Currently error return from kobject_init_and_add() is not followed by a
> > call to kobject_put(). This means there is a memory leak.
> >
> > Add ca
b
mobility is enabled and the isolate/migrate functions are built in.
Add CONFIG_DCACHE_SMO to guard the partial shrinking of the dcache via
Slab Movable Objects infrastructure.
Signed-off-by: Tobin C. Harding
---
fs/dcache.c | 4
mm/Kconfig | 7 +++
2 files changed, 11 insertions(+)
diff
In order to support object migration on the dentry cache we need to have
a determined object state at all times. Without a constructor the object
would have a random state after allocation.
Provide a dentry constructor.
Signed-off-by: Tobin C. Harding
---
fs/dcache.c | 30
node (from N1 -> to N2):
echo "N1 N2" > move
This also enables shrinking slabs on a specific node:
echo "N1 N1" > move
Signed-off-by: Tobin C. Harding
---
mm/Kconfig | 7 ++
mm/slub.c | 249 +
2 fi
, no other value accepted.
This feature relies on SMO being enable for the cache, this is done with
a call to, after the isolate/migrate functions have been defined.
kmem_cache_setup_mobility(s, isolate, migrate)
Signed-off-by: Tobin C. Harding
---
mm/slub.c | 120
.
Implement isolate and 'migrate' functions for the dentry slab cache.
Signed-off-by: Tobin C. Harding
---
fs/dcache.c | 76 +
1 file changed, 76 insertions(+)
diff --git a/fs/dcache.c b/fs/dcache.c
index 3d6cc06eca56..3f9daba1cc78 100644
--- a/fs
partial slab.
Signed-off-by: Tobin C. Harding
---
tools/testing/slab/Makefile | 2 +-
tools/testing/slab/slub_defrag_xarray.c | 211
2 files changed, 212 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/slab/slub_defrag_xarray.c
diff --git
ache (thanks Matthew).
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Harding
---
lib/radix-tree.c | 13 +
lib/xarray.c | 49
2 files changed, 62 insertions(+)
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
i
...
verified movable slabs are shrinkable
Removing module slub_defrag ...
Signed-off-by: Tobin C. Harding
---
tools/testing/slab/slub_defrag.c | 1 +
tools/testing/slab/slub_defrag.py | 451 ++
2 files changed, 452 insertions(+)
create mode 100755 tools/testing/slab
ber of objects):
# cd /sys/kernel/debug/smo
# echo 'test' > callfn
[3.576617] smo: test using nr_objs: 1000 keep: 10
[3.580169] smo: Module tests completed successfully
Signed-off-by: Tobin C. Harding
---
tools/testing/slab/Makefile | 10 +
tools/testing/slab/slub_defrag.
Add output for the newly added defrag_used_ratio sysfs knob.
Signed-off-by: Tobin C. Harding
---
tools/vm/slabinfo.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index d2c22f9ee2d8..ef4ff93df4cc 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm
Add output line for NUMA remote node defrag ratio.
Signed-off-by: Tobin C. Harding
---
tools/vm/slabinfo.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index cbfc56c44c2f..d2c22f9ee2d8 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm
all to the
recently added function:
void kmem_cache_setup_mobility(struct kmem_cache *,
kmem_cache_isolate_func,
kmem_cache_migrate_func);
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Hard
-C lists caches that use a ctor.
-M lists caches that support object migration.
Add command line options to show caches with a constructor and caches
that are movable (i.e. have migrate function).
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Harding
---
tools/vm/slabinfo.c | 40
It is advantageous to have all defragmentable slabs together at the
beginning of the list of slabs so that there is no need to scan the
complete list. Put defragmentable caches first when adding a slab cache
and others last.
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Harding
'
callbacks.
Co-developed-by: Christoph Lameter
Signed-off-by: Tobin C. Harding
---
include/linux/slab.h | 70
include/linux/slub_def.h | 3 ++
mm/slub.c| 59 +
3 files changed, 126 insertions(+), 6
vary. This is as is expected. We are trying to unobtrusively shrink
the dentry cache.
thanks,
Tobin.
Tobin C. Harding (15):
slub: Add isolate() and migrate() methods
tools/vm/slabinfo: Add support for -C and -M options
slub: Sort slab cache list
slub: Slab defrag core
tools/vm/slabinfo
Currently error return from kobject_init_and_add() is not followed by a
call to kobject_put(). This means there is a memory leak.
Add call to kobject_put() in error path of kobject_init_and_add().
Signed-off-by: Tobin C. Harding
---
Resend with SOB tag.
kernel/sched/cpufreq_schedutil.c | 1
The correct cleanup function after a call to kobject_init_and_add() has
succeeded is kobject_del() _not_ kobject_put(). kobject_del() calls
kobject_put().
Use correct cleanup function when removing a kobject.
Signed-off-by: Tobin C. Harding
---
kernel/livepatch/core.c | 8 +++-
1 file
of an effort to check/fix all callsites of
kobject_init_and_add().
This set fixes all callsites under kernel/livepatch/
thanks,
Tobin.
Tobin C. Harding (2):
livepatch: Fix kobject memleak
livepatch: Use correct kobject cleanup function
kernel/livepatch/core.c | 20
1
Currently error return from kobject_init_and_add() is not followed by a
call to kobject_put(). This means there is a memory leak.
Add call to kobject_put() in error path of kobject_init_and_add().
Signed-off-by: Tobin C. Harding
---
kernel/livepatch/core.c | 12 +---
1 file changed, 9
Currently error return from kobject_init_and_add() is not followed by a
call to kobject_put(). This means there is a memory leak.
Add call to kobject_put() in error path of kobject_init_and_add().
---
kernel/sched/cpufreq_schedutil.c | 1 +
1 file changed, 1 insertion(+)
diff --git
On Mon, Apr 29, 2019, at 02:15, Greg Kroah-Hartman wrote:
> On Sun, Apr 28, 2019 at 11:19:57AM +1000, Tobin C. Harding wrote:
> > On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote:
> > > On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote:
>
On Sat, Apr 27, 2019 at 09:28:09PM +0200, Greg Kroah-Hartman wrote:
> On Sat, Apr 27, 2019 at 06:13:30PM +1000, Tobin C. Harding wrote:
> > (Note at bottom on reasons for 'To' list 'Cc' list)
> >
> > Hi,
> >
> > kobject_init_and_add() seems to be
There is currently some confusion on how to wind back
kobject_init_and_add() during the error paths in code that uses this
function.
Add documentation to kobject_add() and kobject_del() to help clarify the
usage.
Signed-off-by: Tobin C. Harding
---
The assumption is that this is the correct
1 - 100 of 1619 matches
Mail list logo