Linux-Development-Sys Digest #249, Volume #8      Wed, 1 Nov 00 06:13:08 EST

Contents:
  Re: Can I create a floppy with a simple Linux? ("Philo")
  Re: Multiple groups per file (Jeff Walters)
  Re: Can I create a floppy with a simple Linux? (Dave Platt)
  Re: Linux API (Christopher Browne)
  Re: microsecond-resolution timers (Robert Redelmeier)
  Re: Can I create a floppy with a simple Linux? (David Hassett)
  Re: microsecond-resolution timers (Kaz Kylheku)
  Re: Can I create a floppy with a simple Linux? (Manfred Bartz)
  Re: microsecond-resolution timers (Bob Tennent)
  Re: Can I create a floppy with a simple Linux? ("Alan Po")
  Re: System.map problem! ([EMAIL PROTECTED])
  Re: System.map problem! ([EMAIL PROTECTED])
  Re: Can I create a floppy with a simple Linux? (hac)
  IP Masq Module Writing? ("Daniel Lenski")
  Re: System.map problem! (Villy Kruse)
  Re: microsecond-resolution timers (Kasper Dupont)
  Re: Can I create a floppy with a simple Linux? ("Davide")
  Re: System.map problem! (Kasper Dupont)
  Re: Can I create a floppy with a simple Linux? (Kasper Dupont)
  Re: Linux API (Nick Maclaren)
  Re: RFI: Linux implementation of tnf tracing system (Andi Kleen)

----------------------------------------------------------------------------

From: "Philo" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: Can I create a floppy with a simple Linux?
Date: Tue, 31 Oct 2000 18:20:24 -0600

do a www.google.com  search for pygmy linux, it's the most minimal version
i'm aware of.
it may be too big for one floppy but it is quite small...10megs or so but
you could probably cut it down quite a bit

--

Philo

website: www.plazaearth.com/philo



------------------------------

From: Jeff Walters <[EMAIL PROTECTED]>
Subject: Re: Multiple groups per file
Date: 1 Nov 2000 00:01:04 GMT

Kasper Dupont <[EMAIL PROTECTED]> wrote:
> Make a directory owned by readers
> with permitions drwxr-x---, in that
> directory make another directory
> owned by writers with permitions
> drwxrwxr-x.

Clever, I hadn't thought of that.

-- 
Message of the Message:
I hope you millionaires are having fun!  I just invested half your life
savings in yeast!!

------------------------------

From: [EMAIL PROTECTED] (Dave Platt)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: Can I create a floppy with a simple Linux?
Date: Wed, 01 Nov 2000 01:09:59 -0000

>do a www.google.com  search for pygmy linux, it's the most minimal version
>i'm aware of.
>it may be too big for one floppy but it is quite small...10megs or so but
>you could probably cut it down quite a bit

An even smaller special-purpose Linux can be found at the Linux Router
Project site (www.linuxrouter.org).  This one will definitely fit on a
single floppy - e.g. for a router or bridge, network firewall or NAT,
etc.

-- 
Dave Platt                                           [EMAIL PROTECTED]
Visit the Jade Warrior home page:  http://www.radagast.org/jade-warrior/
  I do _not_ wish to receive unsolicited commercial email, and I will
     boycott any company which has the gall to send me such ads!

------------------------------

From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: Linux API
Reply-To: [EMAIL PROTECTED]
Date: Wed, 01 Nov 2000 01:23:27 GMT

In our last episode (Sun, 29 Oct 2000 23:24:44 -0000),
the artist formerly known as [EMAIL PROTECTED] said:
>On Sat, 21 Oct 2000 13:57:45 -0700 Jim Fischer <[EMAIL PROTECTED]> wrote:
>|> Hello there
>|> Is the any documentation on Linux API just
>|> like the M$ win API?
>|
>| The Linux source code *is* the Linux API. <g>

>As soon as we drop the notion that one has to read massive amounts of
>uncommented or poorly commented code in order to understand how to
>make use of the code (modifying it is a different issue) then many
>more open source projects will become more useful to more people.

>I'm glad you put the "<g>" on there.  Too many people don't.  And
>that tells me there is no design (or reason) to what many people do
>when they code.

The <g> should get squared, because The Way To Go is _NOT_ to use the
Linux source code as "the Linux API."

