Linux-Development-Sys Digest #571, Volume #8     Fri, 16 Mar 01 09:13:12 EST

Contents:
  Re: cvs modules vs. directories (Kenneth P. Turvey)
  Re: Processor ID (Rolf Magnus)
  PF_PACKET question... (Wouter De Maere)
  Re: cvs modules vs. directories ("Joseph A. Knapka")
  Re: Allocation of task_struct structure ("Michael Mueller")
  Re: system call interface to insmod (Kasper Dupont)
  Re: (LESS HUGE) Re: Do I need Lilo to boot from a partition? (F. Heitkamp)
  Re: Unexpected scheduler behaviour ? ("Slawek Grajewski")
  Re: (LESS HUGE) Re: Do I need Lilo to boot from a partition? ("Eric")
  syscall parameters length ("Mikael Chambon")
  Re: detecting cache misses on amd (CBFalconer)
  System function interrupts (Andrzej Stypula)

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

From: [EMAIL PROTECTED] (Kenneth P. Turvey)
Subject: Re: cvs modules vs. directories
Date: Thu, 15 Mar 2001 23:19:31 -0600

On Thu, 15 Mar 2001 21:56:40 GMT, Bill Alexander <[EMAIL PROTECTED]> 
wrote:
>Hi.
>
>We are slowly but surely migrating our development efforts away from Windows
>onto a UNIX/Linux platform.  The first step is to start using UNIX like
>tools.  We are using WinCVS to as our library tool to develop some driver
>code and I was wondering if it is best to organized a multi-directory
>project into multiple modules, or just one module with multiple directoies.
>Since we all VSS users, we are a getting used to the CVS way of doing things
>(although we do find it hard to think of a "check out" as not having
>exclusive write access to a file -- that will pass in time, I'm sure).

Another poster answered your questions quite well so I won't do so
again, but I do have a couple quick notes for you on migrating Visual
Source Safe users to CVS.  

Don't run CVS on a Windows box.  It really isn't worth the hassle.  It
is flaky and the windows users will blame CVS and not the poor
implementation of POSIX on the Windows box.  

The windows users may like the graphical interface that they get with
WinCVS, but they really need to know the basic command line interface.
There are things you just can't do from WinCVS.  If you have a
librarian or something along that line in your company some of these
tasks might be made part of their job.  At first this will take quite a
bit of time.  If the programmers are sharp and willing to learn software
that doesn't have a GUI, much of it can be handled by them. 

Visual Source Safe has a very good visual diff program incorporated into
it.  I couldn't really find anything comparable for CVS.  One user I was
working with, in particular, made himself a complete headache over this
one feature.  He couldn't read the output from diff and refused to learn
what a diff file was.  

Based on the message above your developers are moving to a Unix platform
for development as well.  This being the case you probably don't have
Microsoft groupies working with you.  You may not face the same internal
resistance I did.  CVS does have a few weaknesses, but I think most
people reading this group that are familiar with both products would
recognize which is a better solution. 

Please post a message in a few months letting us know how the migration
is going.  I'm sure there are others that would be interested.  

-- 
Kenneth P. Turvey <[EMAIL PROTECTED]> 
========================================================
  Reasonable people adapt themselves to the world.  Unreasonable people
  attempt to adapt the world to themselves.  All progress, therefore,
  depends on unreasonable people.  -- George Bernard Shaw

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

From: Rolf Magnus <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Re: Processor ID
Date: Fri, 16 Mar 2001 08:35:42 +0100

Matt Woodyard 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. The CPU-ID can not even 
be tracked over any network, but it's also a unique ID.

> Most hardware vendors don�t supply developers with API's that allow people
> to track transactions by hardware part numbers over the internet. That�s
> about the last thing we need, next you'll have processor specific
> liscenses and "dongling".

And what is Microsoft currently doing with Windows XP?



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

From: Wouter De Maere <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking
Subject: PF_PACKET question...
Date: Fri, 16 Mar 2001 08:30:58 +0100
Reply-To: [EMAIL PROTECTED]


Hi,

Does anybody know whether I can connect a PF_PACKET
socket to a normal pseudo terminal ???

The idea is that I want to use the pseudo terminal in
packet mode (bidirectional).
I assume that a this packet mode socket should allow me
to do this, similar as on Solaris, with the getmsg() and
putmsg() system calls.

Thanks in advance for your help !

Wouter.


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

From: "Joseph A. Knapka" <[EMAIL PROTECTED]>
Subject: Re: cvs modules vs. directories
Date: Fri, 16 Mar 2001 07:17:07 GMT

"Kenneth P. Turvey" wrote:
> 
> Visual Source Safe has a very good visual diff program incorporated into
> it.  I couldn't really find anything comparable for CVS.  One user I was
> working with, in particular, made himself a complete headache over this
> one feature.  He couldn't read the output from diff and refused to learn
> what a diff file was.

The "cvsweb" CVS-to-WWW gateway has a visual-diff function that's
pretty nice. Of course, you'd have to run an HTTP server on the
CVS archive machine to use it. cvsweb can be found here:

http://stud.fh-heilbronn.de/~zeller/cgi/cvsweb.cgi/

-- 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: "Michael Mueller" <[EMAIL PROTECTED]>
Subject: Re: Allocation of task_struct structure
Date: Fri, 16 Mar 2001 09:02:19 +0100

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: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: system call interface to insmod
Date: Fri, 16 Mar 2001 10:37:22 +0000

[EMAIL PROTECTED] wrote:
> 
> On Tue, 13 Mar 2001 23:01:39 GMT Joseph A. Knapka <[EMAIL PROTECTED]> wrote:
> 
> | Norm Dresner wrote:
> |>
> |> Have you tried it.  Even if it's not allowed, you're not likely to destroy
> |> the computer.
> |
> | He's asking *if* there even *is* such an API. Hard to experimentally
> | call an API when you have no idea what its interface looks like.
> |
> | Jothi, you can always do
> |
> |    system("modprobe my_module");
> 
> Or better yet:
> 
>     strace modprobe my_module
> 
> and find out what the syscall is.
> 

Its not a single syscall its a hole bunch of them.
I just tried "strace insmod romfs.o". 32 calls of
query_module(), 1 call of create_module() and
init_module(). And then it also does all the symbol
resolving, which you cannot see with strace.

I suggest you just call modprobe, unless what you
want to do is rewrite modprobe. If you want to
write your own module loader, get the source for
modprobe and see what it does.

Even the kernel module loader just creates a new
process and then executes modprobe.

> | HTH,
> |
> | -- Joe
> |
> |> If you're going to do systems programming, you've got to learn to
> |> experiment.
> |>
> |>     Norm
> |>
> |> Jothi P Neelamegam <[EMAIL PROTECTED]> wrote in message
> |> news:[EMAIL PROTECTED]...
> |> > Hi All,
> |> >
> |> > Is there a system call interface to insmod - i.e. can I insmod a module
> |> > from inside a c program, rather than from console.
> |> >
> |> > Thanks
> |> > Jothi
> |> >
> |> >
> 
> | -- Joe Knapka
> | "It was just a maddened crocodile hidden in a flower bed. It could
> |  have happened to anyone." -- Pratchett
> 
> --
> -----------------------------------------------------------------
> | Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
> | [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
> -----------------------------------------------------------------

-- 
Kasper Dupont

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

Crossposted-To: comp.os.linux.misc
From: [EMAIL PROTECTED] (F. Heitkamp)
Date: Fri, 16 Mar 2001 07:38:09
Subject: Re: (LESS HUGE) Re: Do I need Lilo to boot from a partition?
Reply-To: [EMAIL PROTECTED]

In message <98i8e5$md6$[EMAIL PROTECTED]> - "Eric" <[EMAIL PROTECTED]>
writes:
>
SUMMARY:  2.4.x kernels do not boot off drives /dev/sdb1,
but do boot off /dev/sdc1.  The "no setup signature found"
message is displayed. 2.2.x kernels boot fine off 
of /dev/sdb1 using the same LILO config file and setup.
The 2.4.x kernels boot fine when installed to a floppy disk.
The 2.4.x kernels are installed using make bzlilo for the
hard disk and make bzdisk for the floppy.  The computer is
a 650 Athlon Slot A, with ABIT KX133 MB and Symbios 53c875
all SCSI system.  Drive 0 /dev/sda does not have Linux.  It
has win98 and OS/2 and a big Linux data partition. Drive
1, /dev/sdb, has the offending Linux setup.  Drive 2 (/dev/sdc)
has a Debian setup that boots fine with the same kernel 
installed via make bzlilo, on it.  LILO is booting from the 
individual partitions. OS/2 Bootmanager is used as the primary
boot loader.

>Just one thing,
>I checked one of your old posts,
>lilo.conf had *no* entry for a 2.4 kernel.
>You are aware of that?
>(I know you said it is the default option, but please check again)
>So: Are you sure the new kernel is at /vmlinuz
>
Yes.

>> >I have another idea for you, if you can, try to change the boot-order.
>> >See if you can boot linux directly, without the intervention from
>> >another OS's bootloader.
>>
>> How do I do that?
>
>Change the boot order in the BIOS.
>Set it to boot from the linux disk.

I haven't tried this yet.

>>
>> LILO
>> Loading default.........................
>> ... no setup signature found.
>> Then the system hangs.   I'm not sure of the exact number of dots.

I tried making the kernel as small as possible.  I got it down to
a smaller size than the 2.2.xx kernel that boots.  Still no change,
although I did notice a smaller number of dots preceeds the 
"no setup signature found" message.  The number of dots must have
something to do with the size of the kernel.

I also checked to make sure the 2.2.14 kernel still boots using 
LILO...It does.
>
>You're done with LILO.
>It looks like the kernel image itself has a problem.

I think so too.  Either it's the kernel or some funky
interaction with the kernel and my harddisk or the way
the memory is when LILO tries to load off that disk.
I have no idea why it would be different.

>It is odd though that it does boot at another system.
>Does that system have the same physical setup?

It's the same computer.  The Debian partition is on a
older SUN 4.2 GB disk.  The disk is /dev/sdc.

>
>Perhaps you should try to run `badblocks` on hdb.

I haven't tried that yet either.
>
>I really don't know what the message means, but you I can
>tell it comes from the kernel

Yep.  I've poked around the kernel sources.  It seems the next 
step might be to look at the disassembly of the kernel code that 
causes the roblem.  If there is a kernel guru out there that can 
et me started, please help.
>
>(PS. this is for a 2.2.x kernel, maybe things changed for 2.4, but it
>appears to be a check,

I looked at the kernel code.  It seems setup.S was translated from
as86 to gas format but is otherwise the same AFAIK.  This is the code
block the checks the signature:


/* Signature words to ensure LILO loaded us right */
#define SIG1    0xAA55
#define SIG2    0x5A5A

INITSEG  = DEF_INITSEG          # 0x9000, we move boot here, out of the way
SYSSEG   = DEF_SYSSEG           # 0x1000, system loaded at 0x10000 (65536).
SETUPSEG = DEF_SETUPSEG         # 0x9020, this is the current segment
                                # ... and the former contents of CS

DELTA_INITSEG = SETUPSEG - INITSEG      # 0x0020

<snip and snip>

# Set %ds = %cs, we know that SETUPSEG = %cs at this point
        movw    %cs, %ax                # aka SETUPSEG
        movw    %ax, %ds
# Check signature at end of setup
        cmpw    $SIG1, setup_sig1
        jne     bad_sig

        cmpw    $SIG2, setup_sig2
        jne     bad_sig

        jmp     good_sig1

<snip snip>

If the compares fail then the "no setup signature found"
message prints.  To debug this I need to find out whats
in setup_sig1 and setup_sig2 for a start.  I don't know 
how to do that though.  

>run a `make mrproper`
>**beware the .config file is removed! You will need to run the entire
>configuration again**
>then rebuild your kernel again, and try that new kernel.

Tried that.  Still the same thing happens.


Fred


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

From: "Slawek Grajewski" <[EMAIL PROTECTED]>
Subject: Re: Unexpected scheduler behaviour ?
Date: Fri, 16 Mar 2001 13:41:15 +0100

Hi,

Linux scheduler favours tasks, which were blocked, and become ready, over
the tasks which do perform CPU
intensive operations (are always ready like yours utility, which never
blocks). Run-time priority of a task which consume a lot of CPU is gradually
degradated as the usage of CPU is recored to favor other applications, which
are not so CPU intensive.
This gives expected results, when your for example run on a computer the
program like your utility (some sort of endless loop without blocking calls)
concurrently with editor like emacs. When you hit the key, editor is
immediately ready (is favored over the utility), giving you good response
time. This behaviour may or may not be what you like/expect, but proves to
be reasonable for most Linux applications.

Slawek

"Pieter Thysebaert" <[EMAIL PROTECTED]> wrote in message
news:98npo6$nmr$[EMAIL PROTECTED]...
> Don't know if this the right group but anyway, here goes :
>
> I'm trying to time some CORBA-related code in function of CPU load as
> follows :
>
> On the computer the servant is located , I run a self-written utility that
> uses processor time - all it does is execute a loop with floating-point
> instructions followed by a usleep() , and these things are themselves
> contained within an infinite loop.
>
> I run the client o nanother computer.
> This client calls the same function on the servant object 1000 times, and
> measures how long each call takes.
>
> In the end it divides the accumulated time by 1000 to get an estimate of
> the average time a call needs.
>
> So what I do is execute the utility, specifying the number of iterations
> for the inner loop on  the command line, when the servant is still idle
> (no function called), then start the client.
>
> (Running the utility with higher numbers will increase the cpu load)
>
> Now I would expect that the average time for one call increases as the cpu
> load increases.
>
> However, when reaching about 40% load, the time just drops back to its
> initial value i.e. the time it takes to handle a call when no extra
> cpu-load is generated using my utility. (and stays there for loads > 40
> %...)
>
>
> So it seems that at some point, the utility is suppressed in favour of the
> servant object's methods....
>
> I have really no clue as to why this is happening...
>
> Is there some kind of scheduling policy I am not aware of ?
>
> This is Debian 2.2 Linux, using TAO as my orb.
>
> The "load values" are just taken from top's output (as load = 100 -
> "idle"-value - that's good enough for me)
>
>
> Pieter
>



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

From: "Eric" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: (LESS HUGE) Re: Do I need Lilo to boot from a partition?
Date: Fri, 16 Mar 2001 14:14:58 +0100

> SUMMARY:  2.4.x kernels do not boot off drives /dev/sdb1,
> but do boot off /dev/sdc1.  The "no setup signature found"
> message is displayed. 2.2.x kernels boot fine off
> of /dev/sdb1 using the same LILO config file and setup.
> The 2.4.x kernels boot fine when installed to a floppy disk.
> The 2.4.x kernels are installed using make bzlilo for the
> hard disk and make bzdisk for the floppy.  The computer is
> a 650 Athlon Slot A, with ABIT KX133 MB and Symbios 53c875
> all SCSI system.  Drive 0 /dev/sda does not have Linux.  It
> has win98 and OS/2 and a big Linux data partition. Drive
> 1, /dev/sdb, has the offending Linux setup.  Drive 2 (/dev/sdc)
> has a Debian setup that boots fine with the same kernel
> installed via make bzlilo, on it.  LILO is booting from the
> individual partitions. OS/2 Bootmanager is used as the primary
> boot loader.
>
> >> LILO
> >> Loading default.........................
> >> ... no setup signature found.
> >> Then the system hangs.   I'm not sure of the exact number of dots.


> I looked at the kernel code.  It seems setup.S was translated from
> as86 to gas format but is otherwise the same AFAIK.  This is the code
> block the checks the signature:
>

Just one thing

I suppose you've read the /usr/src/linux/Documentation/Changes?
You did upgrade everything that was mentioned in there?

If so I'm really at my wits end.
You should perhaps try a new posting in a kernel related group.
(try mlist.linux.kernel)

Eric





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

From: "Mikael Chambon" <[EMAIL PROTECTED]>
Subject: syscall parameters length
Date: Fri, 16 Mar 2001 14:38:52 +0100

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



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

From: CBFalconer <[EMAIL PROTECTED]>
Reply-To: [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 13:46:57 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.....

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.

Even keeping track of execution time vs instruction timings would
probably fail, because of out-of-order execution, which would mask
many misses.  If you want the practical effects, you could run the
program from start to completion under a debugger, recording the
actual instructions executed (or rather their total nominal
timing), and then rerun measuring actual timing.  The difference
would show effective misses, including virtual, for *that
particular run*.  Making sure program input is totally unchanged
between runs is not trivial.

Highly negative, I realize.  If I have my head up and am wrong I
would like to hear about it.  The only method I could think of
would be to have a *complete* CPU simulator running in a
*complete* environment simulator.

-- 
Chuck F ([EMAIL PROTECTED]) ([EMAIL PROTECTED])
http://www.qwikpages.com/backstreets/cbfalconer
   (Remove "NOSPAM." from reply address. my-deja works unmodified)
   mailto:[EMAIL PROTECTED]  (for spambots to harvest)



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

From: Andrzej Stypula <[EMAIL PROTECTED]>
Subject: System function interrupts
Date: Fri, 16 Mar 2001 14:50:06 +0100

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?

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

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


** 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