Linux-Development-Sys Digest #119, Volume #8      Fri, 1 Sep 00 15:13:17 EDT

Contents:
  /dev/log (Derek Fountain)
  Re: How can I specify the out interface? (rape_the_chiwawa)
  Re: all threads in a process share the same pid? (Jonathan de Boyne Pollard)
  Re: Memory allocation Strangeness. (Szabolcs Csetey)
  Re: Cross-compiler for powerpc-motorola-vxworks ("Dave Korn")
  Re: Resolution of select timeout (Peter Mueller)
  CURRENT->buffer ("[EMAIL PROTECTED]")
  Re: Time critical code (Yusuf Motiwala)
  Re: Memory allocation Strangeness. (Olivier CARRERE)
  Time needed to read a data block ???] (Marty Chan)
  Re: which kernel version support AGP? (Toby Haynes)
  Re: where is archive URL for this news group? (Rick Ellis)
  Re: Memory management (Rick Ellis)
  Re: newbie version question (Rick Ellis)
  lost binfmt module ([EMAIL PROTECTED])
  Re: Memory allocation Strangeness.  (Update) (Olivier CARRERE)
  Re: Linux driver module question (Richard Bonomo)
  Alocate a memory location above 4G of memory (David Wu)

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

From: Derek Fountain <[EMAIL PROTECTED]>
Subject: /dev/log
Date: Fri, 01 Sep 2000 10:16:10 +0100

I'm so vague on this I'm not even sure where to ask the
question. Someone point me the right direction if this forum
isn't appropriate.

On my 2 Linux systems - 1 Redhat, the other SuSE - there's
file called /dev/log. It's socket file:

> ls -l /dev/log
srw-rw-rw-   1 root     root            0 May  4 11:11
/dev/log

I'm unfamiliar with the concept of sockets on my file
system. Can someone explain how they are used, and, in
particular, how I create one?

I'm setting up a minimal Linux system on an embedded PC, and
I've started from absolute scratch. It's an interesting
exercise and I'm learning a huge amount, but mingetty won't
run without this /dev/log file. I'm at a standstill until
someone can tell me how to create it.

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

From: rape_the_chiwawa <[EMAIL PROTECTED]>
Subject: Re: How can I specify the out interface?
Date: Fri, 01 Sep 2000 10:29:06 GMT


Karl Heyes wrote:
> 
> 
> In article <[EMAIL PROTECTED]>, wolf <[EMAIL PROTECTED]>
> wrote:
> > I have two ethernet card in my computer. After installation, I get two
> > network interface  eth0 and eth1, and assign two different IP address
to
> > them. But to my surprise , it seems that all the packets that is sent
to both
> > IP address come in from the interface that is activated first (eth0
after
> > bootup of course).  And  all the outgoing packets go from the interface
too.
> > 
> > Why ? And How can i specify the interface to send packets ?
> > 
> 
> This sounds like a routing issue.  check the output of
> 
> route -n
> 
> karl.
> 

I have the same problem and i cannot find any solution since two week, so
if you found out a solution plaese plaese plaese sent me a e mail at 
[EMAIL PROTECTED]
thanks


--
Posted via CNET Help.com
http://www.help.com/

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

From: Jonathan de Boyne Pollard <[EMAIL PROTECTED]>
Subject: Re: all threads in a process share the same pid?
Date: Fri, 01 Sep 2000 10:53:26 +0100

[Once again, the Curse Of Tesco.Net bites, and the original article has been
expired from the newsserver before I have finished writing the reply.]

KK> Also consider that the chdir() system call is needed in avoiding
KK> limitations on the length of a pathname that can be passed in a
KK> single file-related system call.

This is not a very good argument, because it is based upon a bad example.  If
one's system is such that one can construct directory hierarchies so deep that
absolute pathnames exceed the string length limits for open(), then the
*correct* way to fix the problem is to have those string length limits removed
or at least increased, because they are obviously far too short.  Calling
chdir() so that one can use relative pathnames is a bodge that doesn't
actually address the root cause of the problem.  

