🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80757

Re: Mmap and maximum cycbuffs

#80757
From: John F. Morse
Date: Sun, 26 Apr 2009 02:32
185 lines
7040 bytes
Alexander Bartolich wrote:
> John F. Morse wrote:
>   
>> [...]
>> Q1. How can I determine if my OS supports mmap?
>>     
>
> - Read the fine manual
> - Write, build and run a test program
> - Run a program that claims to use mmap(2) under a system call
>   tracer like strace(1)
>   
>> I do not find an mmap(2) man page,
>>     
>
> $ man -w mmap
> /usr/share/man/man2/mmap.2.gz
>
> $ dpkg -S /usr/share/man/man2/mmap.2.gz
> manpages-dev: /usr/share/man/man2/mmap.2.gz
>   


john@n1:~$ dpkg -S /usr/share/man/man2/mmap.2.gz
dpkg: /usr/share/man/man2/mmap.2.gz not found.


john@n1:~$ apt-cache policy manpages-dev
manpages-dev:
  Installed: (none)
  Candidate: 2.77-1
  Version table:
     2.77-1 0
        500 http://us.archive.ubuntu.com hardy/main Packages


Did you click the link I provided to: http://linux.die.net/man/2/mmap ?


>> and "apt-cache show mmap" returns, "W: Unable to locate
>> package mmap E: No packages found" when ran.
>>     
>
> $ dpkg -L manpages-dev | wc -l
> 1661
>
> I guess it would exceed the available storage to add the title of
> every included man page to the description of package "manpages-dev".
>   


Not really.

john@n100:~$ apt-cache show manpages-dev
Package: manpages-dev
Priority: optional
Section: doc
Installed-Size: 2972
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Martin Schulze <joey@debian.org>
Architecture: all
Source: manpages
Version: 2.77-1
Replaces: glibc-doc (<< 2.3.6-8)
Depends: manpages
Suggests: man-browser
Filename: pool/main/m/manpages/manpages-dev_2.77-1_all.deb
Size: 1357676
MD5sum: f594d31263bd792ac4ecfe1ee37b4284
SHA1: d2e5b902fac3b8610678243c5794e53fbae934fc
SHA256: cb048666d48833a0e164b8060ca45d9ad23695a5f46acd656e68af66df4b1651
Description: Manual pages about using GNU/Linux for development
 These man pages describe the Linux programming interface, including
 these two sections:
  2 = Linux system calls.
  3 = Library calls (note that a more comprehensive source of information
      may be found in the glibc-doc package).


>> [...]
>> Does anyone know if Debian 3.1 (Sarge 2.4.27-2-386), 4.0 (Etch
>> 2.6.18-6-486) and 5.0 (Lenny 2.6.26-2-686), as well as Ubuntu 8.04
>> (Hardy Heron 2.6.24-23-generic) support mmap?
>>     
>
> The description of cycbuff.conf was apparently written when the
> distinction between BSD and System V still mattered. Nowadays
> moth mmap (originated on BSD) and shmctl (the alternative design
> of System V) are both part of POSIX and provided by any unixoid
> system with virtual memory support.
>   


But POSIX isn't always POSIX. ;-)

http://en.wikipedia.org/wiki/Posix#POSIX-oriented_operating_systems


>> Q2. I suspect the eight partitions restriction mentioned above would be
>> for the maximum four primary partitions on each hard drive,
>>     
>
> I suspect the number eight refers to the partition scheme used by
> Sun on its SPARC hardware. Once upon a time there was a similar
> limit of four on the IBM PC.
>   


There still is the limit. However, "modern" OS software can work around it.


>> on each PATA (IDE/EIDE) channel (master and slave, or "device0"
>> and "device1")? What about doubling this to 16 if a secondary
>> PATA channel is used (two additional hard drives)?
>>     
>
> The number of disks in the system has nothing to do with the
> number of slices that you can partition one such disk into.
>   


That was not my question.


>> Q3. Would this restriction of eight partitions still apply if extended
>> partitions with many logical partitions are used?
>>     
>
> You can have an infinite number of logical partitions. However,
> the device node scheme of the old Linux IDE driver supports only
> 63 partitions. The SCSI driver, which is nowadays also used for
> IDE and SATA, supports only 15.
>   


That's 15 drives on EACH SCSI interface card. More cards = more drives. ;-)

Still, you wandered off track from my question about the eight partition
restriction.


>> Q4. What about SCSI and SATA drives and controller interfaces that can
>> accommodate more than four devices, or added PCI ATA interfaces?
>>     
>
> The device node scheme of Linux:
>
> $ vdir /dev/sd*
> brw-rw---- 1 root disk 8,  0 2009-04-08 08:03 /dev/sda
> brw-rw---- 1 root disk 8,  1 2009-04-08 08:03 /dev/sda1
> brw-rw---- 1 root disk 8,  2 2009-04-08 08:03 /dev/sda2
> brw-rw---- 1 root disk 8,  3 2009-04-08 08:03 /dev/sda3
> brw-rw---- 1 root disk 8, 16 2009-04-08 08:03 /dev/sdb
> brw-rw---- 1 root disk 8, 17 2009-04-08 08:03 /dev/sdb1
> brw-rw---- 1 root disk 8, 18 2009-04-08 08:03 /dev/sdb2
> brw-rw---- 1 root disk 8, 19 2009-04-08 08:03 /dev/sdb3
>                        ^  ^^
> major device number ---+   |
>                            |
> minor device number -------+
>
> You can have 256 / 16 = 16 disks.
> Each disk can have 15 partitions.
> If you need more, use the logical volume manager (LVM).
>   


Thanks, Alexander, but I wasn't needing a hardware lesson. ;-)

Maybe my question(s) was (were) unclear?

I asked if the restriction was still valid because of a software
inability to work with more than eight partitions -- of whatever type.

I think I have the answer: Try it and let the expert computer answer the
question. It is up-to-date, which is often not the case at all
concerning documentation. ;-)


-- 
John 

No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Technical Details
Message-ID: <gt0h4i$sne$1@optima7.xanadu-bbs.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!74.222.216.191.MISMATCH!optima7.xanadu-bbs.net!not-for-mail
References: <gt037l$otv$1@optima7.xanadu-bbs.net> <gt07t4$mda$1@news.albasani.net>

Show Full Headers
Complete Article Headers
Message-ID: <gt0h4i$sne$1@optima7.xanadu-bbs.net>
Subject: Re: Mmap and maximum cycbuffs
Date: Sat, 25 Apr 2009 21:32:50 -0500
From: "John F. Morse" <xanadu.bbs@example.invalid>
References: <gt037l$otv$1@optima7.xanadu-bbs.net> <gt07t4$mda$1@news.albasani.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!74.222.216.191.MISMATCH!optima7.xanadu-bbs.net!not-for-mail
Newsgroups: news.software.nntp
Organization: Xanadu BBS
Lines: 185
Reply-To: dont.bother
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: optima7.xanadu-bbs.net 1240713170 29422 192.168.89.210 (26 Apr 2009
X-Complaints-To: newsmaster@xanadu-bbs.net
NNTP-Posting-Date: Sun, 26 Apr 2009 02:32:50 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.21 (X11/20090318)
In-Reply-To: <gt07t4$mda$1@news.albasani.net>