Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swapping over Ethernet?



>>>>> "Jim" == Jim Tittsler <jwt@example.com> writes:

    Jim> The only real problem I'm having is not being able to swap.
    Jim> Since I'm still diskless, as a temporary measure I was trying
    Jim> to swap over the ethernet... but swapon keeps telling me that
    Jim> my "mkswap"ped swapfile I'm pointing it at is an "invalid
    Jim> device."  Any hints?

Put as much of the resources as possible on other machines.  You know,
xdm, fvwm, and so on should all be running elsewhere.  Maybe you
should run the kernel somewhere else, it's a CPU hog ;-)  As for
somehow making diskless swapping work, inasmuch as

    * the man page for makeswap(8) says that a swapfile must be a
      contiguous area of disk,
    * the man page for swapon(2) says that if the argument is not a
      "block device or a REGULAR path," EINVAL is returned (I doubt
      they count an NFS mount as a regular path---your network
      interface is not a block special file; I assume they mean a path
      which can be resolved to a region of storage on a block device
      owned by the kernel, rather than a generalized byte
      source/sink), and
    * nobody I know has reported serious performance hits from using
      swapfiles rather than swap partitions,

I suspect that the kernel accesses swap thingies directly through the
block special files using DMA on page boundaries.  I'll bet a large
sum of money (I'll buy lunch for the next TLUG meeting I attend) that
the kernel's swapping functions *don't* use fseek(3) for random access
to swapfiles.  (That's a sucker bet, by the way, since fseek(3) is a
libc function.)  I'll bet a small sum of money (I'll buy Jim T.'s
lunch) that it doesn't use lseek(2).

I'm amazed that mkswap permitted you to make a swapfile across the
ethernet.

I think on this one you're SOL, buckaroo.  But if you want to wade
into the kernel source and prove I'm wrong....  In any case, if you
could do it, it would only be proof-of-concept; I can't imagine how
slow that's going to be (DMA on even the ISA bus is much faster than
10BaseT, and not much slower than 100BaseT).

-- 
                           Stephen John Turnbull
University of Tsukuba                                        Yaseppochi-Gumi
Institute of Policy and Planning Sciences  http://turnbull.sk.tsukuba.ac.jp/
Tennodai 1-1-1, Tsukuba, 305 JAPAN                 turnbull@example.com
-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links