[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 1/2] lib/ukallocbbuddy: Fix definition and assertions of memr.nr_pages
On Thu, Mar 15, 2018 at 11:41 AM, Costin Lupu <costin.lup@xxxxxxxxx> wrote: Hi Bruno, Ack. > return memr; Ack. Sorry for the typo.
I follow the arithmetic that you are doing here but I am not clear on exactly we want to achieve. Right now, memr_size is forced to be a multiple of PAGE_SIZE. memr_size = round_pgup(..) and then min and range are modified accordingly: min += memr_size; range -= memr_size; Thus: nr_pages = (max - min) >> __PAGE_SHIFT looks OK even for the case that you mentioned: If instead nr_pages = BITS_PER_BYTE * (range - sizeof(*memr)) / (BITS_PER_BYTE * __PAGE_SIZE + 1) would be the same. Are you suggesting to use this formula just for clarity? Or are you suggesting that we should enforce memr_size to be a multiple of PAGE_SIZE so that first_page always ends up being one memory location after the bitmap and we optimize the number of pages? I am not sure if I am missing something about what you said. Also, the bitmap should be set to ones before calling map_free. Ack.
Ack. 2. return unsigned long instead of int Ack. 3. change the return value by using the correct bitmap array index and The look OK to me. What I am missing? - in map_free, correct values for curr_idx, start_off, end_idx, end_off They look OK to me. Please include all the changes into a single patch and test them before Thanks, Bruno _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |