Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] xfs: do not pass size into kmem_free, it's unused

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


vda.linux at googlemail

Apr 21, 2008, 7:33 PM

Post #1 of 4 (742 views)
Permalink
[PATCH] xfs: do not pass size into kmem_free, it's unused

Hi David,

> Patches are welcome - I'd be over the moon if any of the known 4k
> stack advocates sent a stack reduction patch for XFS, but it seems
> that actually trying to fix the problems is much harder than
> resending a one line patch every few months....

kmem_free() function takes (ptr, size) arguments but doesn't
actually use second one.

This patch removes size argument from all callsites.

Code size difference on 32-bit x86:

# size */fs/xfs/xfs.o
text data bss dec hex filename
391271 2748 1708 395727 609cf linux-2.6-xfs0-TEST/fs/xfs/xfs.o
390739 2748 1708 395195 607bb linux-2.6-xfs1-TEST/fs/xfs/xfs.o

Compile-tested only.

Signed-off-by: Denys Vlasenko <vda.linux [at] googlemail>
--
vda
Attachments: xfs-kmem_free-remove_unused_param.patch (27.7 KB)


sandeen at sandeen

Apr 21, 2008, 8:09 PM

Post #2 of 4 (662 views)
Permalink
Re: [PATCH] xfs: do not pass size into kmem_free, it's unused [In reply to]

Denys Vlasenko wrote:
> Hi David,
>
>> Patches are welcome - I'd be over the moon if any of the known 4k
>> stack advocates sent a stack reduction patch for XFS, but it seems
>> that actually trying to fix the problems is much harder than
>> resending a one line patch every few months....
>
> kmem_free() function takes (ptr, size) arguments but doesn't
> actually use second one.
>
> This patch removes size argument from all callsites.

I didn't expect it to but this does reduce a few things slightly.

On x86_64:

-xfs_attr_leaf_list_int 200
+xfs_attr_leaf_list_int 184

-xfs_dir2_sf_to_block 136
+xfs_dir2_sf_to_block 120

-xfs_ifree_cluster 136
+xfs_ifree_cluster 120

-xfs_inumbers 184
+xfs_inumbers 168

-xfs_mount_free 24

Thanks,
-Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


sandeen at sandeen

Apr 21, 2008, 8:35 PM

Post #3 of 4 (656 views)
Permalink
Re: [PATCH] xfs: do not pass size into kmem_free, it's unused [In reply to]

Eric Sandeen wrote:
> Denys Vlasenko wrote:
>> Hi David,
>>
>>> Patches are welcome - I'd be over the moon if any of the known 4k
>>> stack advocates sent a stack reduction patch for XFS, but it seems
>>> that actually trying to fix the problems is much harder than
>>> resending a one line patch every few months....
>> kmem_free() function takes (ptr, size) arguments but doesn't
>> actually use second one.
>>
>> This patch removes size argument from all callsites.
>
> I didn't expect it to but this does reduce a few things slightly.
>
> On x86_64:
>
> -xfs_attr_leaf_list_int 200
> +xfs_attr_leaf_list_int 184
>
> -xfs_dir2_sf_to_block 136
> +xfs_dir2_sf_to_block 120
>
> -xfs_ifree_cluster 136
> +xfs_ifree_cluster 120
>
> -xfs_inumbers 184
> +xfs_inumbers 168
>
> -xfs_mount_free 24

And on x86, just for the record (fedora 9 config in both cases...)

-xfs_attr_leaf_inactive 36
+xfs_attr_leaf_inactive 32

-xfs_attr_shortform_list 40
+xfs_attr_shortform_list 36

-xfs_da_grow_inode 96
+xfs_da_grow_inode 92

-xfs_dir2_grow_inode 116
+xfs_dir2_grow_inode 104

-xfs_dir2_leaf_getdents 176
+xfs_dir2_leaf_getdents 172

-xfs_dir2_sf_to_block 92
+xfs_dir2_sf_to_block 88

-xfs_ifree_cluster 108
+xfs_ifree_cluster 104

-xfs_inumbers 88
+xfs_inumbers 84

-xfs_lock_inodes 24
+xfs_lock_inodes 28

-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


dgc at sgi

Apr 22, 2008, 3:02 PM

Post #4 of 4 (651 views)
Permalink
Re: [PATCH] xfs: do not pass size into kmem_free, it's unused [In reply to]

On Tue, Apr 22, 2008 at 04:33:03AM +0200, Denys Vlasenko wrote:
> Hi David,
>
> > Patches are welcome - I'd be over the moon if any of the known 4k
> > stack advocates sent a stack reduction patch for XFS, but it seems
> > that actually trying to fix the problems is much harder than
> > resending a one line patch every few months....
>
> kmem_free() function takes (ptr, size) arguments but doesn't
> actually use second one.

Ack. Pulled into my qa tree.

FWIW, can you send patches in line next time? It makes it easier to
quote them on review....

Cheers,

Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.