Re: KVM: MMU: rmap_write_protect() hugepage iteration bug

Andrea Arcangeli
2008-06-08T20:30:39Z

On Sun, Jun 08, 2008 at 04:52:15PM -0300, Marcelo Tosatti wrote:
> We do. The case is were you have two entries in the array. rmap_remove
> will first remove the entry at index 0, and move the entry at index 1 to
> 0.
>
> Then we call "rmap_next()" with a non-NULL spte, which will skip the
> only remaining entry at index 0. IOW rmap_next() requires the spte
> argument to be NULL if the array has one valid entry.

How exactly we could call rmap_next with not-NULL spte after any
rmap_remove with your last patch applied?

> > chains are fairly long. To be sure you could try to profile it and see
> > if rmap_write_protect goes up in the opreport.
>
> Will do.

Cool, thanks!