[PATCH] Re: [dm-devel] kmalloc after down_write?

Alasdair G Kergon agk at redhat.com
Fri Nov 19 20:37:44 UTC 2004


On Fri, Nov 19, 2004 at 03:27:57PM -0500, Ming Zhang wrote:
> en, yes, kmalloc first is better way. since this register_snapshot is
> not called frequently(only in ctr), the extra overhead brought by always
> doing kmalloc is minor. but down_write while possible sleep is bad for
> the do_origin() since it is called by origina_map().

The analysis has to be more complex than that.
Which devices, if any, are suspended?  What difference does that make
in each case there is to consider?
What's the difference between normal cases and out-of-memory cases?
But creating a snapshot requires a lot of memory to be available anyway;
where do we prefer the failures or blocking to occur?
How will that change when the use of PF_MEMALLOC gets refined?
 
Alasdair
-- 
agk at redhat.com




More information about the dm-devel mailing list