lkml.org 
[lkml]   [2007]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch] epoll use a single inode ...
Date

> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-07 19:55    [W:0.125 / U:0.560 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site