[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 13/22] mini-os: correct wrong calculation of alloc bitmap size
Juergen Gross, on Tue 23 Aug 2016 17:15:59 +0200, wrote: > When remapping the page allocator's bitmap for the ballooning support > the calculation of the needed size is wrong. This doesn't really > matter today as nothing is allocated after that bitmap, but it should > be corrected nevertheless. Oops, indeed! > Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> > --- > balloon.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/balloon.c b/balloon.c > index 8d2f151..8669edb 100644 > --- a/balloon.c > +++ b/balloon.c > @@ -52,7 +52,7 @@ void mm_alloc_bitmap_remap(void) > { > unsigned long i; > > - if ( mm_alloc_bitmap_size >= ((nr_max_pages + 1) >> (PAGE_SHIFT + 3)) ) > + if ( mm_alloc_bitmap_size >= ((nr_max_pages + 1) >> 3) ) > return; > > for ( i = 0; i < mm_alloc_bitmap_size; i += PAGE_SIZE ) > @@ -62,7 +62,7 @@ void mm_alloc_bitmap_remap(void) > } > > mm_alloc_bitmap = (unsigned long *)virt_kernel_area_end; > - virt_kernel_area_end += round_pgup((nr_max_pages + 1) >> (PAGE_SHIFT + > 3)); > + virt_kernel_area_end += round_pgup((nr_max_pages + 1) >> 3); > ASSERT(virt_kernel_area_end <= VIRT_DEMAND_AREA); > } > > -- > 2.6.6 > -- Samuel /* * [...] Note that 120 sec is defined in the protocol as the maximum * possible RTT. I guess we'll have to use something other than TCP * to talk to the University of Mars. * PAWS allows us longer timeouts and large windows, so once implemented * ftp to mars will work nicely. */ (from /usr/src/linux/net/inet/tcp.c, concerning RTT [retransmission timeout]) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |