Subject: Linux-Development Digest #760
From: Digestifier <Linux-Development-Request@senator-bedfellow.MIT.EDU>
To: Linux-Development@senator-bedfellow.MIT.EDU
Reply-To: Linux-Development@senator-bedfellow.MIT.EDU
Date:     Thu, 26 May 94 09:13:04 EDT

Linux-Development Digest #760, Volume #1         Thu, 26 May 94 09:13:04 EDT

Contents:
  Re: Cache-optimizing page allocation (Colin Plumb)
  Re: Cache-optimizing page allocation (Colin Plumb)
  Re: Fax Software for Linux (Ed Casas)
  Re: Video Blaster (Ben Adams)
  perfmeter not showing disk stats (Stuart Szabo CMIS)
  Re: bug on kernel 1.1.15 (David Barr)
  The visual bell: patch and RFD (Alessandro Rubini)
  Re: SIGHUP - Deep Kernal Guts question! (Ken Pizzini)
  Source wanted (Simon Johnston x6320)
  Source wanted (Simon Johnston)
  Re: 32-bit Novell desktop OS combines Unix, DOS 7 (Rob Janssen)
  Re: script to implement ``dump levels'' (was Re: Anybody working on BSD dump porting?) (Rob Janssen)
  Re: 32-bit Novell desktop OS combines Unix, DOS 7 (Andrew Deckowitz)
  Re: enhanced IDE and SCSI-2 supported? (Delman Lee)

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

From: colin@nyx10.cs.du.edu (Colin Plumb)
Crossposted-To: comp.sys.ibm.pc.misc
Subject: Re: Cache-optimizing page allocation
Date: 26 May 1994 00:04:19 -0600

In article <1994May21.002619.3458@et.tudelft.nl>,
Maarten Boekhold (Who'd you expect??) <boekhold@morra.et.tudelft.nl> wrote:
> I bought a DDJ today (june issue). It has an article about memory management.
> It's about writing memory efficient programs (in this case, C and C++). 
> In the C++ case, it shows how one can overload the 'new' and 'delete' 
> operators, using memory pools with free blocks of fixed size, so each 
> class has it's own memory pool, which is optimally filled (no holes), and 
> reduce trashing a lot. It mentions some commercial memory managers for 
> DOS (libraries which provide some elementary functions) which do this 
> kind of things......
>
> Wouldn't it be a good idea to add such functions to the c-library, so 
> every programmer can use a standard set of these functions if they wish 
> to do so? They are relatively easy to use in classes (see the article, 
> pg. 52, src at pg. 96) for an example.
>
> These functions could provide a great speedup in applications that use 
> large (and I mean large :-)) amounts of memory (in the article, an 
> example of a homogeneous linked list, with sizes from 20,000 to 150,000 
> elements). especially in data-sets which are larger then the amount of 
> physical memory, when swapping occurs, speedup could be dramatic (the 
> article mentions speedups of a factor 40 in some cases.....)

Actually, hand-rolling like this can sometimes be a bad thing.
Have a look at CustoMalloc: Efficient Synthesized Memory Allocators,
Software Practice and Experience, Vol 23 No. 8 pp 851-869 (August 1993).
Also presented at Usenix this summer, I think.

You can get the package from cs.colorao.edu:pub/cs/misc/customalloc.tar.gz
if you like.  It's GPL.  It's easy to use.

What you do is get it to generate a measurement customalloc.c file,
which you compile and link with your program, replacing the usual
malloc, free and realloc.  Then run your program on some test cases.
It will generate a mesaurements file.  Then have it generate the
production one, which will optimize common allocations automatically.

Barring that, if you want a good malloc for non-power-of-2 blocks,
Doug Lea wrote an excellent malloc, which I'm not managing to find
a pointer to.  f.mky.something.edu.  It uses boundary tags, segregated
free lists, delayed coalescing, preallocation of common block sizes,
and generally works hard to avoid doing work.

For power-of-two allocations, page-aligned allocations, and so on,
Mike Haertel's implementation in the GNU C library is quite good.
The way it avoids storing the size of allocated blocks is interesting.
(Pages are chopped up into fixed-size blocks, with a per-page structure.
When you free something, the page is found and the size looked up there.)
-- 
        -Colin

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

From: colin@nyx10.cs.du.edu (Colin Plumb)
Crossposted-To: comp.sys.ibm.pc.misc
Subject: Re: Cache-optimizing page allocation
Date: 26 May 1994 02:50:26 -0600

In article <2s1e53$osk@nyx10.cs.du.edu>,
Colin Plumb <colin@nyx10.cs.du.edu> wrote:
>Barring that, if you want a good malloc for non-power-of-2 blocks,
>Doug Lea wrote an excellent malloc, which I'm not managing to find
>a pointer to.  f.mky.something.edu.  It uses boundary tags, segregated
>free lists, delayed coalescing, preallocation of common block sizes,
>and generally works hard to avoid doing work.
>
>For power-of-two allocations, page-aligned allocations, and so on,
>Mike Haertel's implementation in the GNU C library is quite good.
>The way it avoids storing the size of allocated blocks is interesting.
>(Pages are chopped up into fixed-size blocks, with a per-page structure.
>When you free something, the page is found and the size looked up there.)

I dug up the reference.  No relation to f.cs.uky.edu; Doug Lea's malloc
is in g.oswego.edu:pub/misc/malloc-2.5.1.c.

Mike Haertel's is in ftp.cs.uoregon.edu:pub/mike/malloc.tar.gz.

Doug Lea's is quite impressive.  It's both fast and memory-efficient.
Apparently it has some connection to libg++.
-- 
        -Colin

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

Crossposted-To: comp.os.linux.misc,comp.os.linux.help
From: edc@ee.ubc.ca (Ed Casas)
Subject: Re: Fax Software for Linux
Date: Thu, 26 May 1994 06:11:44 GMT

In article <CqBFEL.A8G@greenie.muc.de> 
        gert@greenie.muc.de (Gert Doering) writes:
> adap@andrews.edu (Edsel Adap) writes:
> 
> >Is there a public domain fax software for linux?  Preferrably one that
> >can send .dvi, .ps or xwd files.
> 
> mgetty+sendfax, in combination with ghostscript (for .ps) and dvips (for
> .dvi). sunsite:/pub/Linux/system/Serial/mgetty+sendfax*

If you have a single-user system or if you have a Class 1 fax
modem you might prefer efax.  It's much smaller and easier to set
up.  The latest version, 0.6, is available from sunsite.unc.edu
in /pub/Linux/apps/comm.

-- 
Ed Casas (edc@ee.ubc.ca)

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

From: bra@bentek.mese.com (Ben Adams)
Subject: Re: Video Blaster
Date: Wed, 25 May 94 22:44:19 EDT

valliant@unm.edu (Denny Valliant) writes:

>       Has anyone written anything for the video blaster.  I have drivers for
> DOS, but have not been able to find anything for Linux.  When I try to run th
> driver in DosEmu, it tells me that it is already installed.  If anyone has se
> anything out there, please mail me.

It would seem that a interface for video overlay cards should be 
setup.  Then the video blaster and other video overlay cards could
have drivers developed.   BTW I have a Video blaster also...
Ben

========================================================================
<bradams@info-gw.mese.com>     <-Ok   | The opinions above are mine    |
<bra@bentek.mese.com>          <-Ok   | alone and do *not* necessarily |
<bra@crl.com>                  <-Best | represent the views of my      |
Ben R. Adams                   <-Me!  | government. (:->)              |
===========[PGP Keys Sent on Request & on Public Key Servers]===========

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

Crossposted-To: comp.os.linux.misc,comp.os.linux.help
From: sszabo@colesmyer.com.au (Stuart Szabo CMIS)
Subject: perfmeter not showing disk stats
Date: Thu, 26 May 94 04:54:42 GMT

I have the slackware distribution of linux and have updated to the 1.1.0 kernel.
I also grabbed rstatd-15y from sunsite.unc.edu.   The problem I have is that
for all other systems that I check with perfmeter everything works fine.  When
I run rstatd and perfmeter on my linux box I get all the stats except for the
disk.   Does this have anything to do with the 1.1.0 kernel?

Any ideas?

Thanks,
        Stuart Szabo


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

From: barr@pop.psu.edu (David Barr)
Subject: Re: bug on kernel 1.1.15
Date: 25 May 1994 19:10:26 -0400

In article <2s0hrk$68r@vixen.cso.uiuc.edu>,
Supat Faarungsang <supat@nuntana.animal.uiuc.edu> wrote:
>here the bug
>
>stty: TCGETS: Operation not supported on socket

Well gee, that's nice.  You've given us an error message.

Could you at least tell us what command _generated_ this error
message?  (obviously an stty command, but _what_ stty function?
when?  where?)

--Dave
-- 
"Opera is when a guy gets stabbed in the back and instead of bleeding
he sings." - Ed Gardner

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

From: rubini@ipvvis.UNIPV.IT (Alessandro Rubini)
Subject: The visual bell: patch and RFD
Date: 26 May 1994 02:33:41 -0500

Hello linuxers,
   my own box doesn't have a loudspeaker, but now that I have access to a
full featured PC I had to turn off the bell from the linux console. It
has been very easy, and I include the patch below as I think the visual bell
is a good thing for all of us who go to bed late (most of us :-) and like
filename completion in the shell.

However, at times the bell is a good thing, so I wonder how to make it
dynamically switchable on and off. I thought of two ways, but I can't choose
between the two:

- modifying the setterm command is probably the best way, because it is the
        normal way to access console configuration, and it is already a
        linux-specific command.  However, it makes use of the escape
        sequences, which in turn are quite well standardized, and I won't like
        adding a non-standard escape sequence to the linux console.

- on the other way, addin an ioctl() of type TIOCLINUX is not useful to
        the final user without providing a command-line access, and it is not
        nice to mess setterm with ioctl()'s.

So I ask some suggestions to all of you who are interested in the matter.

Please reply by email to save bandwidth, and I'll post a
summary (and the patch) if there is enough interest.

----

I took the patch against the 1.0 kernel, but it applies well (offset -1line)
to both the 1.0.9 and the 1.1.12. Midway kernels should be allright, too.

to apply:             cd /usr/src/linux/drivers/char; patch < __this_patch__

to re-enable the audible bell: "#define CONFIG_NO_VISUALBELL" at the beginning
        of console.c

---8<------8<------8<------8<------8<------8<------8<------8<---
*** console.c.audible   Fri May 13 18:07:21 1994
--- console.c   Sat May 14 18:18:16 1994
***************
*** 992,997 ****
--- 992,1014 ----
        }
  }
  
+ #ifndef CONFIG_NO_VISUALBELL
+ static inline void con_visualbell(const int currcons)
+ {
+     unsigned char *p; int i;
+     unsigned char *screenstart = (unsigned char *)(origin-
+                 (currcons==fg_console 
+                   ? ((__real_origin - __origin) << 1) 
+                   : 0));
+     unsigned char *screenend=screenstart+video_num_columns*video_num_lines*2;
+ 
+     for (i=0;i<2;i++)
+       for (p=screenstart+1;p<screenend+1;p+=2)
+                 *p = (*p & 0x88) | ((*p << 4) & 0x70) | ((*p >> 4) & 0x07);
+ 
+ }
+ #endif
+ 
  void con_write(struct tty_struct * tty)
  {
        int c;
***************
*** 1034,1040 ****
--- 1051,1061 ----
                 */
                switch (c) {
                        case 7:
+ #ifdef CONFIG_NO_VISUALBELL
                                kd_mksound(0x637, HZ/8);
+ #else
+                               con_visualbell(currcons);
+ #endif
                                continue;
                        case 8:
                                bs(currcons);
---8<------8<------8<------8<------8<------8<------8<------8<---


-- 
    __ o        alessandro rubini - rubini@ipvvis.unipv.it
   _`\<,
__( )/( )____           I am italian, but I didn't vote for them...

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

From: ken@coho.halcyon.com (Ken Pizzini)
Subject: Re: SIGHUP - Deep Kernal Guts question!
Date: 25 May 1994 22:20:51 GMT

In article <2rg2eo$ldg@charm.magnus.acs.ohio-state.edu>,
Charles E Meier <cemeier@magnus.acs.ohio-state.edu> wrote:
>Rochkind writes in _Advanced Unix Programming_ that (p 209):
>
>   SIGHUP (1) HANGUP. Sent when a terminal is hung up to every process
>              for which it is the control terminal.  Also sent to each
>              process in a process group when the group leader terminates
>              for any reason.  This simulates hanging up on terminals that 
>              can't be physically hung up, such as a personal computer.

I came into the fray late, and lost the beginning of this thread,
but I think we need a little official verbage to be sure we're
all talking about the same thing.

 From IEEE Std 1003.1-1988 (aka POSIX):
  7.1.1.10 Modem Disconnect.  If a modem disconnect is detected by
  the terminal interface for a controlling terminal, and if CLOCAL is
  not set in the c_cflag field for the terminal (see Control Modes
  sec.  7.1.2.4), the SIGHUP signal is sent to the controlling
  process associated with the terminal.  [...]

  3.2.2 Terminate a Process.
  [...]
  3.2.2.2 Descrition.  The _exit() function shall terminate the
  calling function with the following consequences:
  [...]
  (6) If the process is a controlling process, the SIGHUP signal
  shall be sent to each process in the foreground process group of
  the controlling terminal belonging to the calling process.
  [...]
  These consequences shall occur on process termination for any reason.

(Note that the last sentence includes exits from SIG_DFL signal handling.)

Some messages in this thread sound like item (6) of the list in
section 3.2.2.2 is being ignored by the implementation in the Linux
kernel; others sound like they want item (6) to refer to background
processes as well.  In either case I think Linux should follow
POSIX on this...


                --Ken Pizzini

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

From: skj@citadel (Simon Johnston x6320)
Subject: Source wanted
Date: Wed, 25 May 1994 13:54:49 GMT

Hi, Im after source to the following utils, I can take email responses
containing the files themselves, or pointers to FTP sites.

        ifconfig
        uname
        uptime
        who
        fingerd

Thanks.

MODULE Sig;
FROM ICL IMPORT StdDisclaimer;
FROM Interests IMPORT Modula2, Modula3, Linux, OS2;

BEGIN
(* ------------------------------------------------------------------------.
|Simon K. Johnston - Development Engineer              |ICL Retail Systems |
|------------------------------------------------------|3/4 Willoughby Road|
|Unix Mail : S.K.Johnston.bra0801@oasis.icl.co.uk      |Bracknell, Berks   |
|Telephone : +44 (0)344 476320   Fax: +44 (0)344 476084|United Kingdom     |
|Internal  : 7261 6320    OP Mail: S.K.Johnston@BRA0801|RG12 8TJ           |
`------------------------------------------------------------------------ *)
END Sig.

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

From: skj@rb.icl.co.uk (Simon Johnston)
Subject: Source wanted
Date: Thu, 26 May 1994 07:51:06 GMT


Hi, Im after source to the following utils, I can take email responses
containing the files themselves, or pointers to FTP sites.

        ifconfig
        uname
        uptime
        who
        fingerd

Thanks.

MODULE Sig;
FROM ICL IMPORT StdDisclaimer;
FROM Interests IMPORT Modula2, Modula3, Linux, OS2;

BEGIN
(* ------------------------------------------------------------------------.
|Simon K. Johnston - Development Engineer              |ICL Retail Systems |
|------------------------------------------------------|3/4 Willoughby Road|
|Unix Mail : S.K.Johnston.bra0801@oasis.icl.co.uk      |Bracknell, Berks   |
|Telephone : +44 (0)344 476320   Fax: +44 (0)344 476084|United Kingdom     |
|Internal  : 7261 6320    OP Mail: S.K.Johnston@BRA0801|RG12 8TJ           |
`------------------------------------------------------------------------ *)
END Sig.


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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: 32-bit Novell desktop OS combines Unix, DOS 7
Reply-To: pe1chl@rabo.nl
Date: Thu, 26 May 1994 07:54:43 GMT

In <2rv67o$2hi@galaxy.ucr.edu> insom@galaxy.ucr.edu (chris ulrich) writes:

>In article <newcombe.212.0064BFCB@aa.csc.peachnet.edu>,
>Dan Newcombe <newcombe@aa.csc.peachnet.edu> wrote:
>>In article <HJSTEIN.94May22155333@sunset.huji.ac.il> hjstein@sunset.huji.ac.il (Harvey J. Stein) writes:
>>
>>>Except that they probably won't write dosemu or wine from scratch.
>>>Since (as far as I know) both dosemu & wine are under the GPL, we get
>>>all their fixes & enhancements there too.
>>
>>Two words: 
>>      SoftPC
>>      WABI
>>
>>It could all be done that way, which means again that we would get nothing :(

>Except they would have to include IPX/SPX to sell it in an existing
>novell network, and the only way they could do that is if they put
>it in the kernel.  Bugger the rest, just give me netware interoperability
>and I can burn novell and toss netware.

If you only want some connectivity, not high-performance file server
functionality:

    dosemu can run the Novell workstation software to access a netware
    server.  the upcoming release of dosemu can even run netware 'lite'.

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: script to implement ``dump levels'' (was Re: Anybody working on BSD dump porting?)
Reply-To: pe1chl@rabo.nl
Date: Thu, 26 May 1994 08:20:55 GMT

In <DAGENAIS.94May25120445@froh.vlsi.polymtl.ca> dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) writes:

>In article <2rrjhb$eiu@sbi.sbi.com> bet@std.sbi.com (Bennett Todd) writes:

>   One of the things I really like about find(1)+cpio(1) is that the pair of
>   them constitute a really nice division of labor. Some four years ago or
>   thereabouts, I was doing some moderately complex multilevel rotating dumps,
>   with scripts using rsh(1) to backup a whole network. We got in an SGI Iris,
>   and it didn't come with dump(8). So I hacked out a quick script to get
>   multi-level dumps. I append it after my .sig.

>There were several postings discussing the respective merits of dump and
>tar. While tar works at a higher level and is more portable than
>dump, most scripts using tar for incremental backups are not as
>complete as dump. The scripts in the above mentioned posting, solely
>based on modification time, are a good example. In most cases, deleted
>files or renamed files will not be accounted for in the incremental
>tar files (i.e. your cleanup work will be lost upon restore).
>Furthermore, new files read with tar will not appear on the incremental
>backup if they happen to keep their original modification time which
>is earlier than the previous backup.

>Dump does it right for most of these things because it knows which 
>directory points to which inode and stores directories as well as files.

There is really no relation between these properties of "dump" and the
method it uses to access the disk.

It can be solved without resorting to direct filesystem access.  In fact
in the company I work for we have developed a backup/restore program that
does all this, while still using the filesystem interface.  Unfortunately
I can't give it away.

The only problem left is that you cannot backup the filesystem without
modifying it in any way.  Either the atime is modified because you read
the file, or the ctime is modified because you attempt to reset the atime.
This is a bug in the system interface, IMHO, but it could be fixed.

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

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

From: andydeck@MCS.COM (Andrew Deckowitz)
Subject: Re: 32-bit Novell desktop OS combines Unix, DOS 7
Date: 25 May 1994 21:09:09 -0500

nelson@crynwr.crynwr.com (Russell Nelson) writes:

>In article <2rv67o$2hi@galaxy.ucr.edu> insom@galaxy.ucr.edu (chris ulrich) writes:

>   Except they would have to include IPX/SPX to sell it in an existing
>   novell network, and the only way they could do that is if they put
>   it in the kernel.  Bugger the rest, just give me netware interoperability
>   and I can burn novell and toss netware.

>You don't understand -- Corsair is a desktop system, not a server
>system.  It's IPX support is going to be as a client, not a server.
>You'll still need your netware server.

>--
>-russ <nelson@crynwr.com>      ftp.msen.com:pub/vendor/crynwr/crynwr.wav
>Crynwr Software   | Crynwr Software sells packet driver support | ask4 PGP key
>11 Grant St.      | +1 315 268 1925 (9201 FAX)    | Quakers do it in the light
>Potsdam, NY 13676 | LPF member - ask me about the harm software patents do.

Thank you Russ, for making a point that I believe many have been ignoring.
The portion of Netware that Novell is protecting with what is viewed as
fanaticism is their bread-and-butter, the core operating system and the
communication protocols (NCP) that define it.  All that is necessary for
Corsair/Expose (Or for M$'s NT client) is the ability to communicate with
a Netware server, or if they are actually going to integrate Novell Dos 7
(a rumor which I personally view as highly unlikely) then perhaps they
will be adding the Personal Netware code.  This does NOT mean that you
will be able to take this code and roll your own 1000-user Netware server.
But it may mean that you will be able to (using PNW-like code) share your
disk and peripherals between Corsair boxes and perhaps from Corsair to
other platforms.  I am sure that Novell will not be handing away server
code.  This does not preclude them releasing source to a Netware client.

As an aside, I am somewhat surprised by the vehemence of the opinions
that I have seen expressed along this thread.  Some people seem to believe
that Novell will use Corsair to 'steal' Linux.  Other people are under
the impression that by releasing a desktop manager that runs on the GPL'd
Linux, Novell will be legally required to distribute source with each
copy.  Both impressions are exaggerations, and both will probably prove
incorrect.  But only time (or a Novell mole :) will tell.


-- 
 Andy Deckowitz  |   Network Administrator   |The Crystal Wind is the
andydeck@mcs.com |Direct Marketing Technology|Storm, and the Storm is
andydeck@aol.com |   andyd%dmt@mcimail.com   |Data, and the Data is Life
GCS -d+ -p+ c++++(++) l u e*(-) m+@ s/+ n- h*(+) f?/- g+ w+ t+ r++ y+(*)
These are MY opinions, who else would want them?

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

From: delman@mipg.upenn.edu (Delman Lee)
Subject: Re: enhanced IDE and SCSI-2 supported?
Date: 25 May 1994 21:49:48 GMT

In article <2s0bp6$pek@europa.eng.gtefsd.com> niemidc@pep.production (David C. Niemi) writes:

   4 drives (an EISA DTC 2290).  But the new stuff probably means that there
   will someday be BIOS info on the 3rd and 4th drives, rather than having
   to manually enter the geometry and recompile itas it is today.


You can now pass the drive's geometry to the at2disk driver when Linux
boots up via e.g. LILO. No need to recompile the kernel.

Delman.



--
______________________________________________________________________

  Delman Lee                                 Tel.: +1-215-662-6780
  Medical Image Processing Group,            Fax.: +1-215-898-9145
  University of Pennsylvania,
  4/F Blockley Hall, 418 Service Drive,                         
  Philadelphia, PA 19104-6021,
  U.S.A..                            Internet: delman@mipg.upenn.edu
______________________________________________________________________

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


** 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: Linux-Development-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.development) via:

    Internet: Linux-Development@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Development Digest
******************************
