Linux-Development-Sys Digest #572, Volume #8     Fri, 16 Mar 01 14:13:07 EST

Contents:
  Re: Continuing NFS problems, thru Linux Kernel 2.4.2? (Rex Dieter)
  Re: Continuing NFS problems, thru Linux Kernel 2.4.2? (Rex Dieter)
  Re: detecting cache misses on amd (James Cownie)
  Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER (Grant Edwards)
  Re: syscall parameters length (Kasper Dupont)
  Re: Allocation of task_struct structure (Julien Cavoizy)
  Re: Allocation of task_struct structure (Julien Cavoizy)
  Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER
  Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER
  Re: Processor ID
  Re: Processor ID
  Re: Processor ID (Roberto Nibali)
  Re: System function interrupts ("Joseph A. Knapka")
  Re: boot problem - hanging at LIL-
  Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER (Josef Allen)
  Apology for serial porting problems (Josef Allen)
  Re: ReiserFS vs NFSv3 still trouble? (Philip Armstrong)
  Re: detecting cache misses on amd ("John Burton")
  Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER

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

From: Rex Dieter <[EMAIL PROTECTED]>
Subject: Re: Continuing NFS problems, thru Linux Kernel 2.4.2?
Date: Fri, 16 Mar 2001 08:21:57 -0600

Peter Mardahl wrote:

> Hello,
> 
>   I'm using RedHat linux 7.0, and I'm having problems with NFS locking.
> On startup, I get this error message:
> 
> Starting NFS file locking services:
> Starting NFS lockd: lockdsvc: Invalid argument
>                                                            [FAILED]

It's a bug in your nfs/nfslock startup/init script.  2.4.x kernels now 
launch lockd in a kernel-thread automatically with no need for the init 
script to do it any more.  In short, this error is harmless.


>   However, when a Digital UNIX 4.0D client tries to lock a file on a
> Linux 2.4.2
> NFS server, this problem occurs:
> 
> Mar 12 22:37:54 tesla binmail[29820]: cannot lockf /usr/spool/mail/peterm

What version of nfs-utils are you using?

For the record, I believe NFS only supports POSIX locks via the 
fcntl function... lockf-style locking may not work.

-- 
Rex Dieter
Computer System Administrator
Department of Mathematics and Statistics
University of Nebraska Lincoln

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

From: Rex Dieter <[EMAIL PROTECTED]>
Subject: Re: Continuing NFS problems, thru Linux Kernel 2.4.2?
Date: Fri, 16 Mar 2001 08:25:06 -0600

Stefan Boresch wrote:

> PS: Problem arises between RH 6.2 server<->client, as well as
> between RH 6.2 (server), 

You may have some sort of misconfiguration.  A similar configuration at 
our site works perfectly well.

What version of nfs-utils are you using?  (FYI, the latest from RedHat is 
0.2.1 and the latest from nfs.sourcefouge.net is 0.3.1).

-- 
Rex Dieter
Computer System Administrator
Department of Mathematics and Statistics
University of Nebraska Lincoln

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

From: James Cownie <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.hardware,alt.comp.hardware,alt.comp.hardware.amd.thunderbird,comp.programming
Subject: Re: detecting cache misses on amd
Date: Fri, 16 Mar 2001 14:18:18 GMT


> Denis wrote:
> >
> > i apologize if i crossposted to a ng. where this would be off-topic...
> >
> > can anyone tell me if it is possible, and if it is then, how would one
> > detect the number of cache misses between two points in execution of a
> > program on an amd-k6 processor.... maybe some assembly language
> > hack? any register i could monitor?
> >
> > numbers do not have to be very precise, but fairly close.
> >
> > i looked in amd processor manual, but could not find anything.
> > i mean, is it even feasible to do such a thing? you'd have to keep a
> > register just for this.....
> 

Check out the PAPI home page at http://icl.cs.utk.edu/projects/papi/
they claim to support AMD Athlons, and provide interfaces to many hardware 
performance counters, including cache misses.

-- Jim 

James Cownie    <[EMAIL PROTECTED]>
Etnus, LLC.     +44 117 9071438
http://www.etnus.com

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

From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER
Date: Fri, 16 Mar 2001 15:09:25 GMT

In article <[EMAIL PROTECTED]>, Josef Allen 
wrote:

>I am having problems porting a program from the Visual C++ world to the
>linux world could someone please help

Dude, posting multiple copies of this in multiple newsgroups
is just going to annoy people.

Take a look at the Serial-programming-HOWTO at www.linuxdoc.org
or possibly in /usr/doc/HOWTOS

