Linux-Development-Sys Digest #565, Volume #8     Wed, 14 Mar 01 11:13:14 EST

Contents:
  Re: Setting Linux Disk Buffer Cache (Marty)
  Re: AMR ??? (Tim Roberts)
  Re: AMR ??? (Lew Pitcher)
  Re: system call interface to insmod (Kasper Dupont)
  Re: missing definitions (linker problem) (Rene Herman)
  Re: Trouble Booting Linux Redhat-7/kernel paging request (Kasper Dupont)
  bridge module and kernel 2.4 pb ("Gautier Harmel")
  Re: versionless module (Josef Moellers)
  Ptracing and following cloned processes ([EMAIL PROTECTED])
  Re: missing definitions (linker problem) (Daniel Koerner)
  Re: Can linux be trusted? (pete)
  Re: problem using poll for multiple socket ([EMAIL PROTECTED])
  Re: How to count a period of time? (Derek Viljoen)
  Re: How to use C++ to develope kernel module? (Derek Viljoen)
  Re: system call interface to insmod (Derek Viljoen)
  signal.c ("Mikael Chambon")
  Re: How to use C++ to develope kernel module? ([EMAIL PROTECTED])
  Re: signal.c (Josef Moellers)

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

From: Marty <[EMAIL PROTECTED]>
Subject: Re: Setting Linux Disk Buffer Cache
Date: Wed, 14 Mar 2001 13:29:40 +0800

AFAIK, the block size of the ext2 file system can be specified in the mke2fs
command.
However, the currently valid blocksize are 1024, 2048 and 4096 only.
For more details, see man mke2fs.

Marty.

Andries Engelbrecht wrote:

> I already recieved replies back that it is not possible to fix the buffer
> cache to a certain value. Is it however possible to set the block size of
> the filesystem in Linux? I'm using ext2 filesystems.
>
> Andries Engelbrecht wrote:
> >
> > Is it possible to set Linux to use a certain amount of RAM for disk
> buffer
> > cache or a percentage of total RAM for this purpose?
> >
> > If so, how can I do it?
> >
>
> --
> Posted via CNET Help.com
> http://www.help.com/


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

From: Tim Roberts <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: AMR ???
Date: Tue, 13 Mar 2001 22:44:14 -0800

Aminudin Khalid <[EMAIL PROTECTED]> wrote:
>
>Well , I just want to know is there any project to support AMR devices in
>Linux or may be developing AMR library  .
>If I want to develop a AMR device driver what should I study ? Do I have to
>study the AMR architecture and specification .

It's an Intel specification, so I'd start at http://developer.intel.com.

I actually tried to chase down the exact URL for you when I read your first
post a couple of days ago, but I got into an infinite loop following links
on their AC97 page (AMR is related to AC97).  This page gets close:

   http://developer.intel.com/ial/scalableplatforms/audio/

They talk about CNR, the "communications and network riser".  My
interpretation of the information there is that CNR is a more general
specification, of which AMR happens to be one subset.  If that is true,
then this page might be of help:

   http://developer.intel.com/technology/cnr/index.htm

Good luck.
--
- Tim Roberts, [EMAIL PROTECTED]
  Providenza & Boekelheide, Inc.

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

From: Lew Pitcher <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: AMR ???
Date: Tue, 13 Mar 2001 22:34:35 -0500

Aminudin Khalid wrote:
> 
> Hi,

Hello
 
> What is AMR  ?

It means "Audio Modem Riser", which is a way to implement a modem and/or
soundcard without going through the system bus.

> Where can I get the AMR specification ?

IIRC, Intel is the source

> Does Linux support AMR devices ?

Not really. 

> Do we have any linux library to program AMR devices ?

Not that I know of. You might check freshmeat (http://freshmeat.net/)
for software, though.


-- 
Lew Pitcher

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

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: system call interface to insmod
Date: Wed, 14 Mar 2001 08:49:35 +0000

Jothi P Neelamegam wrote:
> 
> 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

The insmod program does a lot of work resolving
symbols, you probably don't want to implement
that in your program.

I suggest you use system() or fork() and exec()
to let either insmod or modprobe do the hard
work for you.

If you really want to do it yourself, you need
to use the following systemcalls: create_module(),
get_kernel_syms(), query_module(), init_module(),
and delete_module(). And you also need to know
the format of the .o files.

-- 
Kasper Dupont

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

From: Rene Herman <[EMAIL PROTECTED]>
Subject: Re: missing definitions (linker problem)
Date: Wed, 14 Mar 2001 09:57:51 +0100

Daniel Koerner wrote:

> undefined reference to `__check_eh_spec'

I guess these have something to do with C++ exception handlers. I can't 
be of any more help I'm affraid, knowing little to nothing about them 
myself but since there were no other replies, I thought I'd respond 
anyway. Hopefully this is still enough of a clue to let you solve the 
problem yourself.

Rene.

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Trouble Booting Linux Redhat-7/kernel paging request
Date: Wed, 14 Mar 2001 09:06:10 +0000

walt wrote:
> 
> PLEASE HELP ME I am new to Linux! I have just loaded Linux Redhat-7
> (workstation) on my Compaq Presario 2100 and I am having trouble getting
> it to boot.Everytime I try to boot the operating system it locks up and
> the only way to get out of frozen screen is to power down the system. I
> get the following message on my screen:
> 
> Call Trace : Bad EIP value
> Code: <17> Unable to handle kernel paging request at virtual address
> 0000b4fc
> Oops:0000
> CPU:0
> EIP: 0010 : [<c010a4d7>]
> 
>  The hardware on the system is a Cyrix 133Mhz (processor type 80486 DX),
> 2.1 Gb IDE/ESDI harddrive, 64 Mb of ram, 8x cdrom,compaq 336-df
> modem,creative labs sound blaster-16 soundcard, a standard PS/2
> mouse,standard 101 key keyboard,ISA bus,and a Phoenix BIOS- version EPP
> revision 3.00
> 
> If you need more information please feel free to contact me at
> [EMAIL PROTECTED]
> 
> Thanks
> 
> --
> Posted via CNET Help.com
> http://www.help.com/

Red Hat 7.0 comes with three different kernels.
Do you know which one you are using?

At which point during startup does this happen?
What text was on the screen before the Oops
message.

I looked through the kernel symlist, assuming I
guessed corectly on which kernel you are using
the error happens in the function do_divide_error.

Does anybody know if there could be some FPU
problem with that particular CPU and an option
to enable some workaround?

-- 
Kasper Dupont

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

From: "Gautier Harmel" <[EMAIL PROTECTED]>
Subject: bridge module and kernel 2.4 pb
Date: Wed, 14 Mar 2001 11:08:22 +0100

Hi all,

I'm trying to insmod the bridge module of the 2.4.2 kernel, and I get 2
unresolved symbols :

br_handle_frame_hook
br_ioctl_hook

I had a look to the kernel and the bridge module sources and those symbol
seems to be correctly exported.
Also, when I do a ksyms -a, I can found them, so I guess there really
correctly exported.

Does anyone 's got the same pb ?

Should it be a pb with the mod-utils tools ?

Thanks for help

Gautier




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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: versionless module
Date: Wed, 14 Mar 2001 11:10:59 +0100

Michael Andrew Posadas wrote:
> =

> I am trying to write a loadable driver module that will run on multiple=

> kernel versions.  Can someone explain how to do this or point me to
> references that will.  Thanks

Educated(?) guess:

The kernel version can be ignored by using the -f option with insmod.
Apparently this facility is not available with modprobe.

As to kernel symbols: you'd have rewrite those parts of insmod that deal
with kernel symbol resolving in order to ignore any symbol version.

Haven't been there, haven't done that.

Josef
-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize
                                                -- T.  Pratchett

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

From: [EMAIL PROTECTED]
Subject: Ptracing and following cloned processes
Date: Wed, 14 Mar 2001 06:04:28 -0500
Crossposted-To: comp.os.linux.development.apps

does anyone know if there is a reliable (little or
no race condition) way of ptracing cloned processes
in Linux. I understand this is still a rather tricky
thing to do on kernel 2.2 and even strace cant reliably
follow cloned processes. Wat abt kernel 2.4? Can it be done
without tampering with the kernel source?

thanks!

jason


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

From: [EMAIL PROTECTED] (Daniel Koerner)
Subject: Re: missing definitions (linker problem)
Date: Wed, 14 Mar 2001 11:56:38 +0000 (UTC)

Rene Herman ([EMAIL PROTECTED]) wrote:
: Daniel Koerner wrote:

: > undefined reference to `__check_eh_spec'

: I guess these have something to do with C++ exception handlers.

Sounds good. Better than the garbage found by google. Thanks for the hint.


Daniel

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

From: pete <[EMAIL PROTECTED]>
Crossposted-To: 
comp.lang.c,comp.os.linux.development.apps,comp.sys.be.programmer,comp.sys.mac.programmer.misc,comp.unix.bsd.freebsd.misc,comp.unix.bsd.misc,gnu.gcc
Subject: Re: Can linux be trusted?
Date: Wed, 14 Mar 2001 07:42:42 -0500
Reply-To: [EMAIL PROTECTED]

Erik Max Francis wrote:
> 
> pete wrote:

> I said, it would be a better idea for the caller to supply the buffer
> themselves.

I agree.
It took me a while to come around to your way of thinking,
but I'm doing it that way now.

-- 
 pete

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

From: [EMAIL PROTECTED]
Subject: Re: problem using poll for multiple socket
Date: Wed, 14 Mar 2001 14:14:31 -0000

On Tue, 13 Mar 2001 20:57:54 -0800 Rud <[EMAIL PROTECTED]> wrote:

| I all I'm using the poll function to wait on multiple fd all fd are
| non-blocking
| when I try to send data to the socket and I get an error
| and if errno is set to EAGAIN I set for my fd the POLLOUT flag
| like this my_poll[i].events |= POLLOUT
| and I have a pipe to force the poll to read again all descriptors
| to do that I write to the pipe.
| my question is sometimes I never get the POLLOUT event and no data can
| be sent to the pending socket afer that since if I force it while not
| having the POLLOUT event
| I always get the EAGAIN set in errno if for example I close the socket I
| can send again to the remaining socket
| my bet is for reason All socket are block.
| can some one help figure out what is going on since I dont want to have
| to close the socket for all pending socket
| when ever I get errno set  to EAGAIN and I dont want to try to send
| forever
| if you need more information please let me know or if my problem is not
| clear

Some code would help to se what youa re doing wrong.  But you should not
need to close anything to use anything else.

When poll() wakes up, it returns the number of fds which are aready.
You can just test for a non-zero value and go on.  If it is zero,
then it was some other wakeup like a timeout or signal.

Scan through the poll structure for ready fds and try again to write
or read based on which are ready.  It is possible to get EAGAIN yet
again, and if that happens it should be treated the same as before.
This might happen if resources are strained an not enough space is
immediately available.  If you had just written data to a previous
fd this is slightly more likely now.

Be sure to NOT list any fds in the struct for which your program has
no current interest in writing (has nothing write right now) or in
reading.  You'd get false wakeups from poll() if you did that, when
the fd is ready even if you have nothing to write.  The same goes
for read.  If there is data ready to be read, but your program has
no interest in reading it at the moment (maybe because the buffer
to read it into is full because its waiting to write it out to some
other fd) then don't give it to poll().

If you successfully write or read any fd, poll() is pointless.  Go
back and write or read more, until either you do get EAGAIN, or the
program no longer has interest in writing or reading.  If you do
call poll() it will most likely just return immediately because the
fd you had success with most likely is still ready.  Just assume it
is ready until you find that it is not.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: Derek Viljoen <[EMAIL PROTECTED]>
Subject: Re: How to count a period of time?
Date: Wed, 14 Mar 2001 09:33:44 -0500
Reply-To: [EMAIL PROTECTED]

use gettimeofday().

InterFan wrote:

> I want to count a period of time in my program. I want the time be
> precise to 1/1000 seconds.
> I think the function "time()" can't be used to solve it. And I tried
> function "clock(()".
> But this function just return "0".
> How will I do?
> thanks.
> 
> 
> Best Regards,
> Chuan He


-- 
     ___               __  _                  * [EMAIL PROTECTED]
     /  ) _  _  _   /   / / . / . _   _  _    * (609) 734-3061 (W)
  (_/__/ (/_/__(/__/<  (_/ /_/_/_(_)_(/_( )__ * ICBM Addr: 39N 58' 21"
                             _/               *            74W 47' 49"


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

From: Derek Viljoen <[EMAIL PROTECTED]>
Subject: Re: How to use C++ to develope kernel module?
Date: Wed, 14 Mar 2001 09:47:01 -0500
Reply-To: [EMAIL PROTECTED]

You can't do C++ in the kernel.

You're running into name-mangling problems with the symbols in the C++=20
file.  If you insist on keeping them as C++ files, you'll have to do an=20
extern "C" on them to preempt the mangling.

BTW, you can "see" the problem with nm on your .o file.

$ nm mymod.o

and to see them unmangled

$ nm mymod.o | c++filt


Alexander Viro wrote:

> In article <[EMAIL PROTECTED]>,
> =BCB=A4_=BA=D5 <[EMAIL PROTECTED]> wrote:
>=20
>> Hello,
>>   I need to port a driver module written in C++  to linux . But
>> I found some problem. For example, the function "printk" will
>> not show results on screen; the "udelay" will causes "unresolved
>> symbols" when I install the module. But if I change the files name
>=20
>>from *.cpp to *.c, the problems are all disappeared.
>=20
>>  Can  C++  be used in developing kernel module? and if yes, how
>> can I do to fix the problems?
>=20
>=20
> Write in C.


--=20
     ___               __  _                  * [EMAIL PROTECTED]
     /  ) _  _  _   /   / / . / . _   _  _    * (609) 734-3061 (W)
  (_/__/ (/_/__(/__/<  (_/ /_/_/_(_)_(/_( )__ * ICBM Addr: 39N 58' 21"
                             _/               *            74W 47' 49"


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

From: Derek Viljoen <[EMAIL PROTECTED]>
Subject: Re: system call interface to insmod
Date: Wed, 14 Mar 2001 09:50:56 -0500
Reply-To: [EMAIL PROTECTED]

I would suspect that the "correct" way of acomplishing this is through 
depmod.  But, AFAIK you wouldn't be able to pick and choose what module 
you want based on state within your dependent module.  So, if you are 
making programatic choices on which module at runtime, then  you could 
use these system calls.


Kasper Dupont wrote:

> Jothi P Neelamegam wrote:
> 
>> 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
> 
> 
> The insmod program does a lot of work resolving
> symbols, you probably don't want to implement
> that in your program.
> 
> I suggest you use system() or fork() and exec()
> to let either insmod or modprobe do the hard
> work for you.
> 
> If you really want to do it yourself, you need
> to use the following systemcalls: create_module(),
> get_kernel_syms(), query_module(), init_module(),
> and delete_module(). And you also need to know
> the format of the .o files.


-- 
     ___               __  _                  * [EMAIL PROTECTED]
     /  ) _  _  _   /   / / . / . _   _  _    * (609) 734-3061 (W)
  (_/__/ (/_/__(/__/<  (_/ /_/_/_(_)_(/_( )__ * ICBM Addr: 39N 58' 21"
                             _/               *            74W 47' 49"


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

From: "Mikael Chambon" <[EMAIL PROTECTED]>
Subject: signal.c
Date: Wed, 14 Mar 2001 16:00:56 +0100

Hi


What does it mean to kill the process 0 ??

As far as I know there is no process 0, but when you look in kernel/signal.c
in the function kill_something_info() is the pid is 0  there is a return
kill_pg_info(sig, info, current->pgrp)

Does someone know why ??

Does someone could explain me what is the pgrp in the task_struct ??

thanks for all !!!


--
Mikael Chambon
[EMAIL PROTECTED] || [EMAIL PROTECTED]
ICQ 10249913       || http://www.cronos.org



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

From: [EMAIL PROTECTED]
Subject: Re: How to use C++ to develope kernel module?
Date: Wed, 14 Mar 2001 15:15:21 GMT

Derek Viljoen <[EMAIL PROTECTED]> writes:
> You can't do C++ in the kernel.

Well, it's _theoretically_ possible, and might have certain _slight_
advantages over just plain C.

However, those slight advantages are _heavily_ overweighed by the
_massive_ disadvantages:

- You wind up with a severely gutted C++, as STL, complex
  constructors, exception handling, and such will _not_ be coming along
  for the ride.

- There are name mangling issues, as has been nicely documented.

- Since Linux is developed in C, and the core developers are
  completely uninterested in moving to C++, they're not going to be
  integrating your code into the main code base, and you'll be
  perpetually left re-porting the module any time the kernel changes.

The question pops up continually; I haven't actually seen any links to
information on how people have _actually used_ C++ kernel modules.
-- 
(concatenate 'string "cbbrowne" "@acm.org")
http://www.ntlug.org/~cbbrowne/linuxkernel.html
Rules of  the Evil  Overlord #120. "Since  nothing is  more irritating
than a hero  defeating you with basic math skills,  all of my personal
weapons  will be  modified to  fire one  more shot  than  the standard
issue." <http://www.eviloverlord.com/>

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: signal.c
Date: Wed, 14 Mar 2001 17:06:18 +0100

Mikael Chambon wrote:
> =

> Hi
> =

> What does it mean to kill the process 0 ??

=46rom the on-line manual (man IS your friend B-{)

       If pid equals 0, then sig is sent to every process in  the
       process group of the current process.

Does this answer the rest of your questions?

> As far as I know there is no process 0, but when you look in kernel/sig=
nal.c
> in the function kill_something_info() is the pid is 0  there is a retur=
n
> kill_pg_info(sig, info, current->pgrp)
> =

> Does someone know why ??
> =

> Does someone could explain me what is the pgrp in the task_struct ??
> =

> thanks for all !!!

A votre service,

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize
                                                -- T.  Pratchett

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


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