The Right Thing is to use the documented functions found in GLIBC.

They tend to follow De Jure standards, and are less likely to
massively change when:
a) ACLs are let in, and significantly affect the behaviours of
   permissions; 
b) Capabilities head in [ditto];
c) Preferred Default Behaviour becomes to use 64 bit file descriptor
   values ala LFS.

These and other such things should be left independent of the kernel;
you shouldn't go directly at the kernel unless you actually _need_ to,
and if that be the case, then reading _and understanding_ the "massive
amounts of code" starts to be necessary.

>| Actually, there are some books available on the Linux kernel, but
>| the kernel sources change so frequently that some of the content in
>| these books is obsolete before the books are even published. IOW,
>| you'll probably never walk into a Barns & Nobels bookstore and find
>| a book that discusses the APIs of "recent" Linux kernels (e.g., the
>| 2.4 kernels).

>I don't know about Barnes & Noble, but I found one in Border's that
>talked about the design of 2.4.  I didn't buy it because I don't need
>it (yet).

... If you're not writing your own utilities to talk directly with
/proc, aren't writing your own filesystems, and aren't doing stuff of
equivalent "kernel intimacy," then you probably won't need it any time
soon.

Five years from now, you might be running those programs that use
GLIBC on your 2000 MIPS 1GB AMD Sledgehammer running Hurd...  :-)
-- 
(concatenate 'string "cbbrowne" "@" "hex.net")
<http://www.ntlug.org/~cbbrowne/lsf.html>
"Of course 5  years from now that will be different,  but 5 years from
now  everyone  will  be  running  free  GNU on  their  200  MIPS,  64M
SPARCstation-5."  -- Andrew Tanenbaum, 1992.

------------------------------

Date: Tue, 31 Oct 2000 19:22:00 -0600
From: Robert Redelmeier <[EMAIL PROTECTED]>
Subject: Re: microsecond-resolution timers

=?iso-8859-1?Q?C=E9sar?= Espinosa wrote:
>     How can I achieve microsecond-resolution timers in Linux?. I am
> using kernel 2.2.14.

Very easily, using the `rdtscl()` macro.  This returns the CPU cycle 
count since reset on x86 architectures.  

-- Robert

------------------------------

From: David Hassett <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: Can I create a floppy with a simple Linux?
Date: Wed, 01 Nov 2000 02:11:12 +0000

Dave Platt wrote:
> 
> >do a www.google.com  search for pygmy linux, it's the most minimal version
> >i'm aware of.
> >it may be too big for one floppy but it is quite small...10megs or so but
> >you could probably cut it down quite a bit
> 
> An even smaller special-purpose Linux can be found at the Linux Router
> Project site (www.linuxrouter.org).  This one will definitely fit on a
> single floppy - e.g. for a router or bridge, network firewall or NAT,
> etc.

Or even smaller:

http://sunsite.dk/mulinux/

------------------------------

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: microsecond-resolution timers
Reply-To: [EMAIL PROTECTED]
Date: Wed, 01 Nov 2000 02:10:50 GMT

On Tue, 31 Oct 2000 19:22:00 -0600, Robert Redelmeier <[EMAIL PROTECTED]> wrote:
>=?iso-8859-1?Q?C=E9sar?= Espinosa wrote:
>>     How can I achieve microsecond-resolution timers in Linux?. I am
>> using kernel 2.2.14.
>
>Very easily, using the `rdtscl()` macro.  This returns the CPU cycle 
>count since reset on x86 architectures.  

However, that is not a timer; a timer is some kind of delayed event that
causes software to take some action.

------------------------------

Crossposted-To: comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: Can I create a floppy with a simple Linux?
From: Manfred Bartz <[EMAIL PROTECTED]>
Date: Wed, 01 Nov 2000 02:19:19 GMT

[EMAIL PROTECTED] (Dave Platt) writes:

> >do a www.google.com  search for pygmy linux, it's the most minimal version
> >i'm aware of.
> >it may be too big for one floppy but it is quite small...10megs or so but
> >you could probably cut it down quite a bit
> 
> An even smaller special-purpose Linux can be found at the Linux Router
> Project site (www.linuxrouter.org).  This one will definitely fit on a
> single floppy - e.g. for a router or bridge, network firewall or NAT,
> etc.

Also check out <http://www.toms.net/rb/home.html>
in addition, there are links to even more mini-Linuxes.  :)
-- 
Manfred