(And it certainly doesn't solve the case of where one wants to, say, call
link() to link together two points whose absolute pathnames both exceed the
string length limit, but which are in totally separate parts of the filesystem
tree.  chdir()ing closer to one part of the tree to bring it within reach only
takes one further away from the other.  Again, the *correct* fix is to
raise/remove the overshort string length limits.)

Since it is a bodge that doesn't address the root cause of the problem in
question, this is not really a good example of a need for a per-thread
chdir().

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

From: Szabolcs Csetey <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness.
Date: Fri, 01 Sep 2000 11:31:06 GMT

  Olivier CARRERE <[EMAIL PROTECTED]> wrote:
> Ok, but why is it that when I change my kernel configuration from 1GB
> support to 2GB support I can 'malloc'ate less memory (500 MB instead
> of 850 MB)? The libc should be mapped indentically, shouldn't it?

Weird, I tried on kernel 2.2.1[4567], Debian 2.2 and RedHat 6.[12],
128-512 RAM and it always failed at 1.9 GB. BTW you could try this
memory allcator, it's really fast and no change to source is needed
http://www.cs.utexas.edu/users/emery/hoard/


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: "Dave Korn" <[EMAIL PROTECTED]>
Crossposted-To: gnu.gcc.help
Subject: Re: Cross-compiler for powerpc-motorola-vxworks
Date: Fri, 1 Sep 2000 12:49:43 +0100

OSguy wrote in message <[EMAIL PROTECTED]>...
>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...

  Just for the record, the proper target for gcc is "powerpc-wrs-vxworks".
IIRC, the binutils didn't get this target added until version 2.10, but it's
just a synonym for powerpc-eabi, so that would work fine for binutils.

Also, I'm intrigued about WRS's contribution back to the open source
community. The version of Gcc that they ship supports an option
'-mlongcall' that hasn't made it back into the Gcc source tree. I've been
spending a lot of time digging around the internals of gcc and the WRS
toolchain lately, in order to get 2.95.2 working with powerpc-wrs-vxworks,
and I'm shortly going to post a FAQ/HowTo and set of patches addressing
the issues in getting it up and running in a WRS development environment.

      hth,
         DaveK
--
They laughed at Galileo.  They laughed at Copernicus.  They laughed at
Columbus. But remember, they also laughed at Bozo the Clown.



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

From: Peter Mueller <[EMAIL PROTECTED]>
Subject: Re: Resolution of select timeout
Date: Fri, 01 Sep 2000 15:17:19 +0200

Hi,

I have the HZ constat set to 1024. But the results of my measurements are not
as expected. I have a cyclical task that inverts a parallel port bit in each
cycle. I measure the cycle time with an oszillograph.

Here are my results:

15ms cycle: Every thing as expected. The jitter is around 1ms (corresponds to
the 1000Hz).
10ms cycle: The cycle is either 10ms or 20ms. No values between.
5ms cycle: The cycle is either 10ms or 15ms. No values between.

Any explanations for this behaviour?

Peter

P.S: I found that the HZ constant is frequently used in the kernel code (e.g.
TCP/IP). Do I have to expect any errors coming from the changed HZ value?



Andi Kleen wrote:

> Peter Mueller <[EMAIL PROTECTED]> writes:
>
> > Hi,
> >
> > I use select to get notefied of some timeouts. I found that the
> > resolution of
> > the timeout time is 10 milli seconds. Is my measurement true? If yes,
> > can I
> > change this anywhere (e.g. in the kernel) and how? Any experience with
> > this?
>
> You can recompile the kernel with a higher HZ constant, e.g. set to 1024.
>
> Then it would be ~1ms.
>
> -Andi


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

From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: CURRENT->buffer
Date: Fri, 01 Sep 2000 15:30:30 +0200

Hi,

Can any one tell me if the request buffer in linux is in user or kernel
space?

or How do I find out if a piece of memory is in user or kernel space?

Thanks,
Richard.


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

From: Yusuf Motiwala <[EMAIL PROTECTED]>
Subject: Re: Time critical code
Date: Fri, 01 Sep 2000 13:19:36 GMT