-- 
Grant Edwards                   grante             Yow!  The SAME WAVE keeps
                                  at               coming in and COLLAPSING
                               visi.com            like a rayon MUU-MUU...

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: syscall parameters length
Date: Fri, 16 Mar 2001 16:02:21 +0000

Mikael Chambon wrote:
> 
> Hi,
> 
> When my system call begin with:
> 
> asmlinkage int sys_toto(int s, int t, t_msig_msg *mesg)
> {
>     if (!mesg)
>     ....
> [..]
> }
> 
> When I try to compile, gcc complains that mesg is not declared
> If I try
> 
> asmlinkage int sys_toto(int s, int t, t_msig_msg *m)
> {
>     if (!m)
>     ....
> [..]
> }
> 
> It's working, does it mean that the parameters can  be too long ??
> There is a limit for parameters length or is it something else ?
> 
> Sorry if I asked too much questions, but that's not easy to start kernel
> hacking..
> 
> with kind regards,
> 
> --
> Mikael Chambon
> [EMAIL PROTECTED] || [EMAIL PROTECTED]
> ICQ 10249913       || http://www.cronos.org

You probably have a name conflict. If there are any
limit on the parameters, it is much larger.

-- 
Kasper Dupont

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

From: Julien Cavoizy <[EMAIL PROTECTED]>
Subject: Re: Allocation of task_struct structure
Date: Fri, 16 Mar 2001 17:06:16 +0100

Thank you very much !!

so if i want to add one of my own structure in the task_struct i have to
allocate it in the do_fork function isn't it ?

Thanks for your help

Julien
[EMAIL PROTECTED]




Michael Mueller a �crit :
> 
> Hi Julien,
> 
> you wrote:
> > i cannot find where everything in the task struct are allocated.
> 
> Most probably not everything within will be allocated at one place.
> However look into do_fork() [kernel/fork.c] which does the
> initialization work. Some task_struct's are defined static, e.g.
> init_task [as part of init_task_union in arch/i386/init_task.c,
> arch/m68k/kernel/process.c,...].
> 
> Malware

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

From: Julien Cavoizy <[EMAIL PROTECTED]>
Subject: Re: Allocation of task_struct structure
Date: Fri, 16 Mar 2001 17:12:31 +0100

Kasper Dupont a �crit :
> 
> Julien Cavoizy wrote:
> >
> > hi,
> >
> > I'd like to add some new things in the process task_struct structure but
> > i cannot find where everything in the task struct are allocated.
> >
> > In which .c file it is ?
> >
> 
> It is not in a .c file it is in a .h file.
> linux/include/linux/sched.h
> 
> Notice that changing this struct will require you
> to recompile your kernel and lots of modules.
> 
> The first fields are as stated in a comment hardcoded
> in assembly code, so insert your own stuff at the end.
> It would be even better to insert it in some structure
> reference from the task struct, if there are any
> resonable choice.

That's what i have done, but i still wondering how to allocate my own
structure for each process. If i do it in the do_fork function, would it
be sufficient?

> 
> Notice that each process have 8KB (2 pages) allocated
> for both this structure and kernel stack, if the
> structure grows too much you might get stack overflows.
> 
> > a second question : Which size have a memory page ? (on an i586
> > processor)
> 
> 4KB.

ok
Thanks very much for your help


> --
> Kasper Dupont


Julien
[EMAIL PROTECTED]

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

From: <[EMAIL PROTECTED]>
Subject: Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER
Date: Fri, 16 Mar 2001 08:19:24 -0800

Dear Josef:
    Tell us where you are in your effort, not just posting the code. Try
answering questions like: 1)Does you code compile, if not, where is it going
awry?  2)If it compiles, can you load it as a driver? 3) If you can load it,
can you access it? 4) If you can load it and access it, what is the problem?



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

From: [EMAIL PROTECTED] ()
Subject: Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER
Date: Fri, 16 Mar 2001 16:56:02 -0000

In article <RXqs6.1$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:

>    Tell us where you are in your effort, not just posting the code. Try
>answering questions like: 1)Does you code compile, if not, where is it going
>awry?  2)If it compiles, can you load it as a driver? 3) If you can load it,
>can you access it? 4) If you can load it and access it, what is the problem?

5) Why are you writing a driver that does things to the serial ports?

--
http://www.spinics.net/linux

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

From: [EMAIL PROTECTED] ()
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Re: Processor ID
Date: Fri, 16 Mar 2001 16:57:25 -0000

In article <[EMAIL PROTECTED]>,
Matt Woodyard  <[EMAIL PROTECTED]> wrote:

>You can't track the MAC addr anywhere but the local lan segment .

Even if you could, the MAC address is easily changed.

--
http://www.spinics.net/linux

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

