All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Change lvm2app memory allocation for pv/vg/lv properties
@ 2010-04-14 15:14 Dave Wysochanski
  2010-04-14 15:14 ` [PATCH 1/2] Use vg->vgmem to allocate vg/lv/pv string properties instead of dm_malloc/free Dave Wysochanski
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Wysochanski @ 2010-04-14 15:14 UTC (permalink / raw)
  To: lvm-devel


This patchset changes memory allocation for pv/vg/lv properties in lvm2app.
Unfortunately, this is a change to the existing API, but has the following
benefits:
1) gives us consistency in memory handling across the API (lvm2app
allocs/frees memory for strings and lists).
2) allows for simpler application code

A few downsides of this approach:
1) an application that repeatedly calls a 'get' property function will
generate repeated allocations and could eventually trigger an OOM,
as the only way to release memory is to release the vg handle.  Possible
fixes to this situation include the application release and reacquire
the vg handle, or lvm2app provide another API to release object property
memory tied to a vg handle (internally this would require a separate
memory pool for the attribute memory).  In any case, there are workarounds
possible for this downside.
2) An application may hold a vg handle open longer than it would previously.
This would mean an application would hold a lock longer than it might have
had lvm2app given the application control of the memory.  This is really
an application issue though, since the application can simply copy memory
properties it might need and release the vg handle.



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 0/2] Change lvm2app memory allocation for pv/vg/lv properties
@ 2010-04-14 15:20 Dave Wysochanski
  2010-04-14 15:20 ` [PATCH 1/2] Use vg->vgmem to allocate vg/lv/pv string properties instead of dm_malloc/free Dave Wysochanski
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Wysochanski @ 2010-04-14 15:20 UTC (permalink / raw)
  To: lvm-devel


This patchset changes memory allocation for pv/vg/lv properties in lvm2app.
Unfortunately, this is a change to the existing API, but has the following
benefits:
1) gives us consistency in memory handling across the API (lvm2app
allocs/frees memory for strings and lists).
2) allows for simpler application code

A few downsides of this approach:
1) an application that repeatedly calls a 'get' property function will
generate repeated allocations and could eventually trigger an OOM,
as the only way to release memory is to release the vg handle.  Possible
fixes to this situation include the application release and reacquire
the vg handle, or lvm2app provide another API to release object property
memory tied to a vg handle (internally this would require a separate
memory pool for the attribute memory).  In any case, there are workarounds
possible for this downside.
2) An application may hold a vg handle open longer than it would previously.
This would mean an application would hold a lock longer than it might have
had lvm2app given the application control of the memory.  This is really
an application issue though, since the application can simply copy memory
properties it might need and release the vg handle.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-04-14 16:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-14 15:14 [PATCH 0/2] Change lvm2app memory allocation for pv/vg/lv properties Dave Wysochanski
2010-04-14 15:14 ` [PATCH 1/2] Use vg->vgmem to allocate vg/lv/pv string properties instead of dm_malloc/free Dave Wysochanski
2010-04-14 15:14   ` [PATCH 2/2] Change lvm2app version number from 1 to 2 Dave Wysochanski
2010-04-14 15:21   ` [PATCH 1/2] Use vg->vgmem to allocate vg/lv/pv string properties instead of dm_malloc/free Zdenek Kabelac
2010-04-14 16:35     ` Dave Wysochanski
  -- strict thread matches above, loose matches on Subject: below --
2010-04-14 15:20 [PATCH 0/2] Change lvm2app memory allocation for pv/vg/lv properties Dave Wysochanski
2010-04-14 15:20 ` [PATCH 1/2] Use vg->vgmem to allocate vg/lv/pv string properties instead of dm_malloc/free Dave Wysochanski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.