------------------------------

From: [EMAIL PROTECTED] (Bob Tennent)
Subject: Re: microsecond-resolution timers
Date: 1 Nov 2000 02:23:45 GMT
Reply-To: [EMAIL PROTECTED]

On Tue, 31 Oct 2000 19:22:00 -0600, Robert Redelmeier wrote:

 >>     How can I achieve microsecond-resolution timers in Linux?. I am
 >> using kernel 2.2.14.
 >
 >Very easily, using the `rdtscl()` macro.  This returns the CPU cycle 
 >count since reset on x86 architectures.  

But presumably this is not just the cycles used by the executing process,
but all CPU cycles.

Bob T.

------------------------------

From: "Alan Po" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: Can I create a floppy with a simple Linux?
Date: Wed, 1 Nov 2000 10:26:40 +0800

Thanks a lot! Thanks for the reply.

My main problem is not to get a small Linux distribution. My problem is how
to "create" a small Linux on a floppy by "myself" or "manually". For
example, how to build a root file system on a RAM disk? What is the boot
sequence on a small Linux.

Actually I am a student from HK and request to build an Embedded System on a
floppy. I have studied a lot of Web Site and cannot find a way to do it by
"manually". The most useful web is
http://www.linux-embedded.com/howto/Embedded-Linux-Howto.html but it has not
yet completed. Furthermore, the big problem is how to create a root file
system on a floppy?

Thanks again, Linux is really a good system because the helpful and friendly
experts and open source.

Alan Po
"Alan Po" <[EMAIL PROTECTED]> wrote in message
news:8tmnau$[EMAIL PROTECTED]...
> Dear All
>
> I want to create a simple Linux which boot from a floopy. For this Linux,
I
> only need a shell and simple login. No need to run any other application.
Is
> it possible?
>
> Please give me some advice. Thanks a lot
>
> Alan Po
> [EMAIL PROTECTED]
>
>
>
>



------------------------------

From: [EMAIL PROTECTED]
Subject: Re: System.map problem!
Date: Wed, 01 Nov 2000 02:34:32 GMT

but i dont have a /boot entry in my fstab file. does that mean that i
dont have a boot partition. have i installed my system incorrectly??
kindly me.




In article <[EMAIL PROTECTED]>,
  Kasper Dupont <[EMAIL PROTECTED]> wrote:
> John Hall wrote:
> >
> > This is probably pretty simple;
> >
> > 2 things:
> >
> > First; to overcome lilo limitations, and to "protect" your kernel,
RedHat
>
> Actually it is BIOS limitations.
>
> > cleverly has your system boot from a small [probably 25 megs or so]
> > partition. This partition has to be at the beginning of the hard
disk. The
> > boot partition is mounted in /boot when you're booting up, but then
it is
> > likely unmounted so you can't accidentally make changes to it or
delete it.
>
> Is it really unmounted? That sounds like a stupid idea.
> Remounting read only on the other hand might be a good
> idea, but as long as you don't login as root even that
> wouldn't be necesarry.
>
> > Make sure when you're copying these files to /boot _when it's
mounted_ and
> > not just the "boot" folder in your root partition. Look in
/etc/fstab to see
> > how /boot is mounted. [obviously the first thing you should do is
type mount
> > by itself to see if anything is mounted into /boot]
> >
> [...]
>
> --
> Kasper Dupont
>


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: System.map problem!
Date: Wed, 01 Nov 2000 03:50:32 GMT

I am getting this when booting the new kernel
        NO APM support in kernel        [FAILED]
        delaying eth0 initalization     [FAILED]

and when shutting down
        shutting down NFS mounted       [FAILED]
        shutting down APM mounted       [FAILED]

my old kernel works fine even through the system.map is linked to the
new one!

how to proceed with this?

regards,
Dharan



In article <[EMAIL PROTECTED]>,
  Kasper Dupont <[EMAIL PROTECTED]> wrote:
