> > +static void update_cycle(unsigned long long max, struct cycle *cycle) > > +{ > > + cycle->start_pfn= cycle->end_pfn + 1; > > + cycle->end_pfn= cycle->start_pfn + info->pfn_cyclic; > > + > > + if (cycle->end_pfn > max) > > + cycle->end_pfn = max; > > +} > > According to this function, you must treat a range of a cycle > as below: > > |<----------------- a cycle ------------------->| > ---+-----------+-----------+-----------+-----------+---- > | pfn:N | pfn:N+1 | pfn:N+2 | pfn:N+3 | ... > ---+-----------+-----------+-----------+-----------+---- > A A > | | > start_pfn end_pfn > > However, the existing code treat it as: > > |<------------ a cycle ------------>| > ---+-----------+-----------+-----------+-----------+---- > | pfn:N | pfn:N+1 | pfn:N+2 | pfn:N+3 | ... > ---+-----------+-----------+-----------+-----------+---- > A A > | | > start_pfn end_pfn > > This can be implied from the current iterator like below: > > for (pfn = start_pfn; pfn < end_pfn; pfn++) { > ^^^^^^^^^^^^^^ > In short, the existing code will not work correctly. Yeah, you are quite right. This need be corrected. Will change in formal patch. > > You may feel this design is strange. > This came from the fact that the end of the region's *address* > is the head of pfn:N+1 while it can also be said the tail of pfn:N. > (And this came from the initial version.) > > BTW, info->cyclic_start_pfn and info->cyclic_end_pfn are no longer > used, we can get rid of those from makedumpfile.h. Ok, will change. > >