From: Keir Fraser Subject: Re: LTTng-Xen Buffer shared between the hypervisor and a dom0 process Date: Thu, 08 Mar 2007 07:51:39 +0000 Message-ID: References: <20070307192448.GA23656@Krystal> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070307192448.GA23656@Krystal> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mathieu Desnoyers , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 7/3/07 19:24, "Mathieu Desnoyers" wrote: > Then, I would like to release some kind of reference count of this > mapping from the hypervisor. I do the following which results in page > faults (probably because it tries to free memory still accessed by > lttd-xen) : What's the shutdown order you're looking for? It sounds like you want Xen to tell lttd-xen when it should quit, which seems to me the wrong way round. -- Keir > free_xenheap_pages( > rawbuf, > get_order_from_bytes(chan->alloc_size * num_possible_cpus())); > > > And then, when we are sure that no more data can be written in the > buffer, lttd-xen is ready to exit. It unmaps the buffer just before exit : > > err_ret = munmap(pair->mmap, pair->subbuf_size * pair->n_subbufs); > > Do you know any proper way to achieve what I am looking for ?