From: [EMAIL PROTECTED] ()
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Re: Processor ID
Date: Fri, 16 Mar 2001 16:59:38 -0000

In article <98sfdf$de6$[EMAIL PROTECTED]>,
Rolf Magnus  <[EMAIL PROTECTED]> wrote:

>> You can't track the MAC addr anywhere but the local lan segment .

>But it is unique, so it it can be used as your ID.

No, the MAC address is not unique.  Maybe it is supposed to be but reality
doesn't work that way.  Besides, it can be changed.

--
http://www.spinics.net/linux

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

From: Roberto Nibali <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Re: Processor ID
Date: Fri, 16 Mar 2001 18:12:19 +0100

[EMAIL PROTECTED] wrote:
> 
> In article <[EMAIL PROTECTED]>,
> Matt Woodyard  <[EMAIL PROTECTED]> wrote:
> 
> >You can't track the MAC addr anywhere but the local lan segment .
> 
> Even if you could, the MAC address is easily changed.
> 
> --
> http://www.spinics.net/linux

First off, I haven't followed this thread. I just want to drop
in and share some thoughts about your statement, although I 
reckon I'm pretty offtopic herewith.

You correctly state that the MAC address basically is
easily to change, however this is only true for the so
called Station MAC address or the OEM Station MAC address.
The Node Address is not easily changeable since this is
burnt into the PROM. For example the 3com PCI cards under
Linux:

       MAC                  changeable
====================+==========================
    station address | ifconfig ... hw ether MAC ....
OEM station address | vortex-diag -# 1 -D -f -H MAC -w
  3com Node address | not changeable (although there was
                    | a paper on how to do it)

But for the problem you answered you're absolutely right,
even if someone could track down the MAC address, it's 
changed very easily and also done very often for HA systems
to be able to do a faster failover/failback with the same
IP.

... just my 2 cents

Roberto Nibali, ratz

-- 
mailto: `echo [EMAIL PROTECTED] | sed 's/[NOSPAM]//g'`

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

From: "Joseph A. Knapka" <[EMAIL PROTECTED]>
Subject: Re: System function interrupts
Date: Fri, 16 Mar 2001 17:08:37 GMT

Andrzej Stypula wrote:
> 
> Hi everyone,
> I have a little problem in below situation.
> lets consider an example code (standard handler for SIGALRM - return):
> 
>   _Time(timelimit);
>   err=any_system_function_in_blocking_mode(...);
>   _Time(0);
> 
> the 'timelimit' is about 10 - 50 ms.
> 
> the thread or process has slept by scheduler after doing the
> _Time() but before any_system... (is possible?)
> 
>  After timelimit proces got SIGALRM, but process which is running now
>  has hihgher priority, so my process sleep longer.
>  Now, the Q:
>  the any_system... returns with EINTR or my process would be sleep
>  forever?

The next time your process is chosen by the scheduler, the kernel
will deliver the SIGALRM. You will definitely not sleep forever
- in fact you don't sleep at all. Being evicted from the CPU due
to another process being scheduled is -not- the same as sleeping.
If another process is scheduled, your process is still in the
"runnable" state, not the "sleeping" state.

-- Joe
 
> --
> Andrzej Stypula                                  @Home: altair.krakow.pl
> [EMAIL PROTECTED]                     Private Home Domain, Poland
> PGP2.x id: 9AB243A5 ####################################################

-- Joe Knapka
"It was just a maddened crocodile hidden in a flower bed. It could
 have happened to anyone." -- Pratchett
// Linux MM Documentation in progress:
// http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
* Evolution is an "unproven theory" in the same sense that gravity is. *

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

From: [EMAIL PROTECTED] ()
Subject: Re: boot problem - hanging at LIL-
Date: Fri, 16 Mar 2001 17:28:27 -0000

In article <[EMAIL PROTECTED]>,
Brian Horton  <[EMAIL PROTECTED]> wrote:

>Hope someone can help me.. this machine was working fine, and then
>'something happened' and now lilo freezes with: LIL- on boot. Found the
>error description for that and tried everything listed, but nothing
>seems to point to what the problem is. (Error description says: 'The
>descriptor table is corrupt. This can either be caused by a geometry
>mismatch or by moving /boot/map without running the map installer. ')

Have you tried booting from floppy and running lilo again?

--
http://www.spinics.net/linux/

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

From: Josef Allen <[EMAIL PROTECTED]>
Subject: Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER
Date: Fri, 16 Mar 2001 13:15:09 -0500



Josef D. Allen

On Fri, 16 Mar 2001 [EMAIL PROTECTED] wrote:

> Dear Josef:
>     Tell us where you are in your effort, not just posting the code. Try
> answering questions like: 
1)Does you code compile, if not, where is it going awry?

