All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xensource.com>
To: Derek Murray <Derek.Murray@cl.cam.ac.uk>,
	Keir Fraser <keir@xensource.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 0/3] [RFC] User-space grant table device
Date: Mon, 19 Mar 2007 15:11:12 +0000	[thread overview]
Message-ID: <C2245890.BCF9%keir@xensource.com> (raw)
In-Reply-To: <E1HTIt8-0006If-00@mta2.cl.cam.ac.uk>

On 19/3/07 14:31, "Derek Murray" <Derek.Murray@cl.cam.ac.uk> wrote:

>> 3. Just looking at linux-changes.patch, I think the new interface function's
>> semantics need to be clearer. Do you really mean for the hook function to be
>> called *and* for unmap_page_range() to do the usual zap_pud_range() work?
>> Should the hook function return anything? What about responsibility for
>> synchronising TLBs?
> 
> Might it be better to replace this hook with something that operates on the
> PTE (rather than vm_area) level? Thus the hook could be called from
> zap_pte_range(), and this would harness all the TLB synchronisation that is
> normally employed.

I think that might be better, yes. It avoids needing to do pagetable walking
in your driver to find the pte's and you can also use tlb_remove_tlb_entry()
on each pte you zap to cause an eventual tlb flush on tlb_finish_mmu()
(which is called from the caller of unmap_page_range())..

> I'm not sure that the hook function should return anything: as far as I
> understand, the unmap-grant hypercall should not fail, and, if it does, I
> don't see how we can recover from that.

You're probably right, especially if you implement the hook as a
zap_pte_range() alternative.

 -- Keir

  reply	other threads:[~2007-03-19 15:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19 10:40 [PATCH 0/3] [RFC] User-space grant table device Derek Murray
2007-03-19 14:00 ` Keir Fraser
2007-03-19 14:31   ` Derek Murray
2007-03-19 15:11     ` Keir Fraser [this message]
2007-03-21  4:32 ` Isaku Yamahata
2007-03-21 11:29   ` Derek Murray
2007-03-21 14:16     ` Andrew Warfield
2007-03-23 15:25       ` Mark Williamson
2007-03-22  2:28     ` Isaku Yamahata
2007-03-23 14:50       ` Derek Murray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C2245890.BCF9%keir@xensource.com \
    --to=keir@xensource.com \
    --cc=Derek.Murray@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.