Linux-Development-Sys Digest #736, Volume #7      Tue, 4 Apr 00 05:13:17 EDT

Contents:
  Re: MQSeries Synchronous method (Christopher Browne)
  Re: Parallel port programming... pins 12 and 13 not working (mlw)
  Re: Linux and Posix AIO (Warren Young)
  Re: question about process generation (Fabrice Peix)
  Re: Linux and Posix AIO (Fabrice Peix)
  Re: question about process generation (Chris)
  Partitionable Device Driver (Mark McDougall)
  hooked API ([EMAIL PROTECTED])
  Re: How compatible is Linux with .. Linux (Leslie Mikesell)
  Re: Partitionable Device Driver (Mark McDougall)
  Re: How compatible is Linux with .. Linux ("Peter T. Breuer")
  Re: SMP Hang, please help (Robert Redelmeier)
  Re: SMP Hang, please help (Kaz Kylheku)
  Q : modyfying kernel memory limits ? (Mart =?iso-8859-1?Q?K=E4sper?=)
  Re: i need to redefine malloc() ([EMAIL PROTECTED])
  Linx-Fonts ("Michael Schoettner")
  Re: i need to redefine malloc() (Etienne Lorrain)
  Re: modem drivers (Michael A Uman)
  programming internal speaker trouble (Jerome Corre)

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

From: [EMAIL PROTECTED] (Christopher Browne)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: MQSeries Synchronous method
Reply-To: [EMAIL PROTECTED]
Date: Tue, 04 Apr 2000 02:11:36 GMT

Note: Followup redirected; this is an application issue, not a systems
issue...

Centuries ago, Nostradamus foresaw a time when qsun would say:
>I am using IBM MQSeries under LInux, does anybody knw
>is there any synchronous method of MQSeries to put/get
>messages?

For the C bindings, the functions for put/get are MQGET() and MQPUT(),
but I thought the whole point of MQSeries was to do asynchronous
messaging...

There really isn't any way of specifying a synchronous method; what
you can do is to create a pseudosynchronous "pattern" where the client
basically basically just waits for the response.

Thus, you'd have:

MQPUT(arguments-for-message-send);
AnalyzeMQOperation(results);  /* Do error checking */
if (all_ok) {
  MQGET(arguments-for-return-message);
}

The more appropriate way to do this would be for the client to issue
MQPUT() calls as needed to send requests to the server, and then have
a separate thread of execution to deal with getting back MQGET()
results.

If you try to do synchronous processing with a message queueing
system, you're really defeating the purpose of using MQSeries, and
might as well use synchronous CORBA methods (or something of the sort)
instead.
-- 
"Keep your arms and legs attached to your torso at all times."
-- [EMAIL PROTECTED] (Eric Griswold)
[EMAIL PROTECTED] - - <http://www.ntlug.org/~cbbrowne/lsf.html>

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

From: mlw <[EMAIL PROTECTED]>
Subject: Re: Parallel port programming... pins 12 and 13 not working
Date: Mon, 03 Apr 2000 22:23:06 -0400

Stuart Hall wrote:
> 
>  Hello all!
> 
> I have a 486-33 Gateway 2000 that I am programming a custom slot-car
> timer for, using Phototransistors and the parallel port.  My program
> works perfectly on my newer homebuilt dual pentium machine using pins
> 10,12,13 and 15.  However it is not working for pins 12 and 13 on my
> Gateway machine.
> 
> Pins 12 and 13 are for Paper Empty and Select.  Is my parallel port
> bad?  Or is it possible that pins 12 and 13 are not used in the IBM
> parallel port standard way on a GW computer?
>

Parallel ports are funny. They are probably one of the worst digital I/O
designs ever. More likely than not, if the code and connector work on
one machine, and do not work on the other, the one that does not work is
blown. Inputs are not typically protected, electrically, and often have
this problem. An input signal line can be very sensitive to high voltage
spikes.
 
-- 
Mohawk Software
Windows 9x, Windows NT, UNIX, Linux. Applications, drivers, support. 
Visit http://www.mohawksoft.com
"We've got a blind date with destiny, and it looks like she ordered the
lobster"

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

Date: Mon, 03 Apr 2000 20:25:18 -0600
From: Warren Young <[EMAIL PROTECTED]>
Subject: Re: Linux and Posix AIO

Fabrice Peix wrote:
> 
> benny wrote:
> >
> > Does anyone know if and when Linux will support the Posix 4 AIO
> > (asynchronous I/O) facility. I have Red Hat version 2.2.5-15 and can
> > not find the libaio library, so I am assuming that it is not yet
> > supported?
>
> asynchronous I/O are support in glibc 2.1. and not in the kernel.

Correction: asynchronous I/O is _emulated_ by glibc 2.1.  Proper kernel
support is required for useful asynchronous I/O, and this exists as a
patch from SGI.  (oss.sgi.com).  When/if it will make it into the
official kernel is a question whose answer I don't know, however.
-- 
= Warren -- See the *ix pages at http://www.cyberport.com/~tangent/ix/
= 
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

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

From: Fabrice Peix <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: question about process generation
Date: Tue, 04 Apr 2000 04:50:48 +0200

Ciro wrote:
> 
> Hi all!
> 
> I need to know how must I do to generate a process "A" from other
> process "B",
> then if "B" breaks down or exits, "A" does not hang, break down or exit.
> 
> I've used the fork() & execXX() UNIX system calls, but some friends
> tells me if a parent process
> terminates then all its child process terminates too..
> 
> Thanks!!
> 
> Leonardo Espinoza
> [EMAIL PROTECTED]
I think it not true, when you do a execXX in the child if parent process
die child don't die.

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

From: Fabrice Peix <[EMAIL PROTECTED]>
Subject: Re: Linux and Posix AIO
Date: Tue, 04 Apr 2000 04:55:33 +0200

Warren Young wrote:
> 
> Fabrice Peix wrote:
> >
> > benny wrote:
> > >
> > > Does anyone know if and when Linux will support the Posix 4 AIO
> > > (asynchronous I/O) facility. I have Red Hat version 2.2.5-15 and can
> > > not find the libaio library, so I am assuming that it is not yet
> > > supported?
> >
> > asynchronous I/O are support in glibc 2.1. and not in the kernel.
> 
> Correction: asynchronous I/O is _emulated_ by glibc 2.1.  Proper kernel
> support is required for useful asynchronous I/O, and this exists as a
> patch from SGI.  (oss.sgi.com).  When/if it will make it into the
> official kernel is a question whose answer I don't know, however.
> --
> = Warren -- See the *ix pages at http://www.cyberport.com/~tangent/ix/
> =
> = ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

        Yop,

Yes SGI create a patch for real efficient aio,but the glibc 2.1 offers
all or subset (?) of the primitives
of POSIX 4. I don't know if the implementation is very efficient but i
know is usable.

        Bye and Ooops.

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

From: [EMAIL PROTECTED] (Chris)
Crossposted-To: 
comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: question about process generation
Date: Tue, 04 Apr 2000 04:12:25 GMT

On Mon, 03 Apr 2000 17:21:31 -0300, Ciro <[EMAIL PROTECTED]> wrote in
comp.os.linux.development.apps:

>I need to know how must I do to generate a process "A" from other
>process "B",
>then if "B" breaks down or exits, "A" does not hang, break down or exit.
>
>I've used the fork() & execXX() UNIX system calls, but some friends
>tells me if a parent process
>terminates then all its child process terminates too..

When the parent exits it sends a signal to kill all children that are
members of that process group.  To keep a program running in the
background, you must have it create a new process group (with itself as
parent).  The general term for this is "becoming a daemon".

The key to the following function is the call to setsid() between the two
forks.

void daemonize()
{
        int pid;

        // become a daemon: fork, die, setsid, fork, die, disconnect.
        pid = fork();
        if(pid < 0) exit(-1);   //fork failed
        if(pid > 0) _exit(0);   //parent exits
        setsid();
        pid = fork();
        if(pid < 0) exit(-1);   //fork failed
        if(pid > 0) _exit(0);   //parent exits
        chdir("/");
        freopen("/dev/null","r",stdin);
        freopen("/dev/null","w",stdout);
        freopen("/dev/null","w",stderr);
}


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

From: Mark McDougall <[EMAIL PROTECTED]>
Subject: Partitionable Device Driver
Date: Tue, 04 Apr 2000 14:31:29 +1000

Hi all,

I'll try this again...

I'm trying to add partitioning support for my (working) block device
driver. I've based my support on Rubini's 'spull' device example. BTW my
driver is a KLM...

I can partition the device with fdisk and do a mkfs on both partitions.
My joy was, however, quite short-lived. Everything's (seemingly) fine if
I mount one particular partition and try to use it. What's actually
happening is that the blocks are being read/written from different areas
on *both* partitions of the disk.

This is evidenced when I mount filesystems on *both* partitions and try
to use them both. They each corrupt the other. I have also mounted just
one of the partitions and watched the request function receive requests
for both partitions!

I'm completely at a loss for what is happening here. Shown below is a
dump of the partition information when the device is set up with two
partitions.

major = 254
major_name = "qd"
minor_shift = 4
max_p = 16
max_nr = 4
nr_real = 1
/dev/qda
           sizes start_sect   nr_sects      sizes  blk_sizes  hardsects
qda0:     522113          0    1044226     522113       1024        512
qda1:     257008         63     514017     257008       1024        512
qda2:     265072     514080     530145     265072       1024        512

Has anyone else had any luck with a partitioning driver? Based on
Rubini's example? Any partitioning guru I can point my questions at? I
simply don't understand *how* I can possibly get requests for the wrong
partition during file i/o??? Help!!!!!!

TIA,
Regards,

--
|     Mark McDougall    |
|        Engineer       |
| Virtual Logic Pty Ltd |
| http://www.vl.com.au  |

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

From: [EMAIL PROTECTED]
Subject: hooked API
Date: Tue, 04 Apr 2000 04:54:21 GMT

Hi all,

Could somebody tell me how to hook a function to a network driver, so
that it can make traces to what has happended to the driver ?

Thanks,

Vu Pham


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

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

From: [EMAIL PROTECTED] (Leslie Mikesell)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How compatible is Linux with .. Linux
Date: 4 Apr 2000 00:15:23 -0500

In article <8c9gtt$i7c$[EMAIL PROTECTED]>,
Peter T. Breuer <[EMAIL PROTECTED]> wrote:

>Why? All they have to do is fork out the $5 to cheapbytes and try SuSE
>and Debian next. They can't seriously be planning to distribute their
>software after receiving hearsay advice via newsgroups as to whether it
>will work or not!

Does this mean that someone can't possibly believe how incompatible
the different Linux distributions are without experiencing it
personally, or just that people shouldn't take your advice?

  Les Mikesell
    [EMAIL PROTECTED]

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

From: Mark McDougall <[EMAIL PROTECTED]>
Subject: Re: Partitionable Device Driver
Date: Tue, 04 Apr 2000 15:25:58 +1000

Mark McDougall wrote:

I've done some further testing...

It seems the driver *always* gets called with minor=0!!!
It's as if the partitioning information is ignored!?!

The numbers in the dump of the previous posting are calculated by
resetup_one_device(&my_gendisk,0)... so it should know about it???

Regards,

--
|     Mark McDougall    |
|        Engineer       |
| Virtual Logic Pty Ltd |
| http://www.vl.com.au  |

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

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How compatible is Linux with .. Linux
Date: 4 Apr 2000 05:32:50 GMT

In comp.os.linux.development.apps Leslie Mikesell <[EMAIL PROTECTED]> wrote:
: In article <8c9gtt$i7c$[EMAIL PROTECTED]>,
: Peter T. Breuer <[EMAIL PROTECTED]> wrote:

:>Why? All they have to do is fork out the $5 to cheapbytes and try SuSE
:>and Debian next. They can't seriously be planning to distribute their
:>software after receiving hearsay advice via newsgroups as to whether it
:>will work or not!

: Does this mean that someone can't possibly believe how incompatible
: the different Linux distributions are without experiencing it
: personally, or just that people shouldn't take your advice?

It depends on when you stopped beating your wife!

I believe the observation in the :> is appropriate.  We have no way of
knowing what resources they use.  Ppp?  mail?  libforms?  perl?  init.d?

Peter

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

From: Robert Redelmeier <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux
Subject: Re: SMP Hang, please help
Date: Tue, 04 Apr 2000 01:02:28 -0500

ravi Venkat wrote in small part:
> We are facing a hard hang on 2.2.14 SMP kernel (red hat) while doing
> heavy
> multi-threaded i/o using a software raid driver.
>     get my_spinlock (spin_lock_irqsave)
> Within a few seconds machine locks up and nothing works. By putting

I have pounded very hard on spinlocks in SMP userspace, and not
gotten them to break.  Even the smallest opening (next instruction)
is big enough to allow the other CPU to grab the spinlock.  But
that was userspace, and you're in the kernel (ring0).  It might
be possible that the spinlock isn't being released.

On a separate note, you might want to check out your hardware,
especially if the lockups aren't deterministically timed.  My
`burnP6` will checkout the CPUs, and `burnBX` will checkout
your RAM&controller.  On Metalab or my site below.

-- Robert  author `cpuburn`  http://users.ev1.net/~redelm

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: alt.os.linux
Subject: Re: SMP Hang, please help
Reply-To: [EMAIL PROTECTED]
Date: Tue, 04 Apr 2000 06:20:20 GMT

On Mon, 03 Apr 2000 17:08:57 -0700, ravi Venkat <[EMAIL PROTECTED]> wrote:
>Hello all,
>
>
>We are facing a hard hang on 2.2.14 SMP kernel (red hat) while doing
>heavy
>multi-threaded i/o using a software raid driver.
>
>We have 10 kernel threads which mostly do
>
>    get my_spinlock (spin_lock_irqsave)
>    do some work
>    add_wait_queue
>    release my_spinlock
>    schedule()
>    get my_spinlock
>    remove_wait_queue
>
>    and repeat the cycle.
>
>These are woken up from the i/o done path.
>
>
>Within a few seconds machine locks up and nothing works. By putting
>printk statements, we have found that

Show some code. One cannot debug an informal description of the
code, only the code itself.

Also, if you suspect spinlocks to be the problem, have you tried 
#define DEBUG_SPINLOCKS 2 ? This causes spinlocks to be chatty.

>Apart from add_wait_queue(), waitqueue_lock is used only
>by remove_wait_queue() and __wake_up(). So why does the thread
>running on cpu 1 does not get this lock when cpu 2 is not executing
>either remove_wait_queue() and __wake_up() ?

Good question! The waitqueue_lock doesn't look like a candidate for
causing deadlock because no other lock is acquired in the brief
critical sections protected by it. It's not possible for a processor
which holds this lock to wait on another processor which in turn
waits on that lock.


-- 
#exclude <windows.h>

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

From: Mart =?iso-8859-1?Q?K=E4sper?= <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel
Subject: Q : modyfying kernel memory limits ?
Date: Tue, 04 Apr 2000 09:43:42 +0200
Reply-To: [EMAIL PROTECTED]


Hi - excuse a newbie question, but we all have to start somewhere,
right ?

I'm trying to rebuild the kernel (2.2.5-15, RedHat 6.0) with some
modifications included - these have been found in a Sybase FAQ and are
(in a pseudo-patch style) :

linux/include/asm-i386/page.h:

- #define __PAGE_OFFSET (0xC0000000)
+ #define __PAGE_OFFSET (0x80000000) =


[the value above was also modified in linux/arch/i386/vmlinux.lds due to
a
 comment in page.h]

linux/include/asm/shmparam.h:

- #define SHMMAX 0x2000000 /* defaults to 32 MByte */
+ #define SHMMAX 0x7FFFE000 /* 2048mb - 8k */

- #define _SHM_ID_BITS 7 /* maximum of 128 segments */
+ #define _SHM_ID_BITS 5 /* maximum of 32 segments */

- #define _SHM_IDX_BITS 15 /* maximum 32768 pages/segment */
+ #define _SHM_IDX_BITS 19 /* maximum 524288 pages/segment */

I'm doing these modifications because I want Sybase to work with
larger files as well as enjoy larger shared memory.

I compile kernel+modules, copy the bzImage and System.map to /boot
and reboot (after /sbin/lilo, that is) ...

Somehow I cannot make the new kernel work - I get either of two
errors (depending on which of the changes above I perform) :

* /sbin/modprobe fails at boot time, complaining about block-major-72,
  kernel panic etc etc =3D> not a very good sign

* Booting is OK but when module tlan performs autonegotiation it
  fails the first time when startup processes are being launched.
  This has the effect that I cannot access the local LAN. Also dreadful
  long waiting hours at startup, probably (?) indicating that something
  times out now and then.

I also tried SHMMAX to 0x8000000 ... same thing.

Where should I start looking ? Does anyone need additional info ?

If I reset the changes back to the original values and recreate the
kernel it runs OK ... although taking longer time at startup ...

All input welcome :-) Thanks in advance

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
   Mart K=E4sper                 E-mail            : [EMAIL PROTECTED]
   Netsoft Lund AB
   Bredgatan 17                Tel (in place)    : +46 46 19 04 95
   S-222 21 Lund, Sweden       Tel (on the road) : 070 / 319 04 95
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#include <std.disclaimer>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

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

From: [EMAIL PROTECTED]
Subject: Re: i need to redefine malloc()
Date: Tue, 04 Apr 2000 08:04:00 GMT

In article <[EMAIL PROTECTED]>,
Dan McGuirk <[EMAIL PROTECTED]> replied to me:
> You should be able to do this by doing a deliberate dlopen on libc.so,
> finding malloc's symbol with dlsym, and then calling that whenever you
> need to.
>
> However, shouldn't glibc's malloc be threadsafe anyway if you use
> -DREENTRANT?

Thanks, I'll try to see about dlopen...
glibc malloc is thread safe but with Posix Threads... mine are just
light thread that i've not implemented using Posix standard.

--Tommaso Schiavinotto


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

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

From: "Michael Schoettner" <[EMAIL PROTECTED]>
Subject: Linx-Fonts
Date: Tue, 4 Apr 2000 10:38:33 +0200

Hi all,

are there any documents or source texts about linux fonts available?
I'm interested in algorithms for scalable fonts (like the MS
True-Type-Fonts).
A short e-mail would be great.

Best regards,

Michael


Michael Schoettner
University of Ulm
Department of Distributed Systems
Oberer Eselsberg
D-89069 Ulm
Phone: + 49 731/502-4238, Fax  : + 49 731/502-4142
E-Mail: [EMAIL PROTECTED]
Web:   http://www-vs.informatik.uni-ulm.de/Mitarbeiter/Schoettner/
Tip:     http://www-vs.informatik.uni-ulm.de/Projekte/plurix.html



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

From: Etienne Lorrain <[EMAIL PROTECTED]>
Subject: Re: i need to redefine malloc()
Date: Tue, 04 Apr 2000 09:40:24 +0100

[EMAIL PROTECTED] wrote:
>  How do I redefine malloc, still retaining the chance to call the
> original one from within the redefined one?

  Another solution is to use an option of the linker ld,
 see the info page for "--wrap SYMBOL".

  Etienne.

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

From: Michael A Uman <[EMAIL PROTECTED]>
Subject: Re: modem drivers
Date: Tue, 04 Apr 2000 08:55:19 GMT

"Alberto G�mez" wrote:

> I heard that Pctel released some Winmodem drivers, but I haven�t found them
> yet. Do you know where can I get them?

Heynow,

Check out this website:

http://linmodems.org/

This site contains links to most known WinModem drivers for Linux.

Good luck,
    Michael Uman
    Sr. Software Engineer
    Sonic Solutions



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

From: Jerome Corre <[EMAIL PROTECTED]>
Subject: programming internal speaker trouble
Date: Tue, 04 Apr 2000 08:51:01 GMT

Hi,
I would like to try to program the internal speaker for fun.
But I don't know where to start:

1- How to access the speaker from user space? I know there are two ioctl
command to do so ioctl (fd, KDMKTONE,(long) argument) and
ioctl(fd,KIOCSOUND,(int) tone), but I don't know which device file to
open to use them

2- can the speaker be programmed easily from a kernel module?

thanks in advance for any help

regards

Jerome

--
Jerome Corre


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