Re: [PATCH tip/core/rcu 1/2] rcu: Support kfree_bulk() interface in kfree_rcu()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >  
> > +/*
> > + * This macro defines how many entries the "records" array
> > + * will contain. It is based on the fact that the size of
> > + * kfree_rcu_bulk_data structure becomes exactly one page.
> > + */
> > +#define KFREE_BULK_MAX_ENTR ((PAGE_SIZE / sizeof(void *)) - 3)
> > +
> 
> Why use the "magic" number "3" here? Could we just define struct
> kfree_rcu_bulk_data as:
> 
> struct kfree_rcu_bulk_data {
> 	struct kfree_rcu_bulk_data *next;
> 	struct rcu_head *head_free_debug;
> 	unsigned long nr_records;
> 	void *records[];
> }
> 
> ?
> 
> And the the above macro becomes:
> 
> #define KFREE_BULK_MAX_ENTR ((PAGE_SIZE - sizeof(struct kfree_rcu_bulk_data)) / sizeof(void *))
> 
That should work. I agree that looks better :)

We can fix that by submitting a separate patch.

Thank you!

--
Vlad Rezki



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux