Linux-Development-Sys Digest #158, Volume #8 Tue, 19 Sep 00 14:13:14 EDT
Contents:
Re: new windowing system ([EMAIL PROTECTED])
Re: new windowing system ("Fr�d�ric G. MARAND")
Re: 64M buffer passed from user to kernel (Mathias Waack)
Re: scheduling under Linux not suitable for interactive work? (Tor Arntsen)
Where is the source code for "ps" ? ([EMAIL PROTECTED])
Re: Where is the source code for "ps" ? (Josef Moellers)
Re: Where is the source code for "ps" ? (Qing Liu)
help with kernel sound driver development (ess maestro-1) (Ray Fencey)
the kernel firewall (Bart De Schuymer)
Re: new windowing system (Juliusz Chroboczek)
Re: -lcrypt ("mconroy")
Sleep-on ("mconroy")
Memprof -- lack of behavior. (Thaddeus L Olczyk)
Multiple c source files for a kernel module? (Ed Hudson)
Re: passing a member func. as start routine (=?iso-8859-1?Q?Hans=2DJ=FCrgen?= Lange)
Re: Memprof -- lack of behavior. (Art Haas)
Re: the kernel firewall (Paul Kimoto)
PC speaker text-to-speech (Jerome Corre)
file locking? ("vb")
Re: Memprof -- lack of behavior. (Thaddeus L Olczyk)
Re: 64M buffer passed from user to kernel (lsnover)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Date: Tue, 19 Sep 2000 05:25:57 GMT
In article <sSUv5.5422$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> The problem is that in order to construct that "faster, more efficient
> windowing system," you have to pick some set of functionality to give
> up on. And the set of functionality _you_ are willing to give up
> isn't necessarily compatible with the set of functionality _I_ am
> willing to eschew, is not necessarily the same as someone else's
> needs.
Not having writen any code for X, and not really understanding how the
core of X works... I would like to know why, WHY!!!, are not these great
features set up as run time loadable modules like the kernel modules of
Linux?
Having only one person use my computer, me, and only having one instance
of it running at a time, and not needing may of the "server" needs of
other, I think that about 50 to 80% of the bloat could be turned off by
not loading a module or a few.
Let me thin down my X, let me run lean!
Of course I may not have a clue what I a yapping about, I am just a
user.
--
Micro$haft Windoze, for when security,
reliability and money are of no concern!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "Fr�d�ric G. MARAND" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Date: Tue, 19 Sep 2000 10:17:59 +0200
With X11R3 and R4 you could build X choosing which extensions you linked
with the server. I can only suppose this is still the case today. Some
extensions add to the code volume but also to the speed of the server (the
Shared memory transport, for instance, in X11R4, was a much needed
improvement over sockets-only. I think it is now builtin ?)
<[EMAIL PROTECTED]> a �crit dans le message :
8q6tcm$fe0$[EMAIL PROTECTED]
> In article <sSUv5.5422$[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
[...]
> Not having writen any code for X, and not really understanding how the
> core of X works... I would like to know why, WHY!!!, are not these great
> features set up as run time loadable modules like the kernel modules of
> Linux?
> Having only one person use my computer, me, and only having one instance
> of it running at a time, and not needing may of the "server" needs of
> other, I think that about 50 to 80% of the bloat could be turned off by
> not loading a module or a few.
[...]
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: 64M buffer passed from user to kernel
Date: 19 Sep 2000 10:32:12 +0200
[EMAIL PROTECTED] (Pete Zaitcev) writes:
> On Mon, 18 Sep 2000 18:48:50 GMT, lsnover <[EMAIL PROTECTED]> wrote:
> > I need to allocate a 64MB of contiguous memory which needs to be
> >mapped into user memory. Then the buffer will be passed to a kernel
> >module for DMAing to a custom PCI board. I've heard one approach is
> >to use kmalloc() and copy_to_user(). Is this my only option? Does
> >copy_to_user() create a second copy of the buffer, hence creating 2
> >64MB buffers?
>
> I guess you deal with an MPEG encoder/decoder or video capture board.
> The only way to get 64MB is to use Pauline's Bigphisarea,
No, there are other possible solutions. I prefer reserving memory at
boot time by passing a mem switch to kernel. Its IMHO a cleaner solution then
patching a kernel.
Another really dirty solution would be a mechanism known as "aggressive
allocation": try to allocate as much memory as possible, check for
physical continuous pages, release the other pages. Continue as long
as necessary. But I wouldn't do that.
Mathias
------------------------------
From: [EMAIL PROTECTED] (Tor Arntsen)
Subject: Re: scheduling under Linux not suitable for interactive work?
Date: Tue, 19 Sep 2000 09:52:40 GMT
[EMAIL PROTECTED] writes:
>I'll make some additional experiments to check various theories people
>presented in their replies. I can notice that everything revolves
>about insufficient memory. The same PC worked happily with 32Mb and
>48Mb under similar circumstances. I find it REALLY HARD to believe
>that one X server, one emacs session (editting 2MB text file) and a
>couple of X terms cannot fit 64MB comfortably. I would find it hard to
>believe even if memory was only 32MB. X server and emacs are not so
I agree. Until the power supply broke down after eight years 24x7
operation I was running much more than that on my 16MB Linux box.
(In addition it was running web, proxy, and cvs services and more.)
Occasionally I would run two X-servers on it, and I always had lots
and lots of xterms running. It was at 2.0.38 when it finally died.
No trashing problems (except when I compiled Mozilla, it would eat
deeply into swap on the final link stage).
Unlike you I did have a swap partition. Unless you have hundreds
of megs of RAM you can always use one.
-Tor
------------------------------
From: [EMAIL PROTECTED]
Subject: Where is the source code for "ps" ?
Date: Tue, 19 Sep 2000 10:22:56 GMT
I am doing my homework and looking for some source code to implement
some command like "ps" in UNIX. I know that the linux has open source
code, I had redhat6.2 CD-ROM and installed it on my PC, but I can not
find the relevant code for "ps".
Can someone help me?
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Where is the source code for "ps" ?
Date: Tue, 19 Sep 2000 13:21:49 +0200
[EMAIL PROTECTED] wrote:
> =
> I am doing my homework and looking for some source code to implement
> some command like "ps" in UNIX. I know that the linux has open source
> code, I had redhat6.2 CD-ROM and installed it on my PC, but I can not
> find the relevant code for "ps".
As simple as 1-2-3:
1 you can use "rpm -qf <pathname>" to find out which package contains
the file <pathname>, e.g.
rpm -qf /bin/ps
2 you use "rpm -qi <packagename>" to find out information about the
package, e.g.
rpm -qi procps
3 you dig out the second redHat CD and find and install the procps
source rpm.
You can usually leave out step 2 because most source rpms are named
after their binary rpms, but then it would only be easy as 1-3 and that
sounds awfull B-{)
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
------------------------------
From: Qing Liu <[EMAIL PROTECTED]>
Subject: Re: Where is the source code for "ps" ?
Date: 19 Sep 2000 13:26:28 +0200
[EMAIL PROTECTED] writes:
> I am doing my homework and looking for some source code to implement
> some command like "ps" in UNIX. I know that the linux has open source
> code, I had redhat6.2 CD-ROM and installed it on my PC, but I can not
> find the relevant code for "ps".
$ ps --version
procps version 2.0.4
The package you are looking for is procps.
--
Liu
------------------------------
From: Ray Fencey <[EMAIL PROTECTED]>
Subject: help with kernel sound driver development (ess maestro-1)
Date: Tue, 19 Sep 2000 11:31:32 GMT
re: sample code for ess maestro-1/agogo-xp w/pt101 codec?
hi folks
i'm currently trying to get my soundcard that uses the ess maestro-1
agogo-xp chipset. the only problem is that my card uses a pt101 codec
instead of a ac97 codec.
i've just been ess tech's ftp site
ftp://ftp.esstech.com.tw/PCIAudio/Maestro1/
but the index.txt file says that there is some sample code available to
test the board (although i cant see it in the dir structure) and wonder
if anyone has in the past grabbed a copy - apparantly its called
Tst108.ZIP.
failing that, i would be grateful if someone out there could give me
pointers on where i can get really low level technical docs about the
ess maestro-1/agogo-xp w/pt101 codec chipset.
i've built the 2.2.17 kernel with support for the said card but it doesn
t work (actually, i had to re-enable some code that been commented out
that was specific to maestro cards with the pt101 codec) which is my
reason for looking for such docs.
thanks
ray
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Bart De Schuymer)
Subject: the kernel firewall
Date: Tue, 19 Sep 2000 12:35:34 GMT
Hello,
For my thesis I have to improve the kernel firewall.
I think this is ipchains these days (instead if ipfwadm).
I haven't been able to locate the source code yet though.
I found the webpage for ipfwadm sourcecode (www.xos.nl), but didnt
find anything for ipchains.
Isn't this supposed to be somewhere in the linux source code tree? And
where exactly?
So, if anyone knows where I find the code please let me know...
best regards,
Bart
------------------------------
From: Juliusz Chroboczek <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Date: 19 Sep 2000 15:04:04 +0100
[EMAIL PROTECTED]:
gop> Not having writen any code for X, and not really understanding how the
gop> core of X works... I would like to know why, WHY!!!, are not these great
gop> features set up as run time loadable modules like the kernel modules of
gop> Linux?
They are in XFree86 4.*..
gop> Let me thin down my X, let me run lean!
If you look at your XFree86 4.0.1 and 4.0.2 tree (okay, the latter is
not out yet, but what's a few weeks between friends), you'll notice a
directory ``xc/programs/Xserver/hw/kdrive'' which contains the sources
to Keith Packard's ``tiny X'' server. On Linux/x86, full X with a
number of common extensions, with full networking capability, at the
cost of 600KB text. If you use modest applications (twm, not E, for
starters), it is useful in 1MB RAM.
How much thinner than that do you think you're going to get?
J.
------------------------------
From: "mconroy" <[EMAIL PROTECTED]>
Subject: Re: -lcrypt
Date: Tue, 19 Sep 2000 10:10:46 -0400
Well, then only thing I can think, then, is that your OS can't find it. I
find this REALLY hard to believe, but check your /etc/ld.so.conf file to
make sure entry references the library. You can always look at the
config.in script to figure out where it's trying to FIND the lib. If you do
make changes to /etc/ld.so.conf, don't forget to run /sbin/ldconfig to
refresh the so cache.
Cheers,
Mike
B.Lim wrote in message ...
>Well, I already have glibc install on Debian 2.2 and libcrcrypt
>is present.
------------------------------
From: "mconroy" <[EMAIL PROTECTED]>
Subject: Sleep-on
Date: Tue, 19 Sep 2000 10:29:42 -0400
I've scoured a fair number of examples, but I haven't found anything too
close to what I want...so...
I need to figure out how to make my driver less CPU-aggressive. I've
created a special printer driver that polls the printer for busy-status when
trying to write to it. Turns out that the driver is aggressive enough to
lock everything else out as it polls if the printer stays busy for long
periods of time. I've been trying to use schedule(),
module_interruptible_sleep_on(), and a whole bunch of other constructs, but
I'm just not getting good results.
Loop is:
while(!(getPortStatus() & PR_STAT_BUSY));
{
udelay(5);
}
outb(addr[i], portAddress+PR_DATA);
strobe();
... etc.
My latest iteration looks like:
while(!(getPortStatus() & PR_STAT_BUSY));
{
udelay(5);
nRetry++;
if(nRetry > 10000)
{
nRetry=0;
queue_task(&Task, &tq_timer);
module_interruptible_sleep_on(&WaitQ);
printk(KERN_DEBUG "Came back from Wait\n");
}
}
outb(addr[i], portAddress+PR_DATA);
strobe();
... etc.
I just want to be able to even MOVE the mouse when the printer is busy and
there's data to send.
Thanks,
Mike Conroy
------------------------------
From: [EMAIL PROTECTED] (Thaddeus L Olczyk)
Subject: Memprof -- lack of behavior.
Date: Tue, 19 Sep 2000 14:36:26 GMT
Reply-To: [EMAIL PROTECTED]
Someone suggested I use memprof for checking memory leaks.
OK so to try it out I compile test code several ways:
one way is to compile straight.
Next use the -g option.
Next use the -p option (it does profiling ).
Next use the -pg option.
Next -g -p.
Next -p -pg.
The test code is:
int main(int argc,char *argv[]
{
char *p=new char[10];
char *q=(char *)malloc(10);
p=0;
q=0;
return 0;
}
I try running it in memprof, no results on profile or leak screen.
Any idea what the problem is?
TIA
------------------------------
From: Ed Hudson <[EMAIL PROTECTED]>
Subject: Multiple c source files for a kernel module?
Date: Tue, 19 Sep 2000 11:22:26 -0400
Is it possible to create a kernel module from more than one source
file? If so, how would you go about compiling it?
Thanks,
Ed
------------------------------
From: =?iso-8859-1?Q?Hans=2DJ=FCrgen?= Lange <[EMAIL PROTECTED]>
Crossposted-To: comp.programming.threads
Subject: Re: passing a member func. as start routine
Date: Tue, 19 Sep 2000 17:24:38 +0100
Bhavin Shah schrieb:
> Hi,
>
> How do you use a member function as the start routine
> to pthread_create? Pthread_create takes a
> void * (*)(void *) parameter, but a member func. is
> void * (Class::*)(void *)
>
> I'm tried pthread_create(..., &start_routine, ...),
> but am getting warnings about the casting above.
>
> TIA.
make a global function fnc(void *) calling the member function.
the passed void-pointer is the this-pointer of your object. I haven't
the pthread_... prototypes so I cannot give you more.
Inside the global function you cast the void-pointer to the
class-pointer.
That's all.
Hans-J=FCrgen Lange
------------------------------
From: Art Haas <[EMAIL PROTECTED]>
Subject: Re: Memprof -- lack of behavior.
Date: 19 Sep 2000 11:01:21 -0500
[EMAIL PROTECTED] (Thaddeus L Olczyk) writes:
> Someone suggested I use memprof for checking memory leaks.
> OK so to try it out I compile test code several ways:
> one way is to compile straight.
> Next use the -g option.
> Next use the -p option (it does profiling ).
> Next use the -pg option.
> Next -g -p.
> Next -p -pg.
> The test code is:
>
> int main(int argc,char *argv[]
> {
> char *p=new char[10];
> char *q=(char *)malloc(10);
> p=0;
> q=0;
> return 0;
> }
> I try running it in memprof, no results on profile or leak screen.
> Any idea what the problem is?
> TIA
Memprof seems to need to have the program running for it to work its
magic, so you may want to do something like adding a sleep() call in
your code. Here's how I'd fix your code (I'm going to drop the C++
new() call)
$ cat mptest.c
#include <stdlib.h> /* malloc(), EXIT_SUCCESS */
#include <unistd.h> /* sleep() */
int main (int argc, char *argv[])
{
char * p = malloc(10);
char * q = malloc(10);
p = NULL;
q = NULL;
sleep(1000);
return EXIT_SUCCESS;
}
Compile the code with `-g' for best results.
$ gcc -g -o mptest mptest.c
Then run it under memprof. While your code is sleeping, you can check
for leaks, and you should find that both `p' and `q' are leaked.
--
###############################
# Art Haas
# (713) 689-2417
###############################
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: the kernel firewall
Date: 19 Sep 2000 13:13:37 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>, Bart De Schuymer wrote:
> For my thesis I have to improve the kernel firewall.
> I think this is ipchains these days (instead if ipfwadm).
> I haven't been able to locate the source code yet though.
> Isn't this supposed to be somewhere in the linux source code tree? And
> where exactly?
The kernel-space part, but not the user-space part.
See http://netfilter.kernelnotes.org/ipchains/ .
In 2.4.*, ipchains will be replaced by netfilter:
see http://netfilter.kernelnotes.org/ .
--
Paul Kimoto
This message was originally posted in plain text. Any images,
hyperlinks, or the like shown here have been added without my
consent, and may be a violation of international copyright law.
------------------------------
From: Jerome Corre <[EMAIL PROTECTED]>
Subject: PC speaker text-to-speech
Date: Tue, 19 Sep 2000 17:16:02 GMT
hi,
I was just wondering if their is any way of using the pc speaker to play
sound? Is their any ready made module (i use the redhat 6.1 kernel) to
control the device? Is there any application available for linux to do
text to speech (i am not looking for quality here since the pc speaker
is gonna be the sound device, but for a small and simple application)
thanks for any help
Jerome
--
Jerome Corre
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "vb" <[EMAIL PROTECTED]>
Subject: file locking?
Date: Tue, 19 Sep 2000 12:36:25 -0500
Can anyone point me to a place where I can read up on file locking for Linux? I mean
shared verses non-shared file access.
thanks
vb
------------------------------
From: [EMAIL PROTECTED] (Thaddeus L Olczyk)
Subject: Re: Memprof -- lack of behavior.
Date: Tue, 19 Sep 2000 17:37:22 GMT
Reply-To: [EMAIL PROTECTED]
On 19 Sep 2000 11:01:21 -0500, Art Haas <[EMAIL PROTECTED]>
wrote:
>[EMAIL PROTECTED] (Thaddeus L Olczyk) writes:
>
>> Someone suggested I use memprof for checking memory leaks.
>> OK so to try it out I compile test code several ways:
>> one way is to compile straight.
>> Next use the -g option.
>> Next use the -p option (it does profiling ).
>> Next use the -pg option.
>> Next -g -p.
>> Next -p -pg.
>> The test code is:
>>
>> int main(int argc,char *argv[]
>> {
>> char *p=new char[10];
>> char *q=(char *)malloc(10);
>> p=0;
>> q=0;
>> return 0;
>> }
>> I try running it in memprof, no results on profile or leak screen.
>> Any idea what the problem is?
>> TIA
>
>Memprof seems to need to have the program running for it to work its
>magic, so you may want to do something like adding a sleep() call in
>your code. Here's how I'd fix your code (I'm going to drop the C++
>new() call)
>
>$ cat mptest.c
>#include <stdlib.h> /* malloc(), EXIT_SUCCESS */
>#include <unistd.h> /* sleep() */
>
>int main (int argc, char *argv[])
>{
> char * p = malloc(10);
> char * q = malloc(10);
> p = NULL;
> q = NULL;
> sleep(1000);
> return EXIT_SUCCESS;
>}
>
>Compile the code with `-g' for best results.
>
>$ gcc -g -o mptest mptest.c
>
>Then run it under memprof. While your code is sleeping, you can check
>for leaks, and you should find that both `p' and `q' are leaked.
Sort of works ( I had to kick 1000 up to 10000 ), but no stack
traceback.
Also it only seems to catch the memory leak associated with malloc and
not the one asociated with new.
------------------------------
From: lsnover <[EMAIL PROTECTED]>
Subject: Re: 64M buffer passed from user to kernel
Date: Tue, 19 Sep 2000 17:28:09 GMT
In article <[EMAIL PROTECTED]>,
Mathias Waack <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Pete Zaitcev) writes:
>
> > On Mon, 18 Sep 2000 18:48:50 GMT, lsnover <[EMAIL PROTECTED]>
wrote:
> > > I need to allocate a 64MB of contiguous memory which needs to be
> > >mapped into user memory. Then the buffer will be passed to a
kernel
> > >module for DMAing to a custom PCI board. I've heard one approach
is
> > >to use kmalloc() and copy_to_user(). Is this my only option? Does
> > >copy_to_user() create a second copy of the buffer, hence creating 2
> > >64MB buffers?
> >
> > I guess you deal with an MPEG encoder/decoder or video capture
board.
> > The only way to get 64MB is to use Pauline's Bigphisarea,
>
> No, there are other possible solutions. I prefer reserving memory at
> boot time by passing a mem switch to kernel. Its IMHO a cleaner
solution then
> patching a kernel.
>
> Another really dirty solution would be a mechanism known as
"aggressive
> allocation": try to allocate as much memory as possible, check for
> physical continuous pages, release the other pages. Continue as long
> as necessary. But I wouldn't do that.
>
> Mathias
>
I like the idea of reserving memory at boot time. Could you give me
more information on how to do this. Again, I am a newbie coming from
the vxWorks world.
Lisa
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
** 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
******************************