Skip to contentSkip to conversation

x86/pat: no need to check overlaps with more than one entry in chk_conflict

PATCH NAK Xiaotian Feng 2 participants 2 messages Nov 18, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/pat: no need to check overlaps with more than one entry in chk_conflict

memtype list is built via reserve_memtype, for the overlapped areas, they're all the same type, otherwise reserve_memtype will fail to insert it into the list. So there's no need to check overlaps with more than one entry in the chk_conflict code.

Cc Ingo Molnar <[email protected]>
Cc Suresh Siddha <[email protected]>
Cc Venkatesh Pallipadi <[email protected]>
---
 arch/x86/mm/pat.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
arch/x86/mm/pat.c +0 -7
index 81fb753..8178763 100644
@@ -247,13 +247,6 @@ chk_conflict(struct memtype *new, struct memtype *entry, unsigned long *type)
 			goto conflict;
 	}
 
-	 /* check overlaps with more than one entry in the list */
-	list_for_each_entry_continue(entry, &memtype_list, nd) {
-		if (new->end <= entry->start)
-			break;
-		else if (new->type != entry->type)
-			goto conflict;
-	}
 	return 0;
 
  conflict:
Signature · 1 line
1.6.2.5
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Xiaotian Feng
Sent: Tuesday, November 17, 2009 6:48 PM
To: [email protected]
Cc: [email protected]; Xiaotian Feng; Ingo Molnar; Siddha, Suresh B; Pallipadi, Venkatesh
Subject: [PATCH] x86/pat: no need to check overlaps with more than one entry in chk_conflict

Quoted 7 lines

memtype list is built via reserve_memtype, for the overlapped areas, they're
all the same type, otherwise reserve_memtype will fail to insert it into the
list. So there's no need to check overlaps with more than one entry in the
chk_conflict code.

NAK.

The reason we have to check for more than one entry is for the cases like this.

New entry:                   s-------------------e
Existing entries:         s----e     s-----e   s----e

(s=start, e=end)

Thanks,
Venki