Re: Preempt Threshold Measurements

From: William Lee Irwin III
Date: Tue Jul 13 2004 - 05:43:43 EST


On Mon, Jul 12, 2004 at 09:01:07PM -0700, Andrew Morton wrote:
>> This is a false positive. Nothing is setting need_resched(), so
>> unmap_vmas() doesn't bother dropping the lock.

On Tue, Jul 13, 2004 at 03:08:15AM -0700, William Lee Irwin III wrote:
> I guess I sent too many updates and the whole thing got dropped. The false
> positives were fixed in this way:

> - if (!atomic && need_resched()) {
> + zap_bytes = ZAP_BLOCK_SIZE;
> + if (!atomic)
> + continue;
> + touch_preempt_timing();
> + if (need_resched()) {

That's not quite right. Amazing it didn't catch might_sleep() warnings.

Index: mm7-2.6.7/mm/memory.c
===================================================================
--- mm7-2.6.7.orig/mm/memory.c 2004-07-13 03:06:12.784491200 -0700
+++ mm7-2.6.7/mm/memory.c 2004-07-13 03:39:45.843459720 -0700
@@ -568,16 +568,16 @@
if ((long)zap_bytes > 0)
continue;
zap_bytes = ZAP_BLOCK_SIZE;
- if (!atomic)
+ if (atomic)
continue;
- touch_preempt_timing();
if (need_resched()) {
int fullmm = tlb_is_full_mm(*tlbp);
tlb_finish_mmu(*tlbp, tlb_start, start);
cond_resched_lock(&mm->page_table_lock);
*tlbp = tlb_gather_mmu(mm, fullmm);
tlb_start_valid = 0;
- }
+ } else
+ touch_preempt_timing();
}
}
return ret;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/