Thanks for reply, but I think cli/sti will not stop scheduler and
hence task switching. right? any idea.

thanks
Yusuf


In article <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> On Sun, 27 Aug 2000 08:29:49 GMT, Yusuf Motiwala <[EMAIL PROTECTED]>
wrote:
> >
> >
> >I have some time critical code which I would like to get executed
> >without any task switching or interrupt (should be locked). The code
> >is very small and hardly made of 10 CPU instruction. Can somebody
> >suggest how can I do it in Linux.
>
> You can disable interrupts on the local processor with __cli() and
reenable
> them with __sti(). Note the underscores.
>
> --
> Any hyperlinks appearing in this article were inserted by the
unscrupulous
> operators of a Usenet-to-web gateway, without obtaining the proper
permission
> of the author, who does not endorse any of the linked-to products or
services.
>

--
==========[Yusuf Motiwala]=============
Reply-to: [EMAIL PROTECTED]


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: Olivier CARRERE <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness.
Date: Fri, 01 Sep 2000 15:34:40 +0200

Szabolcs Csetey wrote:

> Weird, I tried on kernel 2.2.1[4567], Debian 2.2 and RedHat 6.[12],
> 128-512 RAM and it always failed at 1.9 GB. BTW you could try this
> memory allcator, it's really fast and no change to source is needed
> http://www.cs.utexas.edu/users/emery/hoard/

Thank you, I try it right now.

- Olivier CARRERE

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

From: Marty Chan <[EMAIL PROTECTED]>
Crossposted-To: 
linux.act.kernel,alt.os.linux,comp.os.linux.setup,aus.computers.linux,comp.os.linux.development.apps
Subject: Time needed to read a data block ???]
Date: Fri, 01 Sep 2000 22:29:32 +0800

This is a multi-part message in MIME format.
==============32AC2E6C3DBE5276A7C069CB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



==============32AC2E6C3DBE5276A7C069CB
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Path: news.erg.cuhk.edu.hk!newsgate.cuhk.edu.hk!news.cuhk.edu.hk!not-for-mail
From: Marty <[EMAIL PROTECTED]>
Newsgroups: linux.dev.kernel
Subject: Time needed to read a data block ???
Date: Wed, 30 Aug 2000 15:52:11 +0800
Organization: The Chinese University of Hong Kong
Message-ID: <[EMAIL PROTECTED]>
NNTP-Posting-Host: ialab8.ie.cuhk.edu.hk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: justice.csc.cuhk.edu.hk 967621845 15938 137.189.98.86 (30 Aug 2000 07:50:45 
GMT)
X-Complaints-To: [EMAIL PROTECTED]
NNTP-Posting-Date: 30 Aug 2000 07:50:45 GMT
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
Xref: news.erg.cuhk.edu.hk linux.dev.kernel:22087

I am doing something related to disk scheduling specialized for video
server. I have to get some system information including the seek time,
rotational latency, transfer time and the fixed overhead time in a
dynamic way. Would anyone tell me how can I get the above information
???

Marty.


==============32AC2E6C3DBE5276A7C069CB==


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

From: Toby Haynes <[EMAIL PROTECTED]>
Subject: Re: which kernel version support AGP?
Date: 01 Sep 2000 11:51:55 -0400

!! "Benny" == Benny Li <[EMAIL PROTECTED]> writes:

  Benny> hi, I want to use Voodoo3 3000 AGP, but I heard that earlier kernels
  Benny> don't support AGP yet. Can somebody please tell me which kernel
  Benny> version(s) support AGP?

I've seen agpgart patches for 2.2.13 and later - there may be some in earlier
kernels. Or you could back port the patches ...

Cheers,
Toby Haynes

-- 

Toby Haynes
The views and opinions expressed in this message are my own, and do
not necessarily reflect those of IBM Canada.

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

From: [EMAIL PROTECTED] (Rick Ellis)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: where is archive URL for this news group?
Date: 1 Sep 2000 16:14:25 GMT

In article <8okfjf$1df$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:

