From: Dan Magenheimer Subject: RE: crash in page_list_* macro Date: Fri, 13 Feb 2009 00:12:01 +0000 (GMT) Message-ID: <71368aa3-70ea-4749-a1ee-3e8d435c1d54@default> References: <4993F5E6.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4993F5E6.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Keir Fraser , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org Thanks for the replies. It seems it's not a good idea to put a page into a page_list when it's already there (among thousands of other list entries). :-} :-} That resulted in all sorts of interesting symptoms! Took me all day to track down my problem, but I think I nailed it. Dan > > Is the memory where the list header is stored overloaded and > > sometimes overwritten for other purposes? Note all pages > > on my page_list have been gotten via pi=3Dalloc_domheap_pages(0,0,0). > > Next I use va=3Dpage_to_virt(pi), use the page for awhile, > > use pi=3Dvirt_to_page(va) and put it on the page_list, then > > later when I page_list_remove_head(my_page_list), the > > list pointers are apparently corrupt. >=20 > So long as you allocate anonymous domheap memory, or xenheap=20 > memory, the > page_list fields should belong to you. The list structure is=20 > pretty simple > and I can't see anything wrong with the macros. An empty list=20 > is noted by > NULL head/tail pointers, otherwise point at head/tail pages=20 > within which > next/prev pointers are 32-bit MFNs. The head and tail pages=20 > do not point at > the page_list_head but instead contain ~0 sentinel next/prev=20 > link values. >=20 > -- Keir > >>> Dan Magenheimer 12.02.09 04:42 >>> > >Is the memory where the list header is stored overloaded and > >sometimes overwritten for other purposes? Note all pages >=20 > The list headers are not overloaded in any way. The list=20 > entries do have > an overlay union field, used only by shadow code (so your code would > need to make use of it explicitly, which I doubt). >=20 > So according to your description of how you use the page I=20 > can't see any > potential for corruption. >=20 > Jan