Linux-Development-Sys Digest #98, Volume #8      Thu, 24 Aug 00 06:13:15 EDT

Contents:
  Cross-compiler for powerpc-motorola-vxworks (Vincent Hamrick)
  Re: Cross-compiler for powerpc-motorola-vxworks (Vincent Hamrick)
  Re: Kernel compiling: I need an expert:) (Karl Heyes)
  Re: kernel_thread -- What does it do? (Karl Heyes)
  Re: Kernel panic: VFS: (Karl Heyes)
  Re: application level vs kernel level coding ? (Karl Heyes)
  Re: does linux kernel support POSIX_aio (Karl Heyes)
  Re: Cross-compiler for powerpc-motorola-vxworks (OSguy)
  Embedded linux ("David")
  Re: Network Device Driver Question (Kevin Kaichuan He)
  Re: Linux server to hold thousands of tcp connections? 
([EMAIL PROTECTED])
  Re: Linux server to hold thousands of tcp connections? ("Laurens Holst")
  Re: all threads in a process share the same pid? (Tony Gale)
  CVS install. blues (Stein Magne =?iso-8859-1?Q?Bj=F8rklund?=)

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

From: Vincent Hamrick <[EMAIL PROTECTED]>
Crossposted-To: gnu.gcc.help
Subject: Cross-compiler for powerpc-motorola-vxworks
Date: Thu, 24 Aug 2000 00:39:02 GMT

I was able to build the bintools (2.8.1?) for powerpc-motorola-vxworks
but was unable to build gcc (2.9.1?) for the same.  Unsure of the
versions since I did this at work.  Anyone have any info on how to build
this?

Thanks in advance,
-V


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

From: Vincent Hamrick <[EMAIL PROTECTED]>
Crossposted-To: gnu.gcc.help
Subject: Re: Cross-compiler for powerpc-motorola-vxworks
Date: Thu, 24 Aug 2000 00:46:15 GMT

Sheesh, no information whatsoever - I should know better than that.
binutils was 2.9.1 and gcc was 2.8.1.  The error when trying to configure
gcc was "unsupported combination" (powerpc-motorola-vxworks).  I need to
try 2.95.2, but my general question was supposed to be "has anyone gotten
this combination to work?", followed by a "how did you do it?"

Thanks again,
-V


Vincent Hamrick wrote:

> I was able to build the bintools (2.8.1?) for powerpc-motorola-vxworks
> but was unable to build gcc (2.9.1?) for the same.  Unsure of the
> versions since I did this at work.  Anyone have any info on how to build
> this?
>
> Thanks in advance,
> -V


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

From: Karl Heyes <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup
Subject: Re: Kernel compiling: I need an expert:)
Date: Thu, 24 Aug 2000 02:46:12 +0000

In article <[EMAIL PROTECTED]>, Paul Pygeon
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I've tried to compile a 2.4.0-test6 kernel and everything works fine
> until I tried to make modules. At this time I've the message below.
> 
> Also, if I try to boot with my new kernel, I get this message:
> "Warning: unable to open an initial console

This is because you have removed the console code when you rebuilt the
kernel.  It's only a warning, but not very helpful if you are trying it out.
check you config. I'm guessing the virtual console stuff.

> Kernel panic: No init found. Try passing init=option to kernel"

This is the showstopper. init is the first process in UNIX terms usually 
located in /sbin. either something is overriding it (odd but possible, check
the parameters you are passing to the kernel eg lilo.conf), or you maybe
mounting the wrong partition on /. It still maybe a valid filesystem (eg ext2)
just not one with an init program where it's expecting it.  You can use rdev
for this.

karl
 

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

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: kernel_thread -- What does it do?
Date: Thu, 24 Aug 2000 03:14:35 +0000

In article <yMpo5.747$[EMAIL PROTECTED]>, Chetan Ahuja
<[EMAIL PROTECTED]> wrote:
>   Hi,
>      I'm trying to understand what kernel_thread function exactly does. 
> I see it being used in various places in the kernel... mainly for
> starting userland processes ( e.g init() from main.c). Why exactly is it
> done this way. And what the hell IS a kernel_thread ?? I mean, what kind
> of memory is reserved for a kernel thread.... what is the life-cycle of
> a kernel thread... that sort of thing. There seems to be absolutely
> nothing about it in the sources or even the online sources I could find.
> Is it defined anywhere clearly...??

I'm no expect on this but the general info on this is. The kernel_thread
function creates a process-like context in which a piece of kernel code will
run. Normally kernel code is invoked via system calls (eg read) or through
interrupts (eg timers, hardware). This shows thread shows up in the ps 
list.  The thread has access to the kernel memory for sure, this enables
entities like kflushd/kswapd (they need access to the buffers/page-cache/
other kernel structures). 

The lliffe cyvle is whatever is requires. kflushd/kswapd exist all the time, or 
should do :-) but kmod for instance doesn't. kmod is similar to the init
thread. a thred is created then a execv call is used.
 
init becomes /sbin/init
kmod becomes /sbin/modprobe
 
kernel threads are not used excessively. only the kernel creates them. They
are certainly not visible from userspace 

A kernel thread is more or less the same as a normal userspace (shows up
in ps type)  thread but with special priviledges. If I recall correctly it even
uses the clone system call, differing in some parameters.

karl.


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

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: Kernel panic: VFS:
Date: Thu, 24 Aug 2000 03:23:17 +0000

In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Koch) wrote:
> Hello all,
> 
> I have trouble on recompiling a kernel, ie. when boot a system with the
> new kernel, a message "Kernel panic: VFS: Unable to mount root fs on
> 08:02" is displayed and freez.
> 

I'm guessing that is trying to mount /dev/sda2 on /

use rdev on the [b]zImage or pass root= option when
booting.  There isn't any config opton for this, the build scripts
take you current root partition as the one intended unless you've
editing the ROOT_DEV macro in the Makefile.

> I use Slackware 7.0, kernel 2.2.13.
> 
> I think it is my wrong configuration to a file .config that caused the
> trouble.
> 
> Could anybody give me answers for questions:
> 
> Q1. What item or option shuld I select? Q2. Is there any good document
> or book for correct
>     configuration("help" for each item is a little bit hard to
>     understand for me. I'd like to understand meaning of each item.)?

I usually use make menuconfig which has access to the help texts, but not
all options are documented.

karl

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

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: application level vs kernel level coding ?
Date: Thu, 24 Aug 2000 03:37:29 +0000

In article <8nrj6l$kbs$[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
> in writing network programs (tcp/ip programming) one can write
> application level code or kernel code ?
> 

The TCP/IP stack is in the kernel not the network programs

> what are the differences between them and their advantages and
> disadvantages ? if this is too academic please point me relevant
> resources where i could get more info on this.
> 

The is touching on the IE intergration into OS business with MS.  The
kernel is the engine for resource handling of the computer, and as
such you want it as simple as possible. Which easier said than done!

The kernel should provide service only, eg cache, access rights etc
and allow utilities and applications to do more human-orientated tasks

When a program goes belly up. it is possible to recover, but when the
kernel goes belly up then panic!!   IE in win98 was purely a marketing
ploy not a technical one.

> thanks all [EMAIL PROTECTED]
>

karl


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

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: does linux kernel support POSIX_aio
Date: Thu, 24 Aug 2000 03:54:05 +0000

In article <8nihrr$3i5$[EMAIL PROTECTED]>, "benjamin grant"
<[EMAIL PROTECTED]> wrote:
> windows kernel can support Async IO,when read or write aviliable ,
> threads can get sig from message queue. does linux can do this?
> 

posix async io is handled by glibc  I not sure how well it performs/scales
as I have nothng to test it with.  I suspect 2.4 series might be more 
interesting in that regard. the tux webserver proved rather effective at
using signal IO queues.

karl.


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

From: OSguy <[EMAIL PROTECTED]>
Crossposted-To: gnu.gcc.help
Subject: Re: Cross-compiler for powerpc-motorola-vxworks
Date: Wed, 23 Aug 2000 22:03:05 -0500

Vincent Hamrick wrote:

> Sheesh, no information whatsoever - I should know better than that.
> binutils was 2.9.1 and gcc was 2.8.1.  The error when trying to configure
> gcc was "unsupported combination" (powerpc-motorola-vxworks).  I need to
> try 2.95.2, but my general question was supposed to be "has anyone gotten
> this combination to work?", followed by a "how did you do it?"

I was able to get binutils-2.9.1 and gcc-2.95.1 working with VxWorks just
fine by just making the crosscompiler by the crosscompiler-HOWTO and linking
the VxWorks object modules on a Redhat-6.1 system.  The target I used was
powerpc-eabi (AFAIK powerpc-motorola-vxworks is not a valid target, just
powerpc-eabi, or powerpc-elf), and this worked just fine on our custom 860
Powerpc board.  gcc-2.95.2 should work fine since this is (or was) the
compiler provided with Tornado II/VxWorks environment.  Keep very much in
mind that a lot of the improvements in gcc and binutils came from Windrivers'
contribution back to the open source community with VxWorks.

Hope this answers your question...




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

From: "David" <[EMAIL PROTECTED]>
Subject: Embedded linux
Date: Thu, 24 Aug 2000 03:36:23 -0400

Is anyone here working on any embedded Linux systems?  If so, what
do you use?

Thanks,
David




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

From: Kevin Kaichuan He <[EMAIL PROTECTED]>
Subject: Re: Network Device Driver Question
Date: Thu, 24 Aug 2000 00:51:26 -0700


On Wed, 23 Aug 2000, Greg Parrott wrote:

> I have a couple of questions relating to network device drivers:
> 
> 2) We are building an ASIC that will implement the TCP/IP stack in silicon.  I
> need to be able to write a device driver that will allow both a hardware stack
> and the existing software stack to coexist.  Do I simply replace the existing
> "socket" calls in the struct proto to do a bit of packet snooping and determine
> whether to forward to the traditional stack or route directly to my hardware?
        Most likely you will need to write your own "Socket" code to
interface Hardware TCP/IP ASIC aware application with your hardware. For
the sending path , your "socket" code can choose directly forwarding
packet to the ASIC or forward it to the software stack;  for the receiving
path, your hardware driver should pass data stream directly to your
"socket" code.  You can install a hardware ACL(access control list) or
filter to channel certain traffic to the software stack as well.


kevin


> 
> Thanks!
> 
> --
> Greg Parrott
> Lucent Technologies
> Optical Area Networking
> (919) 838-6095
> mailto:[EMAIL PROTECTED]
> http://www.opticalareanetworks.com
> 
> 
> 
> 


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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.networking,comp.protocols.tcp-ip
Subject: Re: Linux server to hold thousands of tcp connections?
Date: 24 Aug 2000 08:00:25 GMT

In comp.protocols.tcp-ip [EMAIL PROTECTED] wrote:
> In comp.os.linux.development.system J R <[EMAIL PROTECTED]> wrote:

> | I am building an IM server for LINUX that will accept connections and
> | hold them open for asyn communication (very much the same as AOL).  I
> | need some ideas about how to go about this.
...
> The limit is the number of file descriptors available, usually 1024 or
> maybe 4096, but this can be changed though things could begin to get
> slow at that point since I believe they are not searched using methods
> that are good at that scale.  OTOH, that many open could be slow on the
> whole system even if spread over a number of processes.  I'm just not
> sure and hopefully a kernel guru will reply.

and don't forget to buy memory. Every open TCP socket will consume something
from 8K to 64k (depending on your system defaults), even more if window
scaling is on.

-- 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|  Hans-Peter Huth                         Phone: +49 89 636 430 71 |
|  Siemens AG, Dept. ZT IK 2               FAX:   +49 89 636 51115  |
|  Otto-Hahn-Ring 6          E-mail: [EMAIL PROTECTED]|
|D-81730  Munich       http://alpha.mchp.siemens.de (insiders only) |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IK 2 Internet Mobility. Wir sind schon drin!
======================== cut here 8< ================================

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

From: "Laurens Holst" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.protocols.tcp-ip
Subject: Re: Linux server to hold thousands of tcp connections?
Date: Thu, 24 Aug 2000 10:15:30 +0200

> > Will the performance decrease significantly when connections wave up to
300
> > thousand or so?
>
> You can't sustain 300,000 TCP connections on any operating system I
> know of.

I think it can be done if you program everything in Assembly. However, this
is a *nasty* job, for even the OS and Network-controls have to be coded
again (to gain max speed). And it will be unlikely that this implementation
is very good, because Assembly becomes very untransparant if it becomes too
large and complex. And time must certainly not be an issue.

But I think, in theory, it can be done (if I can do it for a 3.57 MHz 8-bit
Z80, it is certainly possible on a 32-bit (or is it 64-bit?) AMD Athlon
1000). However I also think it's best to divide the job over several
computers.

By the way, what terrible big system are you setting up if you expect to
handle up to 300.000 simultaneous connections???


~Grauw


--
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<
 email me: [EMAIL PROTECTED] or ICQ: 10196372
      visit my homepage at http://grauw.blehq.org/
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<



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

From: [EMAIL PROTECTED] (Tony Gale)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: all threads in a process share the same pid?
Date: 24 Aug 2000 09:57:33 GMT

In article <d3Dn5.35453$[EMAIL PROTECTED]>,
        [EMAIL PROTECTED] writes:
> In comp.os.linux.development.apps Xavier Leroy <[EMAIL PROTECTED]> 
>wrote:
> 
>> 1- It's hard fix.  The assumption that processes have unique PIDs
>> permeates the kernel sources.  Some significant work is needed
>> to support both PIDs and TIDs (thread IDs).  Someone (forgot the name)
>> tried to do it a couple of years ago, but I don't think he went very far.
>> Also, signal delivery becomes even more tricky than it is today, due
>> to the wonderfully intricate semantics the POSIX people chose.
> 
> The last I saw, there were about four patches that cleaned up most of
> the big issues. The real problem is the portions other than
> clone(). From what I've read on the kernel list, getting a change into
> other portions of the kernel would probably prove impossible.
> 
> If there was anything remotely resembling consensus on an acceptable
> way to do it, I suspect someone would fix it. 
> 

Coincidentally, Linus was asked what form of fix for the shared PIDs
problem would be acceptable, he replyed:

=======================================
Acceptable solution:
 - add "tgid" (thread group ID) to "struct task_struct"
 - CLONE_PID will leave tgid unchanged.
 - non-CLONE_PID will set "tgid" to the same as pid
 - get_pid() checks that the new pid is not the tgid of any process.

Basically, the above creates a new "session pid" for the collection of
threads. This is nothing new: the above is basially _exactly_ the same as
p->pgrp and p->session, so it fits quite well into the whole pid notion.

It also means that "current->pid" basically becomes a traditional "thread
ID", while "current->tgid" effectively becomes what pthreads calls a
"pid". Except Linux does it the right way around, ie the same way we've
done sessions and process groups. Because, after all, this _is_ just a
process group extension.

Now, once you have a "tgid" for each process, you can add system calls to 
 - sys_gettgid(): get the thread ID
 - sys_tgkill(): do a pthreads-like "send signal to thread group" (or
   extend on the current sys_kill())

Now, the problem is that the thread group kill thing for true POSIX
threads signal behaviour probably has to do some strange magic to get the
pthreads signal semantics right. I don't even know the exact details here,
so somebody who _really_ knows pthreads needs to look long and hard at
this (efficiency here may require that we have a circular list of each
"thread ID group" - ie that we add the proper process pointer list that
gets updated at fork() and exit() so that we can easily walk every process
in the process group list).

Discussion welcome. Basically, it needs somebody who knows pthreads well,
but actually has good taste despite that fact. Such people seem to be in
short supply ;)

                Linus
=======================================

So, someone just has to implement it :-)

-tony
-- 
E-Mail: Tony Gale <[EMAIL PROTECTED]>
The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.


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

From: Stein Magne =?iso-8859-1?Q?Bj=F8rklund?= <[EMAIL PROTECTED]>
Subject: CVS install. blues
Date: Thu, 24 Aug 2000 12:04:49 +0200


Installing CVS server p� MDK 7.1

Everything is looking ok, but during checkout of code, CVS insist on
writing to /root.
Like this:

$ cvs checkout testsrc
cvs server: cannot open /root/.cvsignore: Ikke tilgang
cvs [server aborted]: can't chdir(/root): Ikke tilgang 


Here is my configs:

inetd.conf :

# CVS server
#
cvspserver stream  tcp  nowait  root  /usr/sbin/cvspserver
cvspserver      


/etc/cvs/cvs.conf :
# -*- shell-script -*-
#
# Configuration file for the Mandrake CVS-related scripts
#
# Locations of CVS repositories you want to export via pserver
CVS_REPOS="/usr/local/cvsroot"
CVS_ROTDIRS="/usr/local/cvsroot"
# cvs.conf ends here       


/etc/profile :

CVSROOT="/usr/local/cvsroot"
export CVSROOT 


Mandrake has a litle script /usr/sbin/cvspserver. It reads
/etc/cvs/cvs.conf

#!/bin/sh
#---------------------------------------------------------------
# Project         : Mandrake
# Module          : cvs
# File            : cvspserver
# Version         : $Id$
# Author          : Frederic Lepied
# Created On      : Tue Mar 28 07:49:39 2000
# Purpose         : Launch cvs pserver with the right options
# according to /etc/cvs/cvs.conf.
#---------------------------------------------------------------
 
set -e
 
CONF=/etc/cvs/cvs.conf
 
if [ ! -r $CONF ]; then
    echo "No $CONF found" 1>&2
    exit 1
fi
 
. $CONF
 
args=""
for d in $CVS_REPOS; do
    if [ -d $d/CVSROOT ]; then
        args="$args --allow-root=$d"
    fi
done
 
if [ -n "$args" ]; then
    exec /usr/bin/cvs $args pserver
else
    echo "no repository configured in $CONF" 1>&2
    exit 2
fi
 
# cvspserver ends here               

Any sugg. ???? Thanx

-- Stein
Dualog AS

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


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