Linux-Development-Sys Digest #122, Volume #8      Mon, 4 Sep 00 12:13:12 EDT

Contents:
  Re: kernel 2.4.0-test7 modules loading problem (Jim Bean)
  Re: help: type devpts not supported (Hartmann Schaffer)
  Health monitor for ASUS P3V4X ([EMAIL PROTECTED])
  Re: help: type devpts not supported (Karl Heyes)
  Swap Atomically? ("KIM, HYUNG-IL")
  Strange Cash ("Adam Miezianko")
  linking in GPG ([EMAIL PROTECTED])
  Re: Swap Atomically? (Kaz Kylheku)
  Re: Swap Atomically? (Alexander Viro)
  Re: Swap Atomically? ("Christos D. Antonopoulos")
  backup os? ([EMAIL PROTECTED])
  TCP Snoop Implementation (Joerg Schueler)
  How to have two glibc versions peacefully coexisting? (Jan Kreft)
  Re: Memory allocation Strangeness. (Update) (Szabolcs Csetey)
  Re: Memory allocation Strangeness.  (Update) (Wolfram Gloger)
  Re: Memory allocation Strangeness.  (Final Thanks) (Olivier CARRERE)
  Re: Swap Atomically? (Marco van de Voort)
  Re: backup os? (Szabolcs Csetey)

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

From: Jim Bean <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.seutp
Subject: Re: kernel 2.4.0-test7 modules loading problem
Date: Sun, 03 Sep 2000 19:58:58 GMT

hi,
You need to get the very latest version of modprobe.  The
/usr/src/linux/Documentation directory has the info where to get it.
good hunting  Jim Bean

root wrote:
> 
> hi,
> 
>     I just built kernel 2.4.0-test7, but seems like it cannot load ANY
> module
>     modutils version is 2.3.9
> 
>     ie.    modprobe xxx  --returns--> can't locate module xxx
> 
>     /lib/modules/2.4.0-test7 is there....
>     but the modules.dep is of size 0(zero)
> 
>     Can somebody solve this?
> 
> thanks,
> ben

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

From: [EMAIL PROTECTED] (Hartmann Schaffer)
Subject: Re: help: type devpts not supported
Date: 3 Sep 2000 13:51:45 -0400

In article <[EMAIL PROTECTED]>,
dan  <[EMAIL PROTECTED]> wrote:
>Hi,
>
>    when compiling my kernel (2.2.12) I set all the options using one of
>the config programs (xconfig) compile it, and
>copy it to /boot directory... I add a new entry in the lilo.conf file to
>run this kernel.
>
>When the kernel starts I get this error message:
>
>    mounting filesystem - type devpts not supported.
>
>This doesn't seem to cause any trouble, everything runs fine.. I'd just
>like to know what it is and what config option changes it.
>thanks

devpts is needed for to support the new pty (pseudo terminal) system.
when configuring the kernel, you must enable the character device
"Unix98 ptys" (pretty far down in the character device menu).

ptys are needed for programs that are taking over the role of
terminals when communicating with other programs that assume to deal
with ttys.  they definitely are needed for pppoe and pptp, though in
both cases i have observed some problems with the pty interface:

1. when starting up pppd in a pppoe context, thar arguments to
   /etc/ppp/ip-up get screwed up (it seems the second argument, tty,
   is an empty string, so that the subsequent arguments get shifted
   down one place;  i haven't had a chance yet to look  at the adsl
   startup script (didn't write it myself), but my observations with
   pptp got me convinced there are some problems with ptys)
2. poptop (the pptp daemon calls pppd with the tty derived from the
   pty both as stdout and stderr.  as soon as pppd is trying to write
   to stderr, it dies with a roken pipe.

Hartmann Schaffer

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

From: [EMAIL PROTECTED]
Subject: Health monitor for ASUS P3V4X
Reply-To: [EMAIL PROTECTED]
Date: Sun, 03 Sep 2000 22:35:07 GMT

I've just upgraded to an ASUS P3V4X and am running RedHat 6.1.  I am
looking for some software to keep an eye on the system health and would
appreciate any suggestions.  RPM's prefered but I'm old enough to
remember when everything was roll your own so source is fine too.

Regards,
Chuck

-- 
=============================================================================
|Chuck Mattern           | "That which does not kill us, makes us stronger."|
|[EMAIL PROTECTED]   | -Friedrich Nietzsche-                            |
=============================================================================

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

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: help: type devpts not supported
Date: Mon, 04 Sep 2000 00:30:58 +0000

In article <[EMAIL PROTECTED]>, dan
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
>     when compiling my kernel (2.2.12) I set all the options using one of
> the config programs (xconfig) compile it, and copy it to /boot directory... I
> add a new entry in the lilo.conf file to run this kernel.
> 
> When the kernel starts I get this error message:
> 
>     mounting filesystem - type devpts not supported.
> 

It will come from the mount command when it searches the /etc/fstab file.

> This doesn't seem to cause any trouble, everything runs fine.. I'd just like
> to know what it is and what config option changes it. thanks

The filesystem mounts on /dev/pts, and is used to dynamically allocate pseudo
terminal slaves (wow!!).  If you log on using a console, your tty would be a
/dev/tty<1-63?>.  but you start a terminal emulator or use some like telnet,
rlogin, ftp, then you would be using pseudo terminals.  The slave is what you
would see from the tty command.

It may affect you, it depends on hoe you use your system.

karl.

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

From: "KIM, HYUNG-IL" <[EMAIL PROTECTED]>
Subject: Swap Atomically?
Date: Mon, 4 Sep 2000 10:50:36 +0900

I developed simple lock management system in AIX.
And now, I'm porting that into Linux.
But I have one problem.

For concurrency control, I used system function "compare_and_swap()" in AIX.
That fuction do "test and set", so called. That compare two value and swap
in some condition, then return 0 or 1. Important thing is all instructions
are done atomically.

I can't find similar fuction in Linux(X86). I know there is test_and_set().
But I don't know that fuction. So I can't compile that.
Is there anyother fuction?
Or how can I use test_and_set()?

Thank you in advence

[EMAIL PROTECTED]




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

From: "Adam Miezianko" <[EMAIL PROTECTED]>
Subject: Strange Cash
Date: Sun, 3 Sep 2000 23:11:36 -0400

I had this strange system crash today on my VA Linux FullOn 2x2 running VA
Linux 6.2.  It stopped resoponding to all network connections, so I plugged
in a monitor and keyboard and that too was dead.  After a reboot I found
that in /var/log/messages it said that:

init: Id "x" respawning too fast: disabled for 5 minutes

five times, at five minute intervals (which looks more or less normal).  My
inittab has:

x:5:respawn:/etc/X11/prefdm -nodaemon

which too looks normal.

So, my question is, why would that bring the kernel down (I assume it did, I
don't know how to verify that for sure).  I have not had any problem with
the box for months (though I did upgrade from 6.0 to 6.2 last week).  I also
don't know why gdm would be dying so much, since that did happen only this
one time, and no one was using X at the time.  Oh, if this helps, I
installed Helix Gnome, which I am not sure if it modified any of the gdm
files.

Adam Miezianko
[EMAIL PROTECTED]





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

From: [EMAIL PROTECTED]
Subject: linking in GPG
Date: Mon, 04 Sep 2000 15:28:51 +1000

Hi,

        I am writing a honours thesis that involves kernel verification of
digital signatures embedded in binary files. I am using GPG for the
verification at this stage and so would like to link GPG into the
kernel. (GPG = GNU Privacy Guard).

I haven't had any experience with this sort of thing. I am wondering if
anyone can help me out witha few pointers, things to watch out for,
references, ways to go about it etc... Any help would be much
appreciated.

( I am aware that linking it in may not be the best way to go about and 
it will increase the kernel in size dramatically)

Thanks

dan

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Swap Atomically?
Reply-To: [EMAIL PROTECTED]
Date: Mon, 04 Sep 2000 05:51:36 GMT

On Mon, 4 Sep 2000 10:50:36 +0900, KIM, HYUNG-IL <[EMAIL PROTECTED]> wrote:
>I developed simple lock management system in AIX.
>And now, I'm porting that into Linux.
>But I have one problem.
>
>For concurrency control, I used system function "compare_and_swap()" in AIX.
>That fuction do "test and set", so called. That compare two value and swap
>in some condition, then return 0 or 1. Important thing is all instructions
>are done atomically.
>
>I can't find similar fuction in Linux(X86). I know there is test_and_set().
>But I don't know that fuction. So I can't compile that.

Only a few of the architectures that Linux supports have the underlying
instruction needed to do this job. The developers of AIX might find 
this out too if they bothered porting their operating system.

>Is there anyother fuction?
>Or how can I use test_and_set()?

What you can do is use a mutex; pthread_mutex_lock/pthread_mutex_unlock.
POSIX doesn't provide any function compare_and_swap; it is a nonportable
AIX extension.

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

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: Swap Atomically?
Date: 4 Sep 2000 02:55:12 -0400

In article <[EMAIL PROTECTED]>,
Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>Only a few of the architectures that Linux supports have the underlying
>instruction needed to do this job. The developers of AIX might find 
>this out too if they bothered porting their operating system.

I'm sorry? Not speaking for AIDX folks, but believe me, _all_ architectures
where Linux runs have a way to do the atomic test_and_set_bit(). Grep the
kernel source and you'll see it used in architecture-independent parts of
the tree.

>>Is there anyother fuction?
>>Or how can I use test_and_set()?
>
>What you can do is use a mutex; pthread_mutex_lock/pthread_mutex_unlock.
>POSIX doesn't provide any function compare_and_swap; it is a nonportable
>AIX extension.

Ewww... Ferchrissake, he's doing a low-level primitive for his library.
That kind of stuff (provided that interface is the same) has every right
to be machine-dependent. Get real, posix_mutex_lock() is _way_ too heavy
in that case.

glibc has the test_and_set_bit(), test_and_clear_bit() and
test_and_change_bit() in asm/bitops.h

Semantics: atomically set/reset/flip bit #n in a bit vector at given address
and return the old value. If you want to do compare_and_swap() - write it
yourself either using test_and_set_bit for protection or doing it by hands.
The latter will have to be machine-dependent, so encapsulate it in
arch-dependent include file.

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

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

From: "Christos D. Antonopoulos" <[EMAIL PROTECTED]>
Subject: Re: Swap Atomically?
Date: Mon, 04 Sep 2000 11:01:57 +0300

"KIM, HYUNG-IL" wrote:
> 
> I developed simple lock management system in AIX.
> And now, I'm porting that into Linux.
> But I have one problem.
> 
> For concurrency control, I used system function "compare_and_swap()" in AIX.
> That fuction do "test and set", so called. That compare two value and swap
> in some condition, then return 0 or 1. Important thing is all instructions
> are done atomically.
> 
> I can't find similar fuction in Linux(X86). I know there is test_and_set().
> But I don't know that fuction. So I can't compile that.
> Is there anyother fuction?
> Or how can I use test_and_set()?

There is not such a function offered by the OS. However, the cmpxchg
(compare and exchange) instruction offered by the x86 processors is what
you are looking for. Just a little assembly programming involved. Here
is some example code (as a macro). Address is the address of the atomic
variable, old_value the old value (used for the comparison) and
new_value the new value to set the atomic variable to if
compare_and_swap succeeds. A return value of 1 means success of the
atomic instruction, 0 failure.

#define compare_and_swap(address, old_value, new_value) \
({ \
  unsigned long ret_val = 0; \
  __asm__ __volatile__ ("lock\n\t" \
                        "cmpxchgl %2, (%1)\n\t" \
                        "sete (%3)\n\t" \
                        : \
                        : "a" (old_value), "r" (address), "r"
(new_value), \
                          "r" (&ret_val) \
                        : "memory"); \
  ret_val; \
})


Christos Antonopoulos

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.misc
Subject: backup os?
Date: Mon, 04 Sep 2000 09:49:54 GMT

Well, the security of one OS is becoming more and more important.
However, there are some unexpectable catastrophes (not only the hack),
which will destory the whole system. So there is such backup system: the
second computer is runing the same pace of the first computer, then even
the first computer crashs for some reason, the second computer can start
work in very short time. Now, I like to ask you, is there such function
which is finish by linux? Sorry, I even don't know the name of such
system: backup os? or other name people have used? Any discussions of
such os are wolcome.


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

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

From: Joerg Schueler <[EMAIL PROTECTED]>
Subject: TCP Snoop Implementation
Date: Mon, 04 Sep 2000 14:16:26 +0200

hi folks,

does anybody know if there is a public implementation of the Berkeley
Snoop Protocol for Linux available?

thanks a lot
joerg schueler


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

From: [EMAIL PROTECTED] (Jan Kreft)
Subject: How to have two glibc versions peacefully coexisting?
Date: 4 Sep 2000 12:58:37 GMT
Reply-To: [EMAIL PROTECTED] at Cardiff.ac.uk

Hi,

my problem is that I have programs that need the original glibc-2.0.7 
that came with my SuSE 6.1 system, but for newer programs I need a new
version of the glibc. So I compiled glibc-2.1.3 and installed it in
/usr/local/glibc-2.1.3
Now, when I try to run StarOffice 5.2 installation, it complains about a
too old libc.
When I say export LD_LIBRARY_PATH='/usr/local/glibc-2.1.3'
it won't run because of undefined symbols.

How can I get the two glibc versions to coexist???

Thanks, Jan. 

Jan Kreft, Kreft at Cardiff.ac.uk
--

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

From: Szabolcs Csetey <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness. (Update)
Date: Mon, 04 Sep 2000 12:46:41 GMT



Oliver,

It seems you hit limits in glibc malloc. You can change defaults via
environment variables, increase MALLOC_MMAP_MAX_ (default 1024)
and decrease MALLOC_MMAP_THRESHOLD_ (128*1024), you maybe need to
tune MALLOC_TRIM_THRESHOLD_ as well (it has the same value as
MALLOC_MMAP_THRESHOLD_ in malloc.c)
http://www.dent.med.uni-muenchen.de/~wmglo/malloc-slides.html#tth_sEc13

strace and ltrace can also help to check the problem is really this.

  "Tristan Wibberley" <[EMAIL PROTECTED]> wrote:
> Olivier CARRERE wrote in message <[EMAIL PROTECTED]>...
>
> Linux doesn't bother to check if you actually have the memory before
> promising your process that it can use it. You can't ever find out if
> it is safe to use - malloc should tell you by returning a pointer to
> allocated memory if it's safe to use it, and return NULL (with errno
> set for reason) if it can't guarantee allocated memory.

A wrapper around malloc touching every page should do the trick IMHO.

> This is a very serious bug in Linux,

It's not bug however a built in feature for efficience and also to let
applications run without enough resources [e.g. think of huge sparse
matrixes in scientific apps]. "Workaround" is proper resource limits.

> >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' :))

This should be 114000kB, in that case it would also justifies Tristan
statement below and malloc.c docs. However I experienced 16 byte
overhead ... maybe an alignment issue.

> Every allocation with malloc must be deallocatable with free. This
> implies management data stored for each malloc - if you malloc lots,
> you use lots for management data (currently 4 bytes overhead for every
> malloc over 4 bytes, and exactly 8 bytes used in total for every
> malloc of 4 bytes and under in glibc on ia32 - I think).



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

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

From: Wolfram Gloger <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness.  (Update)
Date: 04 Sep 2000 15:19:00 +0200

Olivier CARRERE <[EMAIL PROTECTED]> writes:

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

You may be hitting a limit here of the maximum number of mmap()ed
chunks (1024).  This limit will be removed hopefully in glibc-2.2; you
should always be able to allocate around 2GB on an ia32 machine.

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

This is due to the overhead of malloc; the minimum chunk size is
actually 16bytes.

Regards,
Wolfram.

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

From: Olivier CARRERE <[EMAIL PROTECTED]>
Subject: Re: Memory allocation Strangeness.  (Final Thanks)
Date: Mon, 04 Sep 2000 15:47:49 +0200

Thanks all for your help.

I'm longing for glibc 2.2 and for a corrected Linux kernel :)

- Olivier

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

From: [EMAIL PROTECTED] (Marco van de Voort)
Subject: Re: Swap Atomically?
Date: 4 Sep 2000 14:00:59 GMT

>There is not such a function offered by the OS. However, the cmpxchg
>(compare and exchange) instruction offered by the x86 processors is what
>you are looking for. 

By SOME x86 processors. It is not universal.

Afaik plain and simple pentiums already don't have it.

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

From: Szabolcs Csetey <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: backup os?
Date: Mon, 04 Sep 2000 15:25:58 GMT

I  [EMAIL PROTECTED] wrote:
> However, there are some unexpectable catastrophes (not only the hack),
> which will destory the whole system. So there is such backup system:
> the second computer is runing the same pace of the first computer,
> then even the first computer crashs for some reason, the second
> computer can start work in very short time. Now, I like to ask you, is
> there such function which is finish by linux? Sorry, I even don't know
> the name of such system: backup os? or other name people have used?

Called as high availability.
http://linux-ha.org/
http://www.missioncriticallinux.com/
http://community.turbolinux.com/cluster/


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

Reply via email to