Skip to content

ocfs2/dlm: dynamically allocate lvb

Wengang Wang ocfs2-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ocfs2/dlm: dynamically allocate lvb for dlm_lock_resourcefs/ocfs2/dlm/dlmast.c fs/ocfs2/dlm/dlmcommon.h fs/ocfs2/dlm/dlmdebug.c +2 more+42 -64 replies
2/5ocfs2/dlm: add lockres as parameter to dlm_new_lock()fs/ocfs2/dlm/dlmcommon.h fs/ocfs2/dlm/dlmlock.c fs/ocfs2/dlm/dlmrecovery.c+31 -291 reply
3/5ocfs2/dlm: add assertion on lksb->lvbfs/ocfs2/dlm/dlmast.c fs/ocfs2/dlm/dlmrecovery.c+7 -00 replies
4/5ocfs2/dlm: copy lvb from lksb only when it's meaningfulfs/ocfs2/dlm/dlmrecovery.c+2 -11 reply
5/5ocfs2/dlm: make dynamic lvb alloc workfs/ocfs2/dcache.c fs/ocfs2/dlm/dlmapi.h fs/ocfs2/dlm/dlmcommon.h +8 more+139 -232 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Ocfs2-devel] [PATCH 0/5] ocfs2/dlm: dynamically allocate lvb

For effect of D-alloc lvb for dlm_lock,

without the patch,
[wwg at desk ~]$ egrep "ocfs2_inode" /proc/slabinfo
ocfs2_inode_cache 26 26 1216 26 8 : tunables 0 0 0 : slabdata 1 1 0

with the patch,
[wwg at cool linux-2.6]$ egrep "ocfs2_inode" /proc/slabinfo
ocfs2_inode_cache 32 32 1024 16 4 : tunables 0 0 0 : slabdata 2 2 0

#that result is for i686.

For allocated dlm_lock, there is a memory save too.

regards,
wengang.

Quoted 20 lines · Wengang Wang

Not all dlm_lock_resource/dlm_lock use lvb. It's a waste of memory for those since lvb is a "char lvb[64];".

The following patches try to D-alloc(dynamically allocate) lvb for those which need lvb.

1/5 --D-alloc for dlm_lock_resources.
2/5 ~ 5/5
--D-alloc for dlm_lock.
2/5 --add "struct dlm_lock_resource *res" parameter to dlm_new_lock() so that
we can know if we need to allocates lvb for the dlm_lock.

3/5  --add some assertions on lksb->lvb
4/5  --Copies lvb from lksb only when it's meaningful(not NULL).
5/5  --This is a fat patch. I failed to separate it into parts. I does the main

work for D-alloc for dlm_lock.

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel