Re: [PATCH v2] mm/zsmalloc: add statistics support

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

 



On Sat, 20 Dec 2014 08:58:52 +0900 Minchan Kim <minchan@xxxxxxxxxx> wrote:

> On Fri, Dec 19, 2014 at 03:45:48PM -0800, Andrew Morton wrote:
> > On Sat, 20 Dec 2014 08:39:37 +0900 Minchan Kim <minchan@xxxxxxxxxx> wrote:
> > 
> > > Then, we should fix debugfs_create_dir can return errno to propagate the error
> > > to end user who can know it was failed ENOMEM or EEXIST.
> > 
> > Impractical.  Every caller of every debugfs interface will need to be
> > changed!
> 
> If you don't like changing of all of current caller, maybe, we can define
> debugfs_create_dir_error and use it.
> 
> struct dentry *debugfs_create_dir_err(const char *name, struct dentry *parent, int *err)
> and tweak debugfs_create_dir.
> struct dentry *debugfs_create_dir(const char *name, struct dentry *parent, int *err)
> {
> 	..
> 	..
> 	if (error) {
> 		*err = error;
> 		dentry = NULL;
> 	}
> }
> 
> Why not?

It involves rehashing a lengthy argument with Greg.

> > 
> > It's really irritating and dumb.  What we're supposed to do is to
> > optionally report the failure, then ignore it.  This patch appears to
> > be OK in that respect.
> 
> At least, we should notify to the user why it was failed so he can fix
> the name if it was duplicated. So if you don't want debugfs, at least
> I want to warn all of reasons it can fail(at least, duplicated name)
> to the user.

Sure.  The debugfs interface design is mistaken.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




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