> Not only might memcpy() do a "prefetch for read" on the source for some > architectures (which in turn may end up being slow for an address that > isn't in the TLB, like NULL), but you depend on a very much internal
Well, I hope a prefetch(NULL) is OK because we are doing millions of them (see include/linux/list.h :) ) > detail, since it *could* have been using something like > > memcpy(dname, name->name, name->len+1); > Yes very true, I will change that and push to Andrew for mm testing I was thinking about being able to cache the name into the dentry, do you think it's worth the pain ? (its not SMP safe for example...) static char * pipefs_dname(struct dentry *dentry, char *buffer, int buflen) { if (!dentry->d_iname[0]) snprintf(dentry->d_iname, DNAME_INLINE_LEN_MIN, "pipe:[%lu]", dentry->d_inode->i_ino); strlcpy(buffer, dentry->d_iname, buflen); return buffer; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/