> John Hall wrote:
> >
> > This is probably pretty simple;
> >
> > 2 things:
> >
> > First; to overcome lilo limitations, and to "protect" your kernel,
RedHat
>
> Actually it is BIOS limitations.
>
> > cleverly has your system boot from a small [probably 25 megs or so]
> > partition. This partition has to be at the beginning of the hard
disk. The
> > boot partition is mounted in /boot when you're booting up, but then
it is
> > likely unmounted so you can't accidentally make changes to it or
delete it.
>
> Is it really unmounted? That sounds like a stupid idea.
> Remounting read only on the other hand might be a good
> idea, but as long as you don't login as root even that
> wouldn't be necesarry.
>
> > Make sure when you're copying these files to /boot _when it's
mounted_ and
> > not just the "boot" folder in your root partition. Look in
/etc/fstab to see
> > how /boot is mounted. [obviously the first thing you should do is
type mount
> > by itself to see if anything is mounted into /boot]
> >
> [...]
>
> --
> Kasper Dupont
>


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: hac <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: Can I create a floppy with a simple Linux?
Date: Wed, 01 Nov 2000 04:18:22 GMT

Alan Po wrote:
> 
> Thanks a lot! Thanks for the reply.
> 
> My main problem is not to get a small Linux distribution. My problem is how
> to "create" a small Linux on a floppy by "myself" or "manually". For
> example, how to build a root file system on a RAM disk? What is the boot
> sequence on a small Linux.
> 
http://www.linuxfromscratch.org/

Tom's rt/bt has instructions on rebuilding new versions.  The tricks
to compress that much onto a floppy make it a bit complicated.  If you
have a CD rewriter, you might start with building a bootable CD
version.  That eliminates the compression steps.  It's easy to make
bootable CD's; just make a boot floppy image and include it with the
"-b" option of mkisofs.

-- 
Howard Christeller  Irvine, CA   [EMAIL PROTECTED]

------------------------------

From: "Daniel Lenski" <[EMAIL PROTECTED]>
Subject: IP Masq Module Writing?
Date: Tue, 31 Oct 2000 23:43:34 +0500

Hi, I'm interested in writing an IP Masquerading Module to handle the
SideCar authentication service used here at Cornell University.  I was
wondering if anyone knows of a good site where I can learn how to write
an IP masq module.  Thanks!

-- 
Daniel Lenski
[EMAIL PROTECTED]

"If we couldn't laugh at things that didn't make sense,
we couldn't react to a lot of the world around us."
   --Calvin and Hobbes

------------------------------

From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: System.map problem!
Date: 1 Nov 2000 07:53:58 GMT

On Tue, 31 Oct 2000 16:51:22 +0100, Kasper Dupont <[EMAIL PROTECTED]> wrote:

>
>Is it really unmounted? That sounds like a stupid idea.
>Remounting read only on the other hand might be a good
>idea, but as long as you don't login as root even that
>wouldn't be necesarry.
>



Normaly it is mounted just like any other file system in /etc/fstab
It needs to be mounted when installing a new lilo loader with
the lilo command, and it needs to be mounted when utilities
reads the /boot/System.map file.  Also, the /boot can, and
often used to be, part of the root file system.


Villy

------------------------------

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: microsecond-resolution timers
Date: Wed, 01 Nov 2000 09:05:45 +0100

Kaz Kylheku wrote:
> 
> On Tue, 31 Oct 2000 19:22:00 -0600, Robert Redelmeier <[EMAIL PROTECTED]> wrote:
> >=?iso-8859-1?Q?C=E9sar?= Espinosa wrote:
> >>     How can I achieve microsecond-resolution timers in Linux?. I am
> >> using kernel 2.2.14.
> >
> >Very easily, using the `rdtscl()` macro.  This returns the CPU cycle
> >count since reset on x86 architectures.
> 
> However, that is not a timer; a timer is some kind of delayed event that
> causes software to take some action.

You cannot do that with standard PC hardware.
I don't think any computer is cabable of
handing an IRQ every microsecond. But there
might exist special hardware that can be
programmed to send an IRQ in n microseconds.
Of course as always the process may at any
time be delayed any amount of time due to
scheduling. If you don't want any interrupts
or signals byt just want to read the timer
the rdtscl() sounds like the best solution
with standard PC hardware.

-- 
Kasper Dupont

------------------------------

From: "Davide" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: Can I create a floppy with a simple Linux?
Date: Wed, 01 Nov 2000 08:27:36 GMT

There is a project called LOAF (linux on a floppy).

I do not have the URL, but you can try to search it on the internet.

