Linux-Development-Sys Digest #592, Volume #8     Tue, 27 Mar 01 14:13:14 EST

Contents:
  Re: Redirect boot.msg (Kasper Dupont)
  Re: do {.....} while(0); in macro definitions (Lew Pitcher)
  linux shells ("Shaun Troedson")
  Re: UDP Server output limit ("Nick Redshaw")
  a full 30-day evaluation license. ("alberto")
  Re: Too many open files error (Kasper Dupont)
  test (Andrew Kondakov)
  linux driver wtih STREAMS system (Andrew Kondakov)
  Linux kernel firewall and function ip_rcv (Andrew Kondakov)
  cpu scheduling problem ("Simon J")
  v2.4.2 doesn't work with MO SCSI drive :(((( ("Dr. Nikolai P Kostrov")
  I need a detailed documentation about TTY ("jbhuang")
  Re: 4GB memory limit (bill davidsen)
  0-order allocation failed on 2.4.2 (Ed Clarke)
  syscall from within kernel (Dave Grothe)
  Re: aic7xxx is broken in Slackware 7.1 (bill davidsen)
  Re: 2.4.2, loopback, and lockups (bill davidsen)
  Re: a full 30-day evaluation license. (Thomas Zajic)
  Re: test (Thomas Zajic)
  Re: linux driver wtih STREAMS system (Alexander Viro)
  card reports no resuurces (bill davidsen)
  Re: Linux kernel firewall and function ip_rcv ("Rich")

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Redirect boot.msg
Date: Tue, 27 Mar 2001 07:45:42 +0000

Meg Chan wrote:
> 
> How can i redirect the output on system startup (which is saved to boot.msg)
> from tty0 to ttyS0? I'm using a serial terminal and want to see all the boot
> messages on it. Adding the "console" parameter to lilo only causes to print
> "Loading linux........" on ttyS0. But i want to get the rest there too.

This works for me:
append = "console=ttyS0"

I presume you are using the serial parameter,
which redirects all the output from LILO but
not from the kernel. The console parameter
OTOH only redirects output from the kernel,
not from LILO. So you probably need to
specify both.

-- 
Kasper Dupont

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

From: Lew Pitcher <[EMAIL PROTECTED]>
Subject: Re: do {.....} while(0); in macro definitions
Date: Mon, 26 Mar 2001 20:55:18 -0500

Kiran wrote:
> 
> Hi,
> Why do macros coded in the linux kernel usually expand to:
> do {......} while(0);
> form?? why not just :
> {.....} ??
> 
> For eg., quoting a code snippet from spinlock.h,
> #define spin_lock_irqsave(lock, flags)         do { local_irq_save(flags);\
>  spin_lock(lock); } while (0)
> 
> could've been
> #define spin_lock_irqsave(lock,flags) {local_irq_save(flags); \
> spin_lock(lock); }

Well, the do {} while() form permits the macro to be used properly when
invoked with a trailing semicolon. Think of what would happen for each
macro expansion if the invoking statement were:
  if (some_condition)
    spin_lock_irqsave(lock,flags);
  else
    exit(1);

