mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Levon <levon@movementarian.org>
To: "David S. Miller" <davem@redhat.com>
Cc: weigand@immd1.informatik.uni-erlangen.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [8/7] oprofile - dcookies need to use u32
Date: Wed, 16 Oct 2002 17:40:57 +0100	[thread overview]
Message-ID: <20021016164057.GB85246@compsoc.man.ac.uk> (raw)
In-Reply-To: <20021015.190019.41374479.davem@redhat.com>

On Tue, Oct 15, 2002 at 07:00:19PM -0700, David S. Miller wrote:

>    +               return (u32)dentry;
>    
>    Um, isn't this supposed to uniquely identify the dentry?
>    On a platform with 64-bit pointers there's now the theoretical
>    possibility of different dentries getting the same cookie ...
> 
> That's true.
> 
> We dealt with this (trying to use a kernel pointer as a cache held by
> userspace) in tcp_diag by making the actual object opaque.  It was
> actually two u32's, and that way it worked independant of kernel
> vs. user word size.

I'm not sure that's an option :

o userspace needs to know the size of the cookie in the event buffer
o userspace would like to use the cookie as a hash value to avoid
  repeated lookups

Perhaps the best solution would be to use a separate u32 ID value,
allocated linearly. I could just refuse to allocate new dcookies in
theoretical case of overflow.

The other possibility is a dcookiefs (cat
/dev/oprofile/dcookie/34343234) but that's a lot of extra
code/complexity ...

regards
john
-- 
"It's a cardboard universe ... and if you lean too hard against it, you fall
 through." 
	- Philip K. Dick 

  reply	other threads:[~2002-10-16 16:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-16  1:56 Ulrich Weigand
2002-10-16  2:00 ` David S. Miller
2002-10-16 16:40   ` John Levon [this message]
2002-10-16 18:29     ` Jeff Garzik
2002-10-16 21:38     ` David S. Miller
2002-10-17  0:57       ` John Levon
2002-10-17  0:55         ` David S. Miller
2002-10-17  1:16           ` John Levon
2002-10-17  1:12             ` David S. Miller
2002-10-19  0:26               ` John Levon
2002-10-19  0:23                 ` David S. Miller
2002-10-19  0:34                   ` John Levon
2002-10-19  0:31                     ` David S. Miller
2002-10-19  0:40                       ` John Levon
2002-10-19  0:35                         ` David S. Miller
2002-11-01  4:33                       ` John Levon
2002-11-01 10:27                         ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2002-10-15 22:32 [PATCH] [2/7] oprofile - dcookies John Levon
2002-10-15 23:37 ` David S. Miller
2002-10-16  0:06   ` [PATCH] [8/7] oprofile - dcookies need to use u32 John Levon
2002-10-16  0:01     ` David S. Miller
2002-10-16  1:33     ` Linus Torvalds
2002-10-16  1:35       ` John Levon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021016164057.GB85246@compsoc.man.ac.uk \
    --to=levon@movementarian.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weigand@immd1.informatik.uni-erlangen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®