>Does anyone know the website hosting the archive of this newsgroup?

http://www.fnet.net/~ellis/dj.html


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

From: [EMAIL PROTECTED] (Rick Ellis)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Memory management
Date: 1 Sep 2000 16:25:46 GMT

In article <8on1m7$2fm$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:

>Which system functions returns the number of free bytes in a heap?
>And the size of the largest free memory space in heap?

See the memory allocation chapter in:

  http://www.gnu.org/manual/glibc-2.0.6/html_node/libc_toc.html

--
http://www.fnet.net/~ellis/photo/linux.html

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

From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: newbie version question
Date: 1 Sep 2000 16:33:41 GMT

In article <8ojv0i$e2c$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:
>What do I do if I have a module compiled under 2.2.16 and I need it to
>exist under 2.2.13 but the 2.2.13 system doesn't have source?

So grab a copy of the 2.2.13 source and compile your module with it.

--
http://www.fnet.net/~ellis/photo/linux.html

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

From: [EMAIL PROTECTED]
Subject: lost binfmt module
Date: Fri, 01 Sep 2000 16:35:07 GMT

Failing to start pppd I found this in /var/log/messages:
"Aug 29 13:02:27 GOOFY modprobe: Can't locate module binfmt-0"

How can I fix this and what might cause such a failure?


I'm very unexperienced in linux so I tried this:

GOOFY:[rland] #rpm -V ppp
S.5....T c /etc/ppp/pap-secrets
S.5....T c /etc/ppp/ppp-off
SM5...GT c /etc/ppp/ppp-on
SM5...GT c /etc/ppp/ppp-on-dialer
.M....G.   /usr/sbin/pppd
GOOFY:[rland] #

-> assuming no errors have been found...

and...

GOOFY:[rland] #locate binfmt
/lib/modules/2.0.35/fs/binfmt_aout.o
/lib/modules/2.0.35/fs/binfmt_java.o
/usr/doc/DLD/Linux/DOC/linux-kernel/kernel/binfm
gif
/usr/doc/DLD/Linux/LDP/LDP/tlk/kernel/binfmt.gif
/usr/lib/perl5/i586-linux/5.004/linux/binfmts.ph
/usr/src/linux-2.0.35/fs/binfmt_aout.c
/usr/src/linux-2.0.35/fs/binfmt_elf.c
/usr/src/linux-2.0.35/fs/binfmt_em86.c
/usr/src/linux-2.0.35/fs/binfmt_java.c
/usr/src/linux-2.0.35/fs/binfmt_script.c
/usr/src/linux-2.0.35/include/linux/binfmts.h


What does  "-0" in "binfmt-0" stand for? (a instance?)
Nevertheless I cannot find such a src file on HDD

I would be awfully grateful for some help.




Robert








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

From: Olivier CARRERE <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness.  (Update)
Date: Fri, 01 Sep 2000 19:49:38 +0200

Tristan Wibberley wrote:

> >I use a 2.2.16 kernel, and I'm using *very large* applications (using
> >more than 900MB). I just received a new 2GB machine hoping I could use
> >it under Linux for my large applications. I compiled 2.2.16 kernel with
> >2GB memory support, with and without SMP (just in case, since it's a SMP
> >machine), and the same problem occurs : My app can't allocate memory
> >when it becomes large (More than 500 MB).
> 
> I think it's because of where libc is mapped into memory (sbrk stops when it
> hits it).

Ok, I managed to find a clue to what happened. 

I was wrong when I said I mallocated 1MB blocks (my fault :( ). 

Actually, I malloced blocks of 1024 bytes by bunches of 1024... 

So I re-ran my tests on a 128MB computer/ 1 GB swap.

While mallocing 1MB blocks, I managed to allocate 1.9 GB!
While mallocing 2KB blocks, I managed to allocate 995 MB.
While mallocing 1KB blocks, I managed to allocate 887 MB.
While mallocing 1B blocks, I managed to allocate 114KB!! (my test prog
took actually 895MB of memory on 'top' :))

Got a hint?

Thanks,

- Olivier

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

From: Richard Bonomo <[EMAIL PROTECTED]>
Subject: Re: Linux driver module question
Date: Fri, 01 Sep 2000 13:27:32 -0500

Hello!
I just got done writing my first device driver recently.  Alessandro
Rubini's book (Linux Device Drivers) provides much good information,
including how to debug.  The copy I have is a bit dated, in that
it just barely covers my kernel version (2.2.12-20), as an appendix.
I think he's getting another version together though.

Rich B.

Ed Hudson wrote:
> 
> Thanks to all for your responses.  Sorry the wording was a bit off, I
> am rather new to Linux driver programming and am trying to give myself
> a crash course.  The most simplistic view of the problem is that the
> board in question needs a physical address to write to.  The user will
> provide data, and a destination address where he expects to read it
> back from.  In the driver, I need to make sure that the destination
> address is mapped to a physical location and stays that way until the
> board writes its data back.  To make things more difficult, I have
> been asked to provide kernel 2.0 support as well.  Is this feasible?
> Also, does anyone have a pointer to a good explanation of kernel
> module debugging?  The printk's are ok, but I am itching to step
> through the code and see where things are falling apart.
> 
> Thanks again
> 
> Ed
> 
> On Fri, 25 Aug 2000 03:58:38 GMT, [EMAIL PROTECTED] (Pete Zaitcev)
> wrote:
> 
> >Hehe, a witty response! Ed's wording was not very good but I guess
> >he asked how to pin down user pages in the way of bp_mapin()
> >in Solaris, or some such. I did not answer because the canonical
> >answer is "You cannot do that. Use kmalloc() and copy_to_user().".
> >This is not the whole story, as some people pushed for DMA
> >into a user memory, for instance Werner Almesberger (sp?) did
> >something about it in the context of ATM support. Apparently,
> >2.4 is supposed to have some user memory DMA support.
> >Also, you can do get_free_pages() than remap this into
> >user space with remap_page_range() when user calls mmap(2).
> >However, it's only a partial solution.
> >
> >--Pete
> >
> >On Thu, 24 Aug 2000 20:57:44 GMT, Norm Dresner <[EMAIL PROTECTED]> wrote:
> >> Unless I'm reading your question wrong, you seem to be asking how to prevent
> >> the kernel from swapping out the physical memory on your PCI board.  The
> >> only way the kernel can do that is if you don't screw the board down tightly
> >> enough.
> >>
> >>     Norm
> >>
> >> Ed Hudson <[EMAIL PROTECTED]> wrote in message
> >> news:[EMAIL PROTECTED]...
> >> > I am writing a kernel module driver for a custom PCI based DSP board.
> >> > The board needs access to physical memory locations.  I am using
> >> > virt_to_phys() to translate the addresses, but I believe I need to
> >> > implement a locking mechanism so that the locations I refer to are not
> >> > swapped.  Does any have any suggestions on how I may go about doing
> >> > this?  Any links to reference materials or example drivers would be
> >> > much appreciated.
> >> >
> >> >
> >> > Thanks,
> >> > Ed Hudson

-- 
************************************************
Richard Bonomo
UW Space Astronomy Laboratory
ph: (608) 263-4683 telefacsimile: (608) 263-0361
SAL-related email: [EMAIL PROTECTED]
all other email: [EMAIL PROTECTED]
web page URL: http://www.cae.wisc.edu/~bonomo
************************************************

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

From: David Wu <[EMAIL PROTECTED]>
Subject: Alocate a memory location above 4G of memory
Date: Fri, 01 Sep 2000 14:40:30 -0400

In linux 2.4, ( since it supports up to 64G of memory) is it possible is
specify a physical address of greater than 4G bytes in mmap's address
parm. ?
My basic problem is that I need to address a specific memory location
which is  above the 4G bytes.  If mmap cannot do it , can I write a
device driver to do the allocation for the application.  ( I'm thinking
about the Intel's PSE36 driver in Window NT which allows an user to
address memory above 4G)

Thanks .... Dave Wu


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


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