With the do while() form, the macro expansion builds a statement that
would 'absorb' the semicolon. However, with the {} form, the semicolon
would be left trailing the parenthetical statement, and would cause the
compiler to revolt against the 'else' statement that followed ("else
without if"). This is because the else is seperated from it's
corresponding if statement by a full (and empty) statement (the
standalone semicolon).
 



-- 
Lew Pitcher

Master Codewright and JOAT-in-training
Registered Linux User #112576

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

From: "Shaun Troedson" <[EMAIL PROTECTED]>
Subject: linux shells
Date: Tue, 27 Mar 2001 17:57:38 +0930

Does anyone here have expertise with Linux shells and the way they handle
canonical mode requests from the user? It seems they are faking it when a
user requests to go into or out of canonical mode using say "stty -icanon".
I think they are doing this to enable their line editing, which may seem OK
but really is a flimsy way of doing it and can cause problems.



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

From: "Nick Redshaw" <[EMAIL PROTECTED]>
Subject: Re: UDP Server output limit
Date: Mon, 26 Mar 2001 20:54:24 +0100

Yes! Increasing the packet size does help. I managed a throughput of around
600kbps (according to fnetload). However I still need more so will be trying
a 3COM card.

Thank's for the help.

Nick

"Philip Armstrong" <[EMAIL PROTECTED]> wrote in message
news:99cjit$25g$[EMAIL PROTECTED]...
> In article <h9ku6.5378$Bs4.24735@NewsReader>,
> Nick Redshaw <[EMAIL PROTECTED]> wrote:
> >I'm using UDP packets that are 144 bytes long. My application is a UDP
> >packet reflector. As I increase the number of clients that I'm reflecting
to
> >the network output rate rises as expected but then at around 70 clients
> >(which equates to 200kbps according to fnetload) the output drop right
off
> >(30kbps).
> >
> >I looked at ifconfig and found no errors or collisions.
> >
>
> What's the system load like on the server (reflector) when you're
> doing this ? You're sending lots of small packets + realtek cards have
> a horrible interface that necessitates multiple copies being made in
> memory before a packet can be sent to the card. It's possible that
> you're overloading your server without realising it.
>
> If so, then try a better network card.
>
> You could also see what happens to the total throughput if you
> increase the packet size; this would at least give you a better idea
> where the bottleneck was.
>
> cheers,
>
> Phil
> --
> http://www.kantaka.co.uk/ .oOo. public key:
http://www.kantaka.co.uk/gpg.txt
>
>



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

From: "alberto" <[EMAIL PROTECTED]>
Subject: a full 30-day evaluation license.
Date: Tue, 27 Mar 2001 10:48:00 +0200

a full 30-day evaluation license.



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

From: Kasper Dupont <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux,comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Too many open files error
Date: Tue, 27 Mar 2001 10:07:14 +0000

Andrei Ivanov wrote:
> 
> In comp.os.linux.networking Kasper Dupont <[EMAIL PROTECTED]> wrote:
> > Look on the two files: /proc/sys/fs/file-max and
> > /proc/sys/fs/file-nr
> >
> > The first file contains the maximum number of files
> > allowed to be opened on the system. This number can
> > be changed by root.
> >
> > The second file contains three numbers. First the
> > maximum number of file descriptors that have been
> > in use at one time since the system was booted, the
> > second is the number in use now, and the last is
> > the maximum allowed.
> 
> My observations gave me feeling that the 2nd value in fs.file-nr
> actually shows number of UNused (i.e., free at the moment) file
> handles.
> 
> --
> andrei

Yes you are right it is the number of allocated
but curently unused file structures. This means
that this value is the difference between the
largest number of files used and the number of
files used now.

-- 
Kasper Dupont

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

From: Andrew Kondakov <[EMAIL PROTECTED]>
Subject: test
Date: Tue, 27 Mar 2001 12:50:42 +0200

test
-- 
Andrew Kondakov

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

From: Andrew Kondakov <[EMAIL PROTECTED]>
Subject: linux driver wtih STREAMS system
Date: Tue, 27 Mar 2001 13:03:03 +0200

Hello.

I try to develop linux driver with STREAMS system installed in kernel.
I have received STREAMS from www.gcom.com (LiS).
This way I can re-use my Solaris driver in Linux.
Has somebody tried to develop something like this?
And what disadvantages and problems will come using such non-ordinary
Linux driver?

Many thanks.

-- 
Andrew Kondakov

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

From: Andrew Kondakov <[EMAIL PROTECTED]>
Subject: Linux kernel firewall and function ip_rcv
Date: Tue, 27 Mar 2001 13:20:18 +0200

Hi.

SuSe 6.4, 2.2.14

My driver uses function register_firewall() in procedure init_module.
There is function in_check() that is input traffic checking function
in firewall registration table.
There ( in in_check() )I perform some incomming packet parsing. As a
result 
I give incomming
packet to kernel function ip_rcv() if I'm not interested in a packet, or
use
it for my needs. Now the second direction doesn't work since I got 
problem with the first one. My driver hangs system and I see that 
ip_rcv() returns (-1). 
Is there problem to use ip_rcv()?
But I suggest that it's the best way to transfer packet into kernel from
my driver. Am I wrong? Somebody knows some better way?

before ip_rcv() call I make ip_statistics.IpInReceive--;

I'll be very presciated for any help.

-- 
Andrew Kondakov

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

From: "Simon J" <[EMAIL PROTECTED]>
Subject: cpu scheduling problem
Date: Tue, 27 Mar 2001 20:14:08 +0800

Dear Every one:

               I have question about that is given 5 jobs follows:

               Job           Arrival  Time         Burst Time
                1                    0                          3
                2                    2                          6
                3                    4                          4
                4                    6                          5
                5                    8                          2

              using the Round-Robin Scheduling with time quantum 1


              0   job1  1  job1   2  job2   3     job1  4    ??      5
               |______
|_______|_______|________|________|_____________________

               but there has a problem at time 4, when time reach 4, we know
job1 will swap out and at the same time
               job 4 will arrive to ready queue  but job 2 is already wating
in ready queue to execution,
               now the question is which job (job 4 or job 2) will be
execute at time 4 ??


Thank for your help!!



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

From: "Dr. Nikolai P Kostrov" <[EMAIL PROTECTED]>
Subject: v2.4.2 doesn't work with MO SCSI drive :((((
Date: Tue, 27 Mar 2001 20:57:15 +0900

Hello!

I have MO SCSI drive Logitec LMO-1300. This drive works fine with the
kernel 2.2.18. Now I've installed kernel 2.4.2. An attempt to read/write 
files from/to  mounted (vfat) MO results in  memory faults and kernel
dump but it is still possible to read directories.

Does anybody know howto bypass that problem?


Thanks in advance.

Nick



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

From: "jbhuang" <[EMAIL PROTECTED]>
Subject: I need a detailed documentation about TTY
Date: Tue, 27 Mar 2001 22:57:53 +0800

First of all, thank you for your help.

Can you tell me where to find a much detailed documentation about TTY  on
line?
I have checked www.linuxdoc.org, but I am still having troubles in tracing
source codes,
such as tty_io.c and tty_cntl.c

I also need to know all the "flags" and data structure meaning, such as
iflag, cflag, oflag...

Thanks again.




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

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: 4GB memory limit
Date: 27 Mar 2001 17:32:51 GMT

In article <8iLs6.13629$[EMAIL PROTECTED]>,
Ryan Storgaard <[EMAIL PROTECTED]> wrote:

| I am running the 2.4 kernel, and originally compiled support for 64GB of
| memory and then put 6GB of RAM in the box. Linux ran fine, but I have an
| application (unfortunately I'm not at liberty to say what application) that
| upon install said "error, you have support for more than 4GB of RAM". I had
| to recompile with support for only 4GB of RAM and everything went fine. I
| really need this application to support more RAM though.

  You have two issues here. First, the application only supports 4GB of
RAM, and unless you have source that's not going to change. Second, the
application deliberately looks to see how much RAM is in the machine and
then not only won't use it, but won't install. I consider that to be
pretty evil, not to allow other processes to use the memory.

| I'm a sys engineer, not a programmer, so I need some of your insight...

  As a start, try to install with only 4GB of RAM. You should be able to
boot with an option mem=4096 and the program probably won't be able to
tell that there is more physical memory. Once it is installed it may run
just fine, although it will not use more than 4GB.

| If an application was originally developed to support 4GB of RAM, what is
| involved in order to allow it to handle more than 4GB? ( I mean in
| general... is it a simple switch or parameter during the compiling of the
| application or is it a complex rewrite of the entire application ....)

  4GB is pretty much it, unless you go to some odd memory model I
haven't seen supported. More than 4GB for the system, but only 4GB for
the process is the current practice.

| Excuse my programming incompetence and the reference to windoze but in NT,
| for example, NT tells every app that it has access to 4GB of RAM... What
| does linux do (in the 2.4 kernel)?
| 
|  Reason I ask is because the vendor mentioned it wasn't planning on
| supporting more than 4GB of RAM with Linux, and to look for their Windows
| 2000 version to support larger amounts of RAM.... I REALLY don't want to go
| down that road because that would mean I would have to purchase Win2k
| DataCenter Server to handle the RAM... I want to use Linux.

  Are you sure it actually uses >4GB in NT, or just will run in a
machine having that much? I am NOT an NT weenie, but I thought you got
4GB and that was it. Same as Linux. feel free to disagree.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
At LinuxExpo Sun was showing Linux applications running on Solaris.
They don't get it, the arrow points the other way. There's a reason why
there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
religion, a way of life, and only incidentally an operating system.

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

From: [EMAIL PROTECTED] (Ed Clarke)
Subject: 0-order allocation failed on 2.4.2
Date: Tue, 27 Mar 2001 17:43:38 +0000 (UTC)

I just got 660 messages:

        __alloc_pages: 0-order allocation failed.

on 2.4.2.  I'm trying to download the source right now but in the
mean time, should I be panicing?  This showed up right after I
finished catenating a bunch of files to make a single 2941092680
byte file.  At least this time it didn't trash the system completely.

This showed up in dmesg and /var/log/messages, not in the cat command.

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

From: Dave Grothe <[EMAIL PROTECTED]>
Subject: syscall from within kernel
Date: Tue, 27 Mar 2001 11:53:09 -0600


==============87DAFD020A22707F6A7F1644
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

In 2.4.2, some code at the end of <asm/unistd.h> would lead one to think
that certain system calls, such as open, close, read, write, can be
called from within the kernel.

I tried something similar with "mknod" and found that it failed to
understand that the "filename" parameter was a kernel address rather
than a user space address.

Does anyone know what the intent is concerning the use of system calls
from within the kernel itself?  Is it intended that it is not to be
done?  Or is it intended to be OK and there is just a bug that needs
fixing?

Thanks,
Dave

==============87DAFD020A22707F6A7F1644
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
In 2.4.2, some code at the end of &lt;asm/unistd.h> would lead one to think
that certain system calls, such as open, close, read, write, can be called
from within the kernel.
<p>I tried something similar with "mknod" and found that it failed to understand
that the "filename" parameter was a kernel address rather than a user space
address.
<p>Does anyone know what the <i>intent</i> is concerning the use of system
calls from within the kernel itself?&nbsp; Is it intended that it is not
to be done?&nbsp; Or is it intended to be OK and there is just a bug that
needs fixing?
<p>Thanks,
<br>Dave</html>

==============87DAFD020A22707F6A7F1644==


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

From: [EMAIL PROTECTED] (bill davidsen)
Crossposted-To: comp.os.linux.setup
Subject: Re: aic7xxx is broken in Slackware 7.1
Date: 27 Mar 2001 18:06:28 GMT

In article <[EMAIL PROTECTED]>,
Mike Ruskai <[EMAIL PROTECTED]> wrote:
| The aic7xxx driver shipped with Slackware 7.1 (object file dated 6-20-2000
| -  153,576 bytes) is broken, at least for the Adaptec 2842VL.
| 
| It dies with a BRKADRINT error after showing the first attached device.
| 
| The driver shipped with Slackware 7.0 (dated 10-21-1999 - 126,964 bytes)
| works fine.
| 
| Anyone know where updates to this driver are available?

  Kernel source is on www.kernel.org (or ftp.kernel.org) for all
versions. There's a new aic7xxx driver in 2.4.2 and later, which
requires the db database package to compile! Supposedly fixes bugs, runs
faster under load, etc.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
At LinuxExpo Sun was showing Linux applications running on Solaris.
They don't get it, the arrow points the other way. There's a reason why
there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
religion, a way of life, and only incidentally an operating system.

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

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: 2.4.2, loopback, and lockups
Date: 27 Mar 2001 18:12:13 GMT

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

| I have had no trouble doing loopback mounting in 2.4.0.  Has this
| just been broken somewhere on the way to 2.4.1 or 2.4.2?  So far
| I've had no trouble with 2.4.0, but have avoided 2.4.1 because it
| changed the way PPP works to one device and I need more than one
| PPP device.

??? Under what conditions does that happen? I use multiple tunneled PPP
connections, and I don't recall any problems with 2.4.1 (or 2.4.3pre6
for that matter).

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
At LinuxExpo Sun was showing Linux applications running on Solaris.
They don't get it, the arrow points the other way. There's a reason why
there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
religion, a way of life, and only incidentally an operating system.

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

From: [EMAIL PROTECTED] (Thomas Zajic)
Subject: Re: a full 30-day evaluation license.
Reply-To: [EMAIL PROTECTED] (Thomas Zajic)
Date: Tue, 27 Mar 2001 18:15:05 GMT

On 27/03/01, alberto ([EMAIL PROTECTED]) wrote:

> a full 30-day evaluation license.

No, thanks, I think I'll rather have something GPLed today.

Thomas
-- 
=-------------------------------------------------------------------------=
-  Thomas "ZlatkO" Zajic  <[EMAIL PROTECTED]>   Linux-2.2.18/slrn-0.9.6.3pl4  -
-  "It is not easy to cut through a human head with a hacksaw."  (M. C.)  -
=-------------------------------------------------------------------------=

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

From: [EMAIL PROTECTED] (Thomas Zajic)
Subject: Re: test
Reply-To: [EMAIL PROTECTED] (Thomas Zajic)
Date: Tue, 27 Mar 2001 18:15:06 GMT

On 27/03/01, Andrew Kondakov ([EMAIL PROTECTED]) wrote:

> test

<LART>

And your test posting is relevant for Linux system development
because ...? Guess why there's a whole bunch of *.test groups
available, huh?

</LART>

Thomas
-- 
=-------------------------------------------------------------------------=
-  Thomas "ZlatkO" Zajic  <[EMAIL PROTECTED]>   Linux-2.2.18/slrn-0.9.6.3pl4  -
-  "It is not easy to cut through a human head with a hacksaw."  (M. C.)  -
=-------------------------------------------------------------------------=

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

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: linux driver wtih STREAMS system
Date: 27 Mar 2001 13:10:17 -0500

In article <[EMAIL PROTECTED]>,
Andrew Kondakov  <[EMAIL PROTECTED]> wrote:
>Hello.
>
>I try to develop linux driver with STREAMS system installed in kernel.
>I have received STREAMS from www.gcom.com (LiS).
>This way I can re-use my Solaris driver in Linux.
>Has somebody tried to develop something like this?
>And what disadvantages and problems will come using such non-ordinary
>Linux driver?

Does "no chance in hell to get it into the main tree" count as a disadvantage
for you?

-- 
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a better computer" - Dilbert.

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

From: [EMAIL PROTECTED] (bill davidsen)
Crossposted-To: comp.os.linux.networking
Subject: card reports no resuurces
Date: 27 Mar 2001 18:41:08 GMT


I'm still seeing this with the 2.4 kernels, and I can't say that it's
better. A trip to the source code reveals that this is considered so
obvious that no comment was necessary explaining what this means.

I get this on NICs with moderate incoming data load (25-50Kbit), and I
would understand "card reports no RX buffers" if that were the case. But
since I can't determine what resource is low, it's really hard to
improve the situation. There's lots of (free) memory, increasing the
buffers in /proc/sys/net/core doesn't help, and the code looks as if
it's a return from the card itself, not an o/s thing at all.

PS: Telling me that the "no resources" status (0x0008) is set is NOT a
help, I need to know what steps will give the card or driver what it
needs to keep up.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
At LinuxExpo Sun was showing Linux applications running on Solaris.
They don't get it, the arrow points the other way. There's a reason why
there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
religion, a way of life, and only incidentally an operating system.

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

From: "Rich" <[EMAIL PROTECTED]>
Subject: Re: Linux kernel firewall and function ip_rcv
Date: Tue, 27 Mar 2001 19:09:09 GMT

In article <[EMAIL PROTECTED]>, "Andrew Kondakov"
<[EMAIL PROTECTED]> wrote:

> Hi.
> 
> SuSe 6.4, 2.2.14
> 
> My driver uses function register_firewall() in procedure init_module.
> There is function in_check() that is input traffic checking function in
> firewall registration table. There ( in in_check() )I perform some
> incomming packet parsing. As a result  I give incomming packet to kernel
> function ip_rcv() if I'm not interested in a packet, or use it for my
> needs. Now the second direction doesn't work since I got  problem with
> the first one. My driver hangs system and I see that  ip_rcv() returns
> (-1).  Is there problem to use ip_rcv()? But I suggest that it's the
> best way to transfer packet into kernel from my driver. Am I wrong?
> Somebody knows some better way?
> 
> before ip_rcv() call I make ip_statistics.IpInReceive--;
> 
> I'll be very presciated for any help.
> 


could you provide a snippet of the code for your in_check() function? It might clear
things up a bit?

Rich

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


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