Re: memleak around kobject_init_and_add()

2019-04-28 Thread Tobin C. Harding
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: > >

[PATCH] sched/cpufreq: Fix kobject memleak

2019-04-29 Thread Tobin C. Harding
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 a/kernel/sch

[PATCH 1/2] livepatch: Fix kobject memleak

2019-04-29 Thread Tobin C. Harding
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

[PATCH 0/2] livepatch: Fix usage of kobject_init_and_add()

2019-04-29 Thread Tobin C. Harding
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

[PATCH 2/2] livepatch: Use correct kobject cleanup function

2019-04-29 Thread Tobin C. Harding
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

[PATCH RESEND] sched/cpufreq: Fix kobject memleak

2019-04-29 Thread Tobin C. Harding
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

[RFC PATCH v4 01/15] slub: Add isolate() and migrate() methods

2019-04-29 Thread Tobin C. Harding
ng with 'isolate' and 'migrate' 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 ++

[RFC PATCH v4 00/15] Slab Movable Objects (SMO)

2019-04-29 Thread Tobin C. Harding
est effort', results 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

[RFC PATCH v4 03/15] slub: Sort slab cache list

2019-04-29 Thread Tobin C. Harding
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

[RFC PATCH v4 02/15] tools/vm/slabinfo: Add support for -C and -M options

2019-04-29 Thread Tobin C. Harding
-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

[RFC PATCH v4 04/15] slub: Slab defrag core

2019-04-29 Thread Tobin C. Harding
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

[RFC PATCH v4 05/15] tools/vm/slabinfo: Add remote node defrag ratio output

2019-04-29 Thread Tobin C. Harding
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

[RFC PATCH v4 07/15] tools/testing/slab: Add object migration test module

