🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80752

Re: Mmap and maximum cycbuffs

#80752
From: Alexander Bartolich
Date: Sat, 25 Apr 2009 23:55
84 lines
4369 bytes
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

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

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

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

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

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

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

-- 
seq 100 | sed 's/.*/Romani Ite Domum./'
Technical Details
Message-ID: <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.ams.giganews.com!nntp.giganews.com!news.musoftware.de!wum.musoftware.de!news.albasani.net!not-for-mail
References: <gt037l$otv$1@optima7.xanadu-bbs.net>

Show Full Headers
Complete Article Headers
Message-ID: <gt07t4$mda$1@news.albasani.net>
Subject: Re: Mmap and maximum cycbuffs
Date: Sat, 25 Apr 2009 23:55:16 +0000
From: Alexander Bartolich <alexander.bartolich@gmx.at>
References: <gt037l$otv$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.ams.giganews.com!nntp.giganews.com!news.musoftware.de!wum.musoftware.de!news.albasani.net!not-for-mail
Newsgroups: news.software.nntp
Organization: albasani.net
Lines: 84
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.albasani.net
 LAbe8I/PKa4nw/FrChHhkpNoTb3lXrHw1ofecKns/unNOG3nRCx7Jz1pvI5qaQKLtvvlz5/HgkvIf3TwI7/YkUPKqI2sGfVgqZH+EI09SX8YwC7Sp/bFF37dX0mkiTnp
X-Complaints-To: abuse@albasani.net
NNTP-Posting-Date: Sat, 25 Apr 2009 23:55:16 +0000 (UTC)
X-User-ID: 5HwAOsaElS/QD0pbr4VSOKB1Kv4epcsLYnR/B4np/RGmH0a8L/STE/bwF8wM3z0JdukMClqYStZFisfL5M6Dwg==
Cancel-Lock: sha1:bl7He79xOH8wtQeHJVC8Q+L1T3k=
User-Agent: slrn/0.9.9p1 (Linux)
X-NNTP-Posting-Host: 63PruxQJhSk2o/kNCy9444KTJOEBZEeI558TTmzLtBY=