Re: [PATCH 1/9] exec: add a global execve counter

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

 



On Sat, Mar 10, 2012 at 4:12 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> I wonder if we couldn't make something much cheaper, since we don't
> actually care about it being globally incrementing, we just care about
> it being globally unique.

Actually, we don't even need it to be "globally unique" afaik. It
really needs to be "relatively unique", since it's always compared
within the confines of a particular task.

So the problem with using the existing "self_exec_id" is that it's
trivially the same across tasks. But a  *tuple* of <struct
task_struct, thread-specific exec_id> doesn't have that issue, so as
far as I can tell we could easily make *that* the unique ID.

I wonder if the number part of exec_id would even have to be 64-bit. I
think I can do about 10000 execves per second if I make the program a
small static one - and that's on a fast CPU. And it's a per-thread
counter, so you can't scale it with lots of CPU's. So it would take
something like four days to wrap. Hmm..

                  Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux