Linux-Development-Sys Digest #713, Volume #8     Fri, 11 May 01 19:13:16 EDT

Contents:
  Any benefits of zero copy networking for MPC860T? (Gerben Venekamp)
  Re: Any benefits of zero copy networking for MPC860T? (Greg Copeland)
  Re: How to unblocking a thread blocked on an accept() ( try 2 ) ("Rosimildo daSilva")
  Re: How to unblocking a thread blocked on an accept() ( try 2 ) ("Rosimildo daSilva")
  Re: Checking if a pointer is valid (Steve Connet)
  Maximum subdirectories under one directory? (Jay Schwantes)
  Re: abort() doesn't generate a core dump? (Rob Yampolsky)
  Re: Maximum subdirectories under one directory? (Greg Copeland)
  Re: How to unblocking a thread blocked on an accept() ( try 2 ) (Greg Copeland)
  Red Hat Device Driver training (Steve Millman)
  Re: passive telnetd (Eric P. McCoy)
  PCI Address from map_user_kiobuf Pages  (k)
  Re: Checking if a pointer is valid (Nix)
  Re: why a separate process for each thread on Linux (Nix)
  Re: why a separate process for each thread on Linux (Nix)
  Re: why a separate process for each thread on Linux (Nix)
  Re: why a separate process for each thread on Linux (Alexander Viro)
  Anyone working with IEEE1394 for laptops. CarBus Cards?  cvs ("E-mu")

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

From: Gerben Venekamp <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.powerpc
Subject: Any benefits of zero copy networking for MPC860T?
Date: Fri, 11 May 2001 15:10:10 +0200

We have to choose between Linux (preferred) and VxWorks (not so
preferred). It basically comes down to network throughput. Measuring the
TCP throughput of a fast ethernet port (10BaseT/100BaseTX) using the
Linux 2.4.4. kernel, we have measured ~21.5 Mbit/s. We know the port is
able to deliver ~49.8 Mbit/s using VxWorks. Since we are using an
MPC860T @50MHz (4KB instruction/4KB data cache) with linux and an
MPC860P @80MHz (16KB instruction/8KB data cache) we are expecting some
lower results for Linux. Another interesting aspect is that VxWorks uses
zero copy networking. If disabled throughput drops to ~29.5 Mbit/s. On
http://lwn.net/2001/0419/kernel.php3 it is mentioned that zero copy
networking is available for the Linux 2.4.4 kernel, but that drivers are
not yet supporting it. It seems that if we are able the use zero copy
for Linux, the choice is obvious.

Our embedded board is an RPX Classic (CLLF) from Embedded Planet. As
stated before, it hosts an MPC860T PowerPC processor. The Fast Ethernet
Controller (FEC) is an QS6612, which is integrated in the MPC860T. Are
there any projects that implement the zero copy for the FEC? If not,
what needs to be done to make the driver "zero copy enabled".

Gerben



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

Crossposted-To: comp.os.linux.powerpc
Subject: Re: Any benefits of zero copy networking for MPC860T?
From: Greg Copeland <[EMAIL PROTECTED]>
Date: 11 May 2001 08:35:51 -0500


If you don't get an answer, you may want to send an email to AC.
On the few times that I've emailed him, he's always replied.  I
*suspect* that he would enjoying helping anyone that will enable
zero-copy driver support.

If you don't mind, if you learn what's involved, please drop me an
email.  I'd be curious to find out my self.

Thanks,
        Greg

Gerben Venekamp <[EMAIL PROTECTED]> writes:

> We have to choose between Linux (preferred) and VxWorks (not so
> preferred). It basically comes down to network throughput. Measuring the
> TCP throughput of a fast ethernet port (10BaseT/100BaseTX) using the
> Linux 2.4.4. kernel, we have measured ~21.5 Mbit/s. We know the port is
> able to deliver ~49.8 Mbit/s using VxWorks. Since we are using an
> MPC860T @50MHz (4KB instruction/4KB data cache) with linux and an
> MPC860P @80MHz (16KB instruction/8KB data cache) we are expecting some
> lower results for Linux. Another interesting aspect is that VxWorks uses
> zero copy networking. If disabled throughput drops to ~29.5 Mbit/s. On
> http://lwn.net/2001/0419/kernel.php3 it is mentioned that zero copy
> networking is available for the Linux 2.4.4 kernel, but that drivers are
> not yet supporting it. It seems that if we are able the use zero copy
> for Linux, the choice is obvious.
> 
> Our embedded board is an RPX Classic (CLLF) from Embedded Planet. As
> stated before, it hosts an MPC860T PowerPC processor. The Fast Ethernet
> Controller (FEC) is an QS6612, which is integrated in the MPC860T. Are
> there any projects that implement the zero copy for the FEC? If not,
> what needs to be done to make the driver "zero copy enabled".
> 
> Gerben
> 
> 

-- 
Greg Copeland, Principal Consultant
Copeland Computer Consulting
==================================================
PGP/GPG Key at http://www.keyserver.net
DE5E 6F1D 0B51 6758 A5D7  7DFE D785 A386 BD11 4FCD
==================================================

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

Reply-To: "Rosimildo daSilva" <[EMAIL PROTECTED]>
From: "Rosimildo daSilva" <[EMAIL PROTECTED]>
Subject: Re: How to unblocking a thread blocked on an accept() ( try 2 )
Date: Fri, 11 May 2001 13:41:32 GMT

"Vyacheslav Burdjanadze" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]...
> > I have a thread blocked on an accept() call. I'd like to wake it up from
> > another thread. How do I do that ?
> > Under WIN32, I just close the socket, and the accept() returns with an
> > error code.
> It also SHOULD work inder Linux. Try to shutdown(2). If this doesn't
> help, interrupt
> system call by raising signal


Thanks. I'll try this option, this weekend.

Rosimildo.



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

Reply-To: "Rosimildo daSilva" <[EMAIL PROTECTED]>
From: "Rosimildo daSilva" <[EMAIL PROTECTED]>
Subject: Re: How to unblocking a thread blocked on an accept() ( try 2 )
Date: Fri, 11 May 2001 13:43:39 GMT

"Greg Copeland" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Since you are using threads, pthreads I'll assume, using signals is
> somewhat iffy.

Ageed. :-)

>The other thing you can do is to select on the socket
> that you want to accept which should indicate when it's ready for you
> to actually accept on it.  In other words, create the socket, bind to
> it, then select on it.  When select returns with the correct status,
> you now know you need to accept the connection.
>
> I think you can also put it into non-blocking mode and poll using
> accept.

This is something that I have been trying to avoid. I know this works...

>
> You may also try using the shutdown() function to shutdown the
> socket, but I honestly don't know if this will work for you.
>

Yes, I will try this.

Rosimildo.







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

Subject: Re: Checking if a pointer is valid
From: Steve Connet <[EMAIL PROTECTED]>
Date: Fri, 11 May 2001 16:06:19 GMT

Kasper Dupont <[EMAIL PROTECTED]> writes:

> >     Does any one know how to check if a pointer is valid in Linux
> > C. I am trying to simulate the windows IsBadReadPtr and
> > IsBadWritePtr functions.

If you decide to use C++ you can do this:

char* test = new(nothrow)char[100];
if(!test) {
  cerr << "mem alloc failed" << endl;
  exit(-1);
}


Notice the "nothrow" clause. Without the nothrow clause, operator new
will throw a std::bad_alloc exception which you can catch as well.


-- 
Steve Connet            Remove USENET to reply via email
[EMAIL PROTECTED]

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

From: Jay Schwantes <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Maximum subdirectories under one directory?
Date: Fri, 11 May 2001 17:34:58 GMT

Is there a maximum number of subdirectories under one directory in a
linux environment?
I have a need to create about 1000 subdirectories under one directory -
will I create any problems doing so?




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

From: Rob Yampolsky <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: abort() doesn't generate a core dump?
Date: Fri, 11 May 2001 14:06:14 -0400

You called it.  The following code was in /etc/profile:

# Users generally won't see annoyng core files
[ "$UID" = "0" ] && ulimit -c 1000000

Was it Mandrake that put it there (MDK7.2), or is it common practice to
disable core dumps for all but the root user?

Oh well, thanks.
Rob


"Arthur H. Gold" wrote:

> Rob Yampolsky wrote:
> >
> > Hi.  I don't seem to be getting core dumps from my apps, and I'm not
> > sure why.  System is Mandrake 7.2.
> >
> > I have an ErrorLogger() function that attempts to maintain a history of
> > core dumps in  a particular directory by
> > 1. chdir'ing there
> > 2. running a 'renamecore' script (to rename the prior core file(
> > 3. calling abort() to generate a new core file.
> >
> > I use this ErrorLogger() so that I can get a backtrace of apps whenever
> > they detect situations that should not arise.  I also trap several
> > signals (SIGSEGV, etc) and do the same trick so I can backtrace a
> > history of segfaults.
> >
> > This whole scheme works very nicely on AIX, but under linux, abort()
> > doesn't seem to be generating a core file at all.  I've allso tried
> > sending SIGSEGV signals to other running processes that do not trap the
> > signal, and I don't seem to get core files for them either.
> >
> > Is core dumping optional?   I didn't think so, but maybe there's some
> > /proc/... flag you need to set to enable them.
> What do you get when you do a:
>
> ulimit -c
>
> If it's 0, that's your problem.
>
> HTH,
> --ag
> --
> Artie Gold, Austin, TX  (finger the cs.utexas.edu account for more
> info)
> mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
> --
> Clone Bernie!


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

Subject: Re: Maximum subdirectories under one directory?
From: Greg Copeland <[EMAIL PROTECTED]>
Date: 11 May 2001 14:14:37 -0500


Beware of the classic inode exhaustion issues that pop up when you
are creating tons of files or directories.  Remember, it's possible
to run out of inodes while still having lots of free disk space,
thus rendering the disk "full".

Most file systems allow you to specify the number of inodes that the
file system should support in one form or another.  There are also
some file systems which can dynamically allocate these, which don't
have this problem, however, I believe this is the exception and not
the rule.

Oh ya, one last thing, this scenario is said to be one of the areas
where ReiserFS is said to excel.  Since you'll probably see searching
a huge list of directories, each have a list of files and or directories,
ReiserFS's btree implementation makes for rapid searching when trying
to locate a directory.

Greg


Jay Schwantes <[EMAIL PROTECTED]> writes:

> Is there a maximum number of subdirectories under one directory in a
> linux environment?
> I have a need to create about 1000 subdirectories under one directory -
> will I create any problems doing so?
> 
> 
> 

-- 
Greg Copeland, Principal Consultant
Copeland Computer Consulting
==================================================
PGP/GPG Key at http://www.keyserver.net
DE5E 6F1D 0B51 6758 A5D7  7DFE D785 A386 BD11 4FCD
==================================================

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

Subject: Re: How to unblocking a thread blocked on an accept() ( try 2 )
From: Greg Copeland <[EMAIL PROTECTED]>
Date: 11 May 2001 14:17:48 -0500


I've not played with the /dev/poll devices, but I supposed that it _might_
be possible to use this to select on, which will tell you when you need
to connect.  This _may_, depending on your overall design, optimize your
polling effort a little.  I know that /dev/poll is supposed to help when
the list of fd's to be polling is semi-static, so, you may or may not 
find this helpful.

Greg


"Rosimildo daSilva" <[EMAIL PROTECTED]> writes:

> "Greg Copeland" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > Since you are using threads, pthreads I'll assume, using signals is
> > somewhat iffy.
> 
> Ageed. :-)
> 
> >The other thing you can do is to select on the socket
> > that you want to accept which should indicate when it's ready for you
> > to actually accept on it.  In other words, create the socket, bind to
> > it, then select on it.  When select returns with the correct status,
> > you now know you need to accept the connection.
> >
> > I think you can also put it into non-blocking mode and poll using
> > accept.
> 
> This is something that I have been trying to avoid. I know this works...
> 
> >
> > You may also try using the shutdown() function to shutdown the
> > socket, but I honestly don't know if this will work for you.
> >
> 
> Yes, I will try this.
> 
> Rosimildo.
> 
> 
> 
> 
> 
> 

-- 
Greg Copeland, Principal Consultant
Copeland Computer Consulting
==================================================
PGP/GPG Key at http://www.keyserver.net
DE5E 6F1D 0B51 6758 A5D7  7DFE D785 A386 BD11 4FCD
==================================================

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

From: [EMAIL PROTECTED] (Steve Millman)
Subject: Red Hat Device Driver training
Date: 11 May 2001 19:26:53 GMT

Hi,
Has anyone taken the Red Hat Linux Device Driver course (RHD221) and if
so how would they rate it.  Are there any other training courses given by
other companies for Linux device drivers?

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

Crossposted-To: comp.os.linux.development.apps
Subject: Re: passive telnetd
From: [EMAIL PROTECTED] (Eric P. McCoy)
Date: 11 May 2001 15:37:36 -0400

[EMAIL PROTECTED] writes:

> is there any way of remotely 'logging' in to
> a host behind a firewall. the host can make
> outgoing connections but not listen to any
> from outside of the firewall. 
> so i'm jus thinking that maybe there is a telnetd
> that makes an out-going connection instead of listening
> to one. 

How would it know to initiate a connection?

You can be sneaky and try to work your away around using tunnels.  For
example, you could theoretically tunnel IP traffic through ICMP ping
packets, assuming the computers on both ends knew to do that.  So if
your firewall passes ICMP traffic in both directions (some do), you
can do something like that.

That being said, tunneling is a major pain in the ass.

-- 
Eric McCoy <[EMAIL PROTECTED]>
  "Knowing that a lot of people across the world with Geocities sites
absolutely despise me is about the only thing that can add a positive
spin to this situation."  - Something Awful, 1/11/2001

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

From: k <[EMAIL PROTECTED]>
Subject: PCI Address from map_user_kiobuf Pages 
Date: Fri, 11 May 2001 21:08:19 GMT

I alloc_kiobuf and mapped it using 'map_user_kiobuf'. I am trying to do a Block
DMA transfer and I need a PCI address pointing to the first page. I tried using
virt_to_bus call to get the bus address and use it as my PCI address. But I
don't see anything happening. Below is a sample code that I am using ( minus
error checking...)


alloc_kiovec(1, &iobuf);
map_user_kiobuf(0,iobuf,buf,100);

These two work and I can see the data that i have sent from my User-space
program in the re-mapped pages....

Now getting the PCI address....
/* only has a count of 100 values..so, all the data is present on 1 page */
pci_addr = virt_to_bus(page_address(iobuf->maplist[0])); 

Any comments/suggestions...

thanx,
k





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

From: Nix <$}xinix{[email protected]>
Subject: Re: Checking if a pointer is valid
Date: 11 May 2001 22:01:49 +0100

On Fri, 11 May 2001, Steve Connet said:
> Kasper Dupont <[EMAIL PROTECTED]> writes:
> 
>> >     Does any one know how to check if a pointer is valid in Linux
>> > C. I am trying to simulate the windows IsBadReadPtr and
>> > IsBadWritePtr functions.
> 
> If you decide to use C++ you can do this:
> 
> char* test = new(nothrow)char[100];

... which bears no resemblance to what was asked about, which was how to
determine if a *pre-existing* pointer was valid (presumably for the best
of reasons, i.e. paranoia :) ).

-- 
`I like to think the situation could be likened to doing heart surgery
 in a hurry with a plastic spoon after having a couple of pints.'
                                                       --- James Reeves

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

From: Nix <$}xinix{[email protected]>
Subject: Re: why a separate process for each thread on Linux
Date: 11 May 2001 22:30:24 +0100

On 9 May 2001, Alexander Viro stated:
>       * environment-dependent symlinks (dual-universe monsters)

I have frequently wished for these (while realising how many horrible
security holes they could open up).

But of course with per-process views of the fs (CLONE_FS and friends) we
don't need environment-dependent symlinks at all :)

-- 
`I like to think the situation could be likened to doing heart surgery
 in a hurry with a plastic spoon after having a couple of pints.'
                                                       --- James Reeves

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

From: Nix <$}xinix{[email protected]>
Subject: Re: why a separate process for each thread on Linux
Date: 11 May 2001 22:43:25 +0100

On 9 May 2001, [EMAIL PROTECTED] uttered the following:
> On Wed, 09 May 2001 17:06:43 GMT Eric Taylor <[EMAIL PROTECTED]> wrote:
> 
>| I see there is a way to share pids? Is that still un-implemented or
>| have things changed?
> 
> Based on what I read it is implemented, but causes "problems" since
> other parts of the kernel think all processes have unique PID.  For
> example, the /proc/NNNN entries are likely to be usless.  There needs
> to be some way to identify each thread beyond a thread entry pointer.
> Maybe a PID:TID tuple?  But a lot of stuff would have to change to
> handle that.

IIRC, Linus hath Spoken, and this is a no-go.

(However, I couldn't find the message where he said that. I did find
<http://groups.google.com/groups?q=thread+getpid+group:comp.os.linux.development.system+author:Linus+author:Torvalds&lr=&safe=off&scoring=r&rnum=2&ic=1&selm=8n77b2%247f6%241%40penguin.transmeta.com>

which was sort of related.)

-- 
`I like to think the situation could be likened to doing heart surgery
 in a hurry with a plastic spoon after having a couple of pints.'
                                                       --- James Reeves

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

From: Nix <$}xinix{[email protected]>
Subject: Re: why a separate process for each thread on Linux
Date: 11 May 2001 22:51:44 +0100

On 10 May 2001, Alexander Viro uttered the following:
> Kernel changes: none. Flags: CLONE_FILES on, CLONE_FS off. Guys, how about
> reading the fscking manpage? You'd see (among other useful information)
>        CLONE_FS
>               If  CLONE_FS  is set, the parent and the child pro-
>               cesses share  the  same  file  system  information.
>               This includes the root of the file system, the cur-
>               rent working directory, and the umask.  Any call to
>               chroot(2),  chdir(2),  or umask(2) performed by the
>               parent or child process also takes  effect  in  the
>               other process.

Hmm. I thought that the point of a Plan9-style CLONE_FS was that it
cloned the process's view of the filesystem (current mounts &c) such
that modifications made there or below did not affect its parents (and
other non-children of this process).

Now I see that the Linux CLONE_FS is totally different...

Hmm...

(no, I have no point to make. why do you ask? ;) )

-- 
`I like to think the situation could be likened to doing heart surgery
 in a hurry with a plastic spoon after having a couple of pints.'
                                                       --- James Reeves

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

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: why a separate process for each thread on Linux
Date: 11 May 2001 18:30:34 -0400

In article <[EMAIL PROTECTED]>,
Nix  <$}xinix{[email protected]> wrote:
>Now I see that the Linux CLONE_FS is totally different...

In Plan 9 that would be RFNAMEG. There is an implementation of per-process
namespaces for Linux, but that's 2.5 fodder. If you want to play with
patch - see ftp.math.psu.edu/pub/viro/namespace* (and rfork.c in the same
place).

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

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

From: "E-mu" <[EMAIL PROTECTED]>
Subject: Anyone working with IEEE1394 for laptops. CarBus Cards?  cvs
Date: 11 May 2001 22:45:36 GMT

I am currently trying to figure out why I cannot see the module for sbp-2 in
menuconfig?  I went to linux-1394.sourceforge.net, and did exaclty like it
told me to do in the facts section.   I applied the update to kernel 2.4.4.


I do not see anywhere after I launch "make menuconfig" sbp-2.  Its not even
inthe firewire section.

Anyone help please?

Did I miss something here?



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


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