2019-04-29 Thread Tobin C. Harding
g : Off Lpadd: 352 We can run the stress tests (with the default number 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

[RFC PATCH v4 06/15] tools/vm/slabinfo: Add defrag_used_ratio output

2019-04-29 Thread Tobin C. Harding
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

[RFC PATCH v4 10/15] tools/testing/slab: Add XArray movable objects tests

2019-04-29 Thread Tobin C. Harding
remaining 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 di

[RFC PATCH v4 09/15] xarray: Implement migration function for objects

2019-04-29 Thread Tobin C. Harding
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

[RFC PATCH v4 08/15] tools/testing/slab: Add object migration test suite

2019-04-29 Thread Tobin C. Harding
ling movable objects ... 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 10075

[RFC PATCH v4 11/15] slub: Enable moving objects to/from specific nodes

2019-04-29 Thread Tobin C. Harding
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 file

[RFC PATCH v4 12/15] slub: Enable balancing slabs across nodes

2019-04-29 Thread Tobin C. Harding
rs balance, 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/sl

[RFC PATCH v4 14/15] dcache: Implement partial shrink via Slab Movable Objects

2019-04-29 Thread Tobin C. Harding
plicit that no reallocation is done. 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 ind

[RFC PATCH v4 15/15] dcache: Add CONFIG_DCACHE_SMO

2019-04-29 Thread Tobin C. Harding
obility 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

[RFC PATCH v4 13/15] dcache: Provide a dentry constructor

2019-04-29 Thread Tobin C. Harding
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

Re: [PATCH RESEND] sched/cpufreq: Fix kobject memleak

2019-04-29 Thread Tobin C. Harding
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 call

Re: [tip:sched/urgent] sched/cpufreq: Fix kobject memleak

2019-04-29 Thread Tobin C. Harding
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

Re: [PATCH] cpufreq: Fix kobject memleak

2019-04-29 Thread Tobin C. Harding
e 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

Re: [PATCH 2/2] livepatch: Use correct kobject cleanup function

2019-04-30 Thread Tobin C. Harding
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_

Re: [PATCH 2/2] livepatch: Use correct kobject cleanup function

2019-04-30 Thread Tobin C. Harding
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

Re: [PATCH 1/3] bridge: Fix error path for kobject_init_and_add()

2019-04-30 Thread Tobin C. Harding
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

Re: [PATCH 1/2] livepatch: Fix kobject memleak

2019-04-30 Thread Tobin C. Harding
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 > > >

Re: [PATCH] mm: Fix kobject memleak in SLUB

2019-04-30 Thread Tobin C. Harding
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

kobject_init_and_add() confusion

2019-04-30 Thread Tobin C. Harding
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

Re: kobject_init_and_add() confusion

2019-05-01 Thread Tobin C. Harding
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()

Re: memleak around kobject_init_and_add()

2019-05-01 Thread Tobin C. Harding
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()

Re: kobject_init_and_add() confusion

2019-05-01 Thread Tobin C. Harding
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

[RFC PATCH 2/5] kobject: Remove docstring reference to kset

2019-05-01 Thread 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

[RFC PATCH 4/5] kobject: Add kobject initialized predicate

2019-05-01 Thread Tobin C. Harding
->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 ++

[RFC PATCH 3/5] kobject: Fix kernel-doc comment first line

2019-05-01 Thread Tobin C. Harding
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

[RFC PATCH 1/5] livepatch: Fix kobject memleak

2019-05-01 Thread Tobin C. Harding
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

[RFC PATCH 5/5] livepatch: Do not manually track kobject initialization

2019-05-01 Thread Tobin C. Harding
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

[RFC PATCH 0/5] kobject: Add and use init predicate

2019-05-01 Thread Tobin C. Harding
Ftrace, it appears to crash 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

Re: memleak around kobject_init_and_add()

2019-05-02 Thread Tobin C. Harding
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

Re: [RFC PATCH 3/5] kobject: Fix kernel-doc comment first line

2019-05-02 Thread Tobin C. Harding
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

Re: [RFC PATCH 5/5] livepatch: Do not manually track kobject initialization

2019-05-02 Thread Tobin C. Harding
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 > > &g

Re: kobject_init_and_add() confusion

2019-05-02 Thread Tobin C. Harding
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

Re: [PATCH] kobject: clean up the kobject add documentation a bit more

2019-05-02 Thread Tobin C. Harding
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

Re: [RFC PATCH 3/5] kobject: Fix kernel-doc comment first line

2019-05-02 Thread Tobin C. Harding
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

Re: shrink_dentry_list() logics change (was Re: [RFC PATCH v3 14/15] dcache: Implement partial shrink via Slab Movable Objects)

2019-07-01 Thread Tobin C. Harding
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. C

Re: [RFC 02/15] slub: Add isolate() and migrate() methods

2019-03-08 Thread Tobin C. Harding
On Fri, Mar 08, 2019 at 09:22:37AM -0700, Tycho Andersen wrote: > On Fri, Mar 08, 2019 at 04:15:46PM +, Christopher Lameter wrote: > > On Fri, 8 Mar 2019, Tycho Andersen wrote: > > > > > On Fri, Mar 08, 2019 at 03:14:13PM +1100, Tobin C. Harding wrote: > > >

Re: [PATCH 0/9] docs: Fix various build warnings/errors

2019-03-08 Thread Tobin C. Harding
On Fri, Mar 08, 2019 at 09:40:03AM +0100, Markus Heiser wrote: > > Am 07.03.19 um 22:11 schrieb Tobin C. Harding: > > Hi, > > > > I had a few hours to spare so I thought I'd clear some Sphinx build > > warnings/errors. There isn't anything too controversi

[PATCH 4/4] slob: Use slab_list instead of lru

2019-03-10 Thread Tobin C. Harding
of slabs. Signed-off-by: Tobin C. Harding --- mm/slob.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/slob.c b/mm/slob.c index 307c2c9feb44..ee68ff2a2833 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -112,13 +112,13 @@ static inline int slob_page_free(struct page

[PATCH 3/4] slab: Use slab_list instead of lru

2019-03-10 Thread Tobin C. Harding
of slabs. Signed-off-by: Tobin C. Harding --- mm/slab.c | 49 + 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 28652e4218e0..09cc64ef9613 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1710,8 +1710,8 @@ sta

[PATCH 2/4] slub: Use slab_list instead of lru

2019-03-10 Thread Tobin C. Harding
of slabs. Signed-off-by: Tobin C. Harding --- mm/slub.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index b282e22885cd..d692b5e0163d 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1023,7 +1023,7 @@ static v

[PATCH 1/4] slub: Add comments to endif pre-processor macros

2019-03-10 Thread Tobin C. Harding
#ifdef CONFIG_FOO ... #endif /* CONFIG_FOO */ Add comments to endif pre-processor macros if ifdef/endif pair is not immediately apparent. Signed-off-by: Tobin C. Harding --- mm/slub.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mm/slub.c

[PATCH 0/4] mm: Use slab_list list_head instead of lru

2019-03-10 Thread Tobin C. Harding
makes no code changes, adds comments to #endif statements. Final 3 patches do changes as a patch per allocator, tested by building and booting (in Qemu) after configuring kernel to use appropriate allocator. Also build and boot with debug options enabled (for slab and slub). thanks, Tobin. Tobin

Re: [RFC 07/15] slub: Add defrag_used_ratio field and sysfs support

2019-03-10 Thread Tobin C. Harding
On Fri, Mar 08, 2019 at 09:01:51AM -0700, Tycho Andersen wrote: > On Fri, Mar 08, 2019 at 03:14:18PM +1100, Tobin C. Harding wrote: > > --- a/mm/slub.c > > +++ b/mm/slub.c > > @@ -3642,6 +3642,7 @@ static int kmem_cache_open(struct kmem_cache *s, &

Re: [PATCH 0/4] mm: Use slab_list list_head instead of lru

2019-03-11 Thread Tobin C. Harding
On Mon, Mar 11, 2019 at 04:16:33PM -0700, Matthew Wilcox wrote: > On Mon, Mar 11, 2019 at 08:49:23PM +, Roman Gushchin wrote: > > The patchset looks good to me, however I'd add some clarifications > > why switching from lru to slab_list is safe. > > > > My understanding is that the slab_list f

Re: [PATCH 0/4] mm: Use slab_list list_head instead of lru

2019-03-11 Thread Tobin C. Harding
On Tue, Mar 12, 2019 at 12:22:23AM +, Roman Gushchin wrote: > On Mon, Mar 11, 2019 at 04:16:33PM -0700, Matthew Wilcox wrote: > > On Mon, Mar 11, 2019 at 08:49:23PM +, Roman Gushchin wrote: > > > The patchset looks good to me, however I'd add some clarifications > > > why switching from lru

Re: [RFC 02/15] slub: Add isolate() and migrate() methods

2019-03-11 Thread Tobin C. Harding
On Mon, Mar 11, 2019 at 09:51:09PM +, Roman Gushchin wrote: > On Fri, Mar 08, 2019 at 03:14:13PM +1100, Tobin C. Harding wrote: > > Add the two methods needed for moving objects and enable the display of > > the callbacks via the /sys/kernel/slab interface. > >

Re: [RFC 01/15] slub: Create sysfs field /sys/slab//ops

2019-03-11 Thread Tobin C. Harding
On Mon, Mar 11, 2019 at 09:23:27PM +, Roman Gushchin wrote: > On Fri, Mar 08, 2019 at 03:14:12PM +1100, Tobin C. Harding wrote: > > Create an ops field in /sys/slab/*/ops to contain all the callback > > operations defined for a slab cache. This will be used to display >

Re: [RFC 03/15] tools/vm/slabinfo: Add support for -C and -F options

2019-03-11 Thread Tobin C. Harding
On Mon, Mar 11, 2019 at 09:54:17PM +, Roman Gushchin wrote: > On Fri, Mar 08, 2019 at 03:14:14PM +1100, Tobin C. Harding wrote: > > -F lists caches that support object migration. > > Maybe -M? Seems reasonable, will use in v2, thanks. Tobin.

Re: [RFC 04/15] slub: Enable Slab Movable Objects (SMO)

2019-03-11 Thread Tobin C. Harding
On Mon, Mar 11, 2019 at 10:48:45PM +, Roman Gushchin wrote: > On Fri, Mar 08, 2019 at 03:14:15PM +1100, Tobin C. Harding wrote: > > We have now in place a mechanism for adding callbacks to a cache in > > order to be able to implement object migration. > > > > A

Re: [RFC 00/15] mm: Implement Slab Movable Objects (SMO)

2019-03-11 Thread Tobin C. Harding
On Tue, Mar 12, 2019 at 12:09:31AM +, Roman Gushchin wrote: > On Fri, Mar 08, 2019 at 03:14:11PM +1100, Tobin C. Harding wrote: > > Hi, > > > > Here is a patch set implementing movable objects within the SLUB > > allocator. This is work based on Christopher&#

Re: [RFC 09/15] slub: Enable slab defragmentation using SMO

2019-03-11 Thread Tobin C. Harding
On Mon, Mar 11, 2019 at 11:35:29PM +, Roman Gushchin wrote: > On Fri, Mar 08, 2019 at 03:14:20PM +1100, Tobin C. Harding wrote: > > If many objects are allocated with the slab allocator and freed in an > > arbitrary order then the slab caches can become internally fragmented. &

Re: [RFC 12/15] xarray: Implement migration function for objects

2019-03-11 Thread Tobin C. Harding
On Tue, Mar 12, 2019 at 12:16:07AM +, Roman Gushchin wrote: > On Fri, Mar 08, 2019 at 03:14:23PM +1100, Tobin C. Harding wrote: > > Implement functions to migrate objects. This is based on > > initial code by Matthew Wilcox and was modified to work with > > slab object m

Re: [PATCH 0/4] mm: Use slab_list list_head instead of lru

2019-03-11 Thread Tobin C. Harding
On Tue, Mar 12, 2019 at 12:22:23AM +, Roman Gushchin wrote: > On Mon, Mar 11, 2019 at 04:16:33PM -0700, Matthew Wilcox wrote: > > On Mon, Mar 11, 2019 at 08:49:23PM +, Roman Gushchin wrote: > > > The patchset looks good to me, however I'd add some clarifications > > > why switching from lru

Re: [PATCH 0/4] mm: Use slab_list list_head instead of lru

2019-03-11 Thread Tobin C. Harding
On Mon, Mar 11, 2019 at 07:38:28PM -0700, Matthew Wilcox wrote: > On Tue, Mar 12, 2019 at 12:05:54PM +1100, Tobin C. Harding wrote: > > > slab_list and lru are in the same bits. Once this patch set is in, > > > we can remove the enigmatic 'uses lru' comment that I a

[PATCH v2] xarray: Document erasing entries during iteration

2019-02-12 Thread Tobin C. Harding
thing *thing; unsigned long index; xa_for_each(&things, index, thing) xa_erase(&things, index); } Document this feature explicitly in the docs and also for the macro definition. Signed-off-by: Tobin C. Harding --- Changes

Re: [PATCH] xarray: Document erasing entries during iteration

2019-02-12 Thread Tobin C. Harding
On Tue, Feb 12, 2019 at 06:29:58PM +1100, Tobin C. Harding wrote: > The XArray is, in a way, a replacement data structure for linked lists, > as such, on first use developers may wonder if it is safe to remove > items while iterating over the array. > > For exampl

Re: [PATCH 3/3] leaking_addresses: Expand tilde in output file name

2019-02-13 Thread Tobin C. Harding
On Wed, Feb 13, 2019 at 03:56:47PM +, David Laight wrote: > From: Tobin C. Harding > > Sent: 07 February 2019 22:50 > > > > Currently if user passes an output file to the script via > > --output-raw we do not handle expansion of tilde. > > > > Use

[PATCH v2 0/1] lib/string: Add strscpy_pad() function

2019-02-24 Thread Tobin C. Harding
slowing this one down with my poor knowledge of how kselftest works it seems better to do this separately. thanks for looking at this, Tobin. Tobin C. Harding (1): lib/string: Add strscpy_pad() function include/linux/string.h | 4 + lib/Kconfig.debug | 3 + lib/Makefile

[PATCH v2 1/1] lib/string: Add strscpy_pad() function

2019-02-24 Thread Tobin C. Harding
functionality. This is a chore, and also leaves us open to off by one errors unnecessarily. Add a function that calls strscpy() then memset()s the tail to zero if the source string is shorter than the destination buffer. Add test module for the new code. Signed-off-by: Tobin C. Harding --- include

Re: [PATCH v2] docs: Clarify the usage and sign-off requirements for Co-developed-by

2019-03-21 Thread Tobin C. Harding
gt; > While I still think co-developed-by: is unnecessary and > almost none of the existing uses of this have this > sequence of "Co-developed-by: " followed directly > by "Signed-off-by: ", here's a possible > checkpatch addition for it. Tested-by: Tobin C. Harding Catches missing SOB of co-developer. Hope this helps, Tobin.

[PATCH 4/6] lib/string: Add string copy/zero function

2019-02-18 Thread Tobin C. Harding
functionality. This is a chore, and also leaves us open to off by one errors unnecessarily. Add a function that calls strscpy() then memset()s the tail to zero if the source string is shorter than the destination buffer. Add testing via kselftest. Signed-off-by: Tobin C. Harding --- include/linux

[PATCH 5/6] lib: Fix function documentation for strncpy_from_user

2019-02-18 Thread Tobin C. Harding
left non-null terminated. Signed-off-by: Tobin C. Harding --- lib/strncpy_from_user.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c index 58eacd41526c..11fe9a4a00fd 100644 --- a/lib/strncpy_from_user.c

[PATCH 3/6] lib/string: Use correct docstring format

2019-02-18 Thread Tobin C. Harding
Currently the docstring comments for strscpy() are not in the correct format. Prior to working on this file fix up the docstring. Use correct docstring format for strscpy(). Signed-off-by: Tobin C. Harding --- lib/string.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions

[PATCH 0/6] lib: Add safe string funtions

2019-02-18 Thread Tobin C. Harding
graph that describes the config symbol fully I couldn't work out if this is a false positive or not? Does the new config option CONFIG_TEST_STRING need more documentation? I don't see where extra docs should be added and it seems self explanatory as is. thanks, Tobin. Tobin C. Hardi

[PATCH 6/6] lib: Add function strscpy_from_user()

2019-02-18 Thread Tobin C. Harding
execution with the user string truncated. Add a function strscpy_from_user() that guarantees the string written is null-terminated. If user string is longer than destination buffer truncates the string. Returns the number of characters written excluding the null-terminator. Signed-off-by: Tobin C

[PATCH 2/6] lib/string: Fix erroneous 'overflow' documentation

2019-02-18 Thread Tobin C. Harding
w' documentation for under filled buffer. Signed-off-by: Tobin C. Harding --- lib/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/string.c b/lib/string.c index 38e4ca08e757..7f1d72db53c5 100644 --- a/lib/string.c +++ b/lib/string.c @@ -173,8 +173,8 @@

[PATCH 1/6] lib/string: Enable string selftesting

2019-02-18 Thread Tobin C. Harding
Currently we have a test module but it is not tied into the kselftest infrastructure. In preparation for adding string manipulation functions and testing we should enable kselftest to utilize the test module. Enable string testing via kselftest infrastructure. Signed-off-by: Tobin C. Harding

Re: [PATCH 0/9] docs: Fix various build warnings/errors

2019-03-25 Thread Tobin C. Harding
On Mon, Mar 25, 2019 at 10:33:33AM -0600, Jonathan Corbet wrote: > On Fri, 8 Mar 2019 08:11:44 +1100 > "Tobin C. Harding" wrote: > > > I had a few hours to spare so I thought I'd clear some Sphinx build > > warnings/errors. > > So there were comments

Re: make modules_install install is failing

2019-03-04 Thread Tobin C. Harding
On Tue, Feb 05, 2019 at 11:30:53AM +0530, Bharath Vedartham wrote: > Hi all, > > I am unable to execute make modules_install install. > I get the following error: Could you show the complete commands you are trying please thanks, Tobin.

[PATCH v3 1/7] lib/test_printf: Add empty module_exit function

2019-03-06 Thread Tobin C. Harding
Currently the test_printf module does not have an exit function, this prevents the module from being unloaded. If we cannot unload the module we cannot run the tests a second time. Add an empty exit function. Signed-off-by: Tobin C. Harding --- lib/test_printf.c | 6 ++ 1 file changed, 6

[PATCH v3 0/7] lib/string: Add strscpy_pad() function

2019-03-06 Thread Tobin C. Harding
testing/selfests/lib? Thanks for looking at this, Tobin. Tobin C. Harding (7): lib/test_printf: Add empty module_exit function kselftest: Add test runner creation script kselftest/lib: Use new shell runner to define tests kselftest: Add test module framework header lib: Use new kselftest head

[PATCH v3 4/7] kselftest: Add test module framework header

2019-03-06 Thread Tobin C. Harding
. Signed-off-by: Tobin C. Harding --- Documentation/dev-tools/kselftest.rst | 108 - tools/testing/selftests/kselftest_module.h | 48 + 2 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 tools/testing/selftests/kselftest_module.h diff --git a

[PATCH v3 6/7] lib/string: Add strscpy_pad() function

2019-03-06 Thread Tobin C. Harding
functionality. This is a chore, and also leaves us open to off by one errors unnecessarily. Add a function that calls strscpy() then memset()s the tail to zero if the source string is shorter than the destination buffer. Signed-off-by: Tobin C. Harding --- include/linux/string.h | 4 lib

[PATCH v3 2/7] kselftest: Add test runner creation script

2019-03-06 Thread Tobin C. Harding
handle building/running tests with the O=/path/to/out make option. Add test runner creation script. Signed-off-by: Tobin C. Harding --- tools/testing/selftests/kselftest_module.sh | 75 + 1 file changed, 75 insertions(+) create mode 100755 tools/testing/selftests

[PATCH v3 5/7] lib: Use new kselftest header

2019-03-06 Thread Tobin C. Harding
We just added a new C header file for use with test modules that are intended to be run with kselftest. We can reduce code duplication by using this header. Use new kselftest header to reduce code duplication in test_printf and test_bitmap test modules. Signed-off-by: Tobin C. Harding --- lib

[PATCH v3 3/7] kselftest/lib: Use new shell runner to define tests

2019-03-06 Thread Tobin C. Harding
/kselftest_module.sh to define test runner scripts. Signed-off-by: Tobin C. Harding --- tools/testing/selftests/lib/bitmap.sh| 25 ++-- tools/testing/selftests/lib/prime_numbers.sh | 23 +- tools/testing/selftests/lib/printf.sh| 25 ++-- 3 files

[PATCH v3 7/7] lib: Add test module for strscpy_pad

2019-03-06 Thread Tobin C. Harding
Add a test module for the new strscpy_pad() function. Tie it into the kselftest infrastructure for lib/ tests. Signed-off-by: Tobin C. Harding --- lib/Kconfig.debug | 3 + lib/Makefile | 1 + lib/test_strscpy.c | 150

Re: [PATCH v3 0/7] lib/string: Add strscpy_pad() function

2019-03-06 Thread Tobin C. Harding
On Thu, Mar 07, 2019 at 08:42:19AM +1100, Tobin C. Harding wrote: > Hi, Man, I didn't see the merge window was open, I thought rc8 only came out on Sunday. Sorry, please ignore this. Will re-send again later in the cycle. thanks, Tobin.

[GIT PULL] leaking_addresses: changes for v5.1-rc1

2019-03-06 Thread Tobin C. Harding
gging output which is currently broken in a bunch of places, the other removes the --version command line option. Both patches have been tested and sitting in linux-next tree for a month or so. Signed-off-by: Tobin C. Harding To

[PATCH 0/9] docs: Fix various build warnings/errors

2019-03-07 Thread Tobin C. Harding
do you have a script by any chance that does a clean build of the docs, saves stderr output, applies a patch, cleanly re-builds the docs and then diffs the two outputs? Then rinse-and-repeat for a whole patch series. Thought I'd ask before I write one. thanks, Tobin. Tobin C. Harding (9):

[PATCH 1/9] docs: Fix spelling mistake

2019-03-07 Thread Tobin C. Harding
Documentation contains a spelling mistake / typo. s/descibed/described/ Fix spelling mistake. Signed-off-by: Tobin C. Harding --- Documentation/process/howto.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/process/howto.rst b/Documentation/process

[PATCH 6/9] docs: Use correct list markup character

2019-03-07 Thread Tobin C. Harding
Sphinx uses a star not a hyphen for lists. Use correct list markup character. Signed-off-by: Tobin C. Harding --- Documentation/driver-api/gpio/board.rst | 5 +++-- Documentation/laptops/lg-laptop.rst | 12 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a

[PATCH 3/9] docs: Remove unnecessary reference link title

2019-03-07 Thread Tobin C. Harding
Labels that precede a heading use the heading as the link title. Explicitly adding the link title defeats the purpose of this feature i.e. makes the reference less maintainable. Remove unnecessary reference link title. Signed-off-by: Tobin C. Harding --- Documentation/admin-guide/mm

[PATCH 7/9] docs: Remove unknown 'hint' directive

2019-03-07 Thread Tobin C. Harding
Current RST file contains an unknown directive causing Sphinx to emit ERROR: Unexpected indentation. Use normal language construct instead. Signed-off-by: Tobin C. Harding --- Documentation/driver-api/dmaengine/dmatest.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 8/9] docs: Fix Title underline too short warning

2019-03-07 Thread Tobin C. Harding
Sphinx emits a bunch of 'Title underline too short' warnings. We can fix these by using the correct length underlines. Fix Title underline too short warning by amending heading underline. Signed-off-by: Tobin C. Harding --- Documentation/filesystems/path-looku

[PATCH 9/9] docs: Add blank line after SPDX licence identifier

2019-03-07 Thread Tobin C. Harding
Sphinx emits warning WARNING: Explicit markup ends without a blank line; unexpected unindent. This is caused by a missing line after the SPDX license identifier. Add blank line after SPDX licence identifier. Signed-off-by: Tobin C. Harding --- Documentation/laptops/lg

[PATCH 5/9] docs: Replace backtick with apostrophe.

2019-03-07 Thread Tobin C. Harding
Sphinx emits: WARNING: Inline interpreted text or phrase reference start-string without end-string. This is caused by a spurious backtick. Replace backtick with apostrophe. Signed-off-by: Tobin C. Harding --- include/linux/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 2/9] docs: Add colon clearing sphinx warning

2019-03-07 Thread Tobin C. Harding
without a blank line; unexpected unindent. Add the colon, clearing sphinx warnings. Signed-off-by: Tobin C. Harding --- Documentation/vm/slub.rst | 2 +- include/linux/wait.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/vm/slub.rst b/Documentation/vm

<    1   2   3   4   5   6   7   8   9   10   >