Alan Po ha scritto nel messaggio <8tmnau$[EMAIL PROTECTED]>...
>Dear All
>
>I want to create a simple Linux which boot from a floopy. For this Linux, I
>only need a shell and simple login. No need to run any other application.
Is
>it possible?
>
>Please give me some advice. Thanks a lot
>
>Alan Po
>[EMAIL PROTECTED]
>
>
>
>



------------------------------

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: System.map problem!
Date: Wed, 01 Nov 2000 10:36:17 +0100

[EMAIL PROTECTED] wrote:
> 
> but i dont have a /boot entry in my fstab file. does that mean that i
> dont have a boot partition. have i installed my system incorrectly??
> kindly me.
> 
[...]

Probably but not necesarily, a boot partition
can exist and be used for boot without being
mounted on the runing system. You could look
in the partition tables, a summary can be
found in /proc/partitions.

It is not incorrectly to install a system
without a dedicated boot partition, but in
most cases it is best to use a boot partition.

-- 
Kasper Dupont

------------------------------

From: Kasper Dupont <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: Can I create a floppy with a simple Linux?
Date: Wed, 01 Nov 2000 11:08:15 +0100

Alan Po wrote:
> 
> Thanks a lot! Thanks for the reply.
> 
> My main problem is not to get a small Linux distribution. My problem is how
> to "create" a small Linux on a floppy by "myself" or "manually". For
> example, how to build a root file system on a RAM disk? What is the boot
> sequence on a small Linux.
> 
> Actually I am a student from HK and request to build an Embedded System on a
> floppy. I have studied a lot of Web Site and cannot find a way to do it by
> "manually". The most useful web is
> http://www.linux-embedded.com/howto/Embedded-Linux-Howto.html but it has not
> yet completed. Furthermore, the big problem is how to create a root file
> system on a floppy?
> 
> Thanks again, Linux is really a good system because the helpful and friendly
> experts and open source.
> 
[...]

There are many ways to boot Linux from one or
two floppies. Looking at the various existing
floppy based Linux systems can be a help to
understand how it works. If you want to create
such a boot floppy from scratch that is also
possible.

You need:
  A loader
  A kernel
  A root disk

You can put all three parts one on floppy.
Otherwise you can use two floppies, in that
case the first floppy would contain the loader
and kernel and the second floppy would contain
the root disk.

The root disk can either be using the floppy
directly or a ram disk. The ram disk is the
best solution unless you need to use computers
with less than 8MB of ram. If you use the
floppy directly it may never be removed from
the drive.

If the root disk is copied from floppy to
ramdisk, you may create a large ramdisk and
compress it with gzip. The root image is
normally stored either as a file on the first
floppy or raw on the second floppy.

The loader would normally be either LILO,
SYSLINUX or the kernel built-in. The kernel
built-in i think can only be used with a two
floppy system. The kernel is simply copied
raw to the floppy, no filesystem is used.
Configuration of the root image is done using
rdev.

SYSLINUX is used to boot from a FAT floppy.
The floppy must contain the syslinux system
files which is installed using a tool coming
with syslinux. When syslinux is installed
you copy the kernel one or more configuration
files and optionally a root image to the
floppy.

LILO can be used if the first disk is in ext2
format, it should also work with other
formats but I have never seen it used. LILO
can do anything of the above, you could even
use the first disk directly as a root disk,
but that would probably not be a good idea.

LILO is the most flexible, but you must run
the lilo command after each change. With
SYSLINUX you can just modify the configuration
on the floppy.

If you want to be able to permanently save
data with your new system you might consider
a three disk configuration.

Floppy one boots using SYSLINUX, floppy two
contains a compresed root image which during
startup prompts for floppy three which is
then mounted as /home.

Sourcecode and documentation is available
for all the programs mentioned here. For
information about how to create the root
disk and what happens next see my posting
a few days ago:
<URL:news:[EMAIL PROTECTED]>

-- 
Kasper Dupont

------------------------------

From: [EMAIL PROTECTED] (Nick Maclaren)
Subject: Re: Linux API
Date: 1 Nov 2000 10:16:50 GMT

