Re: [PATCH v4] mm: cma: support sysfs

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

 



On Fri, Mar 19, 2021 at 04:39:41PM +0300, Dmitry Osipenko wrote:
> 19.03.2021 15:44, Dmitry Osipenko пишет:
> ...
> >>  #include <linux/debugfs.h>
> >> +#include <linux/kobject.h>
> >> +
> >> +struct cma_stat {
> >> +	spinlock_t lock;
> >> +	/* the number of CMA page successful allocations */
> >> +	unsigned long nr_pages_succeeded;
> >> +	/* the number of CMA page allocation failures */
> >> +	unsigned long nr_pages_failed;
> >> +	struct kobject kobj;
> >> +};
> >>  
> >>  struct cma {
> >>  	unsigned long   base_pfn;
> >> @@ -16,6 +26,9 @@ struct cma {
> >>  	struct debugfs_u32_array dfs_bitmap;
> >>  #endif
> >>  	char name[CMA_MAX_NAME];
> >> +#ifdef CONFIG_CMA_SYSFS
> >> +	struct cma_stat	*stat;
> >> +#endif
> 
> What is the point of allocating stat dynamically?

Because static kobjects make me cry.






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux