Re: [PATCH 00/10] Fix confusion around MAX_ORDER

2023-10-17 Thread Pavel Machek
On Thu 2023-09-28 18:57:18, Paolo Bonzini wrote: > On 9/28/23 09:50, Mikulas Patocka wrote: > > > > Fix the bugs and then change the definition of MAX_ORDER to be > > > > inclusive: the range of orders user can ask from buddy allocator is > > > > 0..MAX_ORDER now. > > I think that exclusive

Re: [dm-devel] [PATCH 00/10] Fix confusion around MAX_ORDER

2023-09-28 Thread Paolo Bonzini
On 9/28/23 09:50, Mikulas Patocka wrote: Fix the bugs and then change the definition of MAX_ORDER to be inclusive: the range of orders user can ask from buddy allocator is 0..MAX_ORDER now. I think that exclusive MAX_ORDER is more intuitive in the C language - i.e. if you write "for (i = 0; i <

Re: [dm-devel] [PATCH 00/10] Fix confusion around MAX_ORDER

2023-09-28 Thread Mikulas Patocka
On Wed, 27 Sep 2023, Paolo Bonzini wrote: > On 3/15/23 12:31, Kirill A. Shutemov wrote: > > MAX_ORDER currently defined as number of orders page allocator supports: > > user can ask buddy allocator for page order between 0 and MAX_ORDER-1. > > > > This definition is counter-intuitive and lead

Re: [dm-devel] [PATCH 00/10] Fix confusion around MAX_ORDER

2023-09-27 Thread Paolo Bonzini
On 3/15/23 12:31, Kirill A. Shutemov wrote: MAX_ORDER currently defined as number of orders page allocator supports: user can ask buddy allocator for page order between 0 and MAX_ORDER-1. This definition is counter-intuitive and lead to number of bugs all over the kernel. Fix the bugs and then