In article <[EMAIL PROTECTED]>,
Christopher Browne <[EMAIL PROTECTED]> wrote:
>
>The <g> should get squared, because The Way To Go is _NOT_ to use the
>Linux source code as "the Linux API."
>
>The Right Thing is to use the documented functions found in GLIBC.
>
>They tend to follow De Jure standards, and are less likely to
>massively change when:
>a) ACLs are let in, and significantly affect the behaviours of
>   permissions; 
>b) Capabilities head in [ditto];
>c) Preferred Default Behaviour becomes to use 64 bit file descriptor
>   values ala LFS.
>
>These and other such things should be left independent of the kernel;
>you shouldn't go directly at the kernel unless you actually _need_ to,
>and if that be the case, then reading _and understanding_ the "massive
>amounts of code" starts to be necessary.

While I support your view, and have been doing so for 30+ years,
a regrettable proportion of modern APIs and even standards are
not usable on their own because they are too vague.  In fact, the
term API was originally (and still is) used to mean that the
syntax and intent would be stated but probably little more.

[ Comments about the C standard, X/Open etc. omitted. ]

However, reading the source doesn't help, in general.  All it
usually tells you is what the current version does, and not which
aspects will remain invariant over future releases.  It CAN tell
you whether a misbehaviour is deliberate or accidental (i.e. a
'feature' or a bug), but that is about all.

>Five years from now, you might be running those programs that use
>GLIBC on your 2000 MIPS 1GB AMD Sledgehammer running Hurd...  :-)

Or 25+ years from now, on architectures that haven't yet been
invented :-)  No, that is neither impossible nor unreasonable.
Been there - done that.

Yes, stick to the specifications - and, if they aren't precise
enough to do the job, pressure the owners of them to improve them!


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email:  [EMAIL PROTECTED]
Tel.:  +44 1223 334761    Fax:  +44 1223 334679

------------------------------

From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: RFI: Linux implementation of tnf tracing system
Date: 01 Nov 2000 11:15:08 +0100

Kaelin Colclasure <[EMAIL PROTECTED]> writes:
> 
>   1) Does something like this already exist for Linux?
> 
>      My primary motivation for contemplating this is that I need the
>      capability under Linux. The excuse/opportunity to delve into the
>      arcane mysteries of kernel hacking is attractive -- but I do have
>      a lot of other demands on my time right now...


There are at least three such facilities already released for Linux (and in 
addition undoubtedly a few more private ones, I've writen at least another
one for the kernel): The IBM dprobes [unfortunately their implementation
of user space probes has a few races left, but the kernel version works 
nicely -- can be found somewhere on oss.software.ibm.com], SGI's ktrace
[minimal but useful multi CPU kernel tracer -- somewhere on oss.sgi.com],
the Linux Trace Toolkit [kernel tracer with GUI frontend, no URL sorry]

I would suggest using of these as base. dprobes looks most promising
because it doesn't need any source changes, but it is a bit tiring to
use currently.

>   2) What is the "right" way to interface clients to the facility?
>      Can we use the same mechanism for user processes and kernel-space
>      clients?

Probably not. In Kernel space you want to write directly into a buffer, but
that's nasty to do from user space due to locking issues. 

>      As I understand it, there are three alternatives for exposing an
>      API to userland from a kernel module: 1) make the tracing
>      facility a device driver, 2) hook into the /proc filesystem, or
>      3) add a new system call to the kernel. I understand that these
>      are not mutually exclusive. What I don't know are the trade-offs
>      between these alternatives. There is a requirement that the (a?)

Device driver with an ioctl is probably the best.

Another possibility would be a shared memory segment 
with a ring buffer per CPU that is only used for user space processes 
(kernel needs a separate  buffer because it should be accessed from 
interrupts and that needs special locking) and does a simple user space l
ocking. Advantage: you can trace without needing relatively costly system
calls. The shared memory segment could be also maintained in the kernel
by supplying an mmap operation to the device driver.

>      Should I just forget the idea the kernel and user TNF_PROBES are
>      going to be able to share the same implementation? Is there a
>      better alternative that I don't know about?

It is certainly possible, but it would be probably more efficient to not
do it.

>   3) Is it reasonable to kalloc a 4MB or larger trace buffer, or do I
>      need to consider a more sophisticated buffering strategy?

You can vmalloc() such a buffer.

>   4) What kind of high-resolution timers or performance counters are
>      available from the Linux kernel?

What the CPU offers -- the time stamp counter or even more performance MSRs.


-Andi


------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to