Re: [PATCH v2 0/3] staging: zcache: xcfmalloc support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-10-03 at 13:54 -0400, Nitin Gupta wrote:
> I think disabling preemption on the local CPU is the cheapest we can get
> to protect PCPU buffers. We may experiment with, say, multiple buffers
> per CPU, so we end up disabling preemption only in highly improbable
> case of getting preempted just too many times exactly within critical
> section.

I guess the problem is two-fold: preempt_disable() and
local_irq_save().  

> static int zcache_put_page(int cli_id, int pool_id, struct tmem_oid *oidp,
>                                 uint32_t index, struct page *page)
> {
>         struct tmem_pool *pool;
>         int ret = -1;
> 
>         BUG_ON(!irqs_disabled());

That tells me "zcache" doesn't work with interrupts on.  It seems like
awfully high-level code to have interrupts disabled.  The core page
allocator has some irq-disabling spinlock calls, but that's only really
because it has to be able to service page allocations from interrupts.
What's the high-level reason for zcache?

I'll save the discussion about preempt for when Seth posts his patch.

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]