The code does compile

  
2)If it compiles, can you load it as a driver? 
I am no trying as of yet to make the code aprt of the kernel 
However, I am running the application in root mode.
The reason for this is because at this point the code is in C++ not C

3) If you can load it, can you access it? 
        N/A

4) If you can load it and access it, what is the problem?
The problem is that I have a similar driver that is running on window98 OS

When I run both programs using a break out box to see what is happening
electrically this is what I see


When I run the program from the already existing program

1. I get from pin 2 of the DTE to the pin 2 of the DCE a connection.
2. I get from pin 3 of the DTE to the pin 3 of the DCE a connection.
3  I get for the RTS of the DTE a red and I also get a red for the RTS of
   the DCE. Now when I say i get a connection for 1 & 2 I mean that the
   green light is constant where the red light is flickering.(pin 4)
4. I get a green for the DTR for pin 20.
                  


   When I stop the program pins 2,3,4,20 are all green and pins 5,6,7,8,22
   are all red.


Now as you know I have an A/B switch thus when i initially switch back to
the computer that I am running this is what the break out box looks like.

1. 2,3,4,20 are all green for the DCE and DTE resectively.
   5,6,7,8,22 are all red resectively as well.



2. When I run my program on my machine I get the following

3. From pin 2 I have a connection.

4. From pin 3 I have a connection.
5. Now  pin 4 I still have a connection, which is different from the other
   program that is running.(RTS)

6.pins 5,6,7,8,and 22 are all red
 Pin 22 is the RI pin. This pin goes out when the other program is run on
 the other computer.
                              
> 
> 
> 
> 


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

From: Josef Allen <[EMAIL PROTECTED]>
Subject: Apology for serial porting problems
Date: Fri, 16 Mar 2001 13:17:08 -0500

I would like to apologize if I have offended anyone for putting this
message up there so many times. 

I wish to receive help and not insult anyone


Josef D. Allen


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

From: [EMAIL PROTECTED] (Philip Armstrong)
Subject: Re: ReiserFS vs NFSv3 still trouble?
Date: 16 Mar 2001 08:52:26 -0000

In article <[EMAIL PROTECTED]>,
Konstantinos Agouros <[EMAIL PROTECTED]> wrote:
>I just read in German Linux-Magazine, that there shall be problems in the
>combination ReiserFS/NFSv3, is this still true?

Go read the archives of linux-kernel for confirmation but as of 2.4.2
I believe the answer is yes.

Phil

-- 
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt


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

From: "John Burton" <[EMAIL PROTECTED]>
Crossposted-To: alt.comp.hardware,comp.os.linux.hardware,comp.programming
Subject: Re: detecting cache misses on amd
Date: Fri, 16 Mar 2001 18:35:17 -0000

"CBFalconer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Denis wrote:
> >
> > i apologize if i crossposted to a ng. where this would be off-topic...
> >
> > can anyone tell me if it is possible, and if it is then, how would one
> > detect the number of cache misses between two points in execution of a
> > program on an amd-k6 processor.... maybe some assembly language
> > hack? any register i could monitor?
> >
> > numbers do not have to be very precise, but fairly close.
> >
> > i looked in amd processor manual, but could not find anything.
> > i mean, is it even feasible to do such a thing? you'd have to keep a
> > register just for this.....
>
> I rather doubt it, unless the CPU keeps track internally.  A cache
> miss is supposed to be totally transparent, with the only
> difference access time.  No interrupt is generated, unlike virtual
> memory misses.  Even if there is a register, you would have to do
> all sorts of gyrations to read and record it during process/thread
> switching.

Most modern cpus do in fact keep a lot of this information internally.
I'd recommend you asked the same question in comp.lang.asm.x86
(I think that's the name) where the kind of people who know how to
do this sort of thing hang out.



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

From: <[EMAIL PROTECTED]>
Subject: Re: PORTIMG PRBLEMS FOR A DEVICE DRIVER
Date: Fri, 16 Mar 2001 11:12:38 -0800

OK, Josef, it appears to me from your previous post that you probably are
not talking to the hardware via your Linux program, but only through your
windows program.

Now, the fact that you can compile it is good. I would look carefully at the
need for the windows.h include as that might have some side affects in the
Linux environment. Now the next thing is to determine if you are truly
talking to your hardware in your Linux machine. I believe (and others can
jump down my throat if I am wrong) that you need to load your program as a
module using insmod in order to be able to access the uart hardware. See
Alexander  Rubini's book "Linux Device Drivers" for the details on on the
care and feeding of modules including the startup code in init_module, the
cleanup code in cleanup_module and the meaning of the compile time option
__KERNEL__ to access portions of header files for device drivers.




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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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