On Friday February 29, a.p.zijlstra@chello.nl wrote:I think this is very interesting and useful. You seem to be saying that the write-throttling is enough to avoid any starvation on the transmit path. i.e. the VM is limiting the amount of dirty memory so that when we desperately need memory on the writeout path we can always get it, without lots of careful accounting. So why doesn't this work on for the receive side? What - exactly - is the difference. I think the difference is that on the receive side we have to hand out memory before we know how it will be used (i.e. whether it is for a SK_MEMALLOC socket or not) and so emergency memory could get stuck in some non-emergency usage. So suppose we forgot about all the allocation tracking (that doesn't seem to be needed on the send side so maybe isn't on the receive side) and just focus on not letting emergency memory get used for the wrong thing. So: Have some global flag that says "we are into the emergency pool" which gets set the first time an allocation has to dip below the low water mark, and cleared when an allocation succeeds without needing to dip that low. Then whenever we have memory that might have been allocated from below the watermark (i.e. an incoming packet) and we find out that it isn't required for write-out (i.e. it gets attached to a socket for which SK_MEMALLOC is not set) we test the global flag and if it is set, we drop the packet and free the memory. To clarify: no new accounting no new reservations just "drop non-writeout packets when we are low on memory" Is there any chance that could work reliably? I call this the "Linus" approach because I remember reading somewhere (that google cannot find for me) where Linus said he didn't think a provably correct implementation was the way to go - just something that made it very likely that we won't run out of memory at an awkward time. I guess my position is that any accounting that we do needs to have a clear theoretical model underneath it so we can reason about it. I cannot see the clear model in beneath the current code so I'm trying to come up with models that seem to capture the important elements of the code, and to explore them. NeilBrown --
| Eric Paris | [RFC 0/5] [TALPA] Intro to a linux interface for on access scanning |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Chris Mason | Btrfs v0.16 released |
git: | |
| Michael Hendricks | removing content from git history |
| Jakub Narebski | Re: VCS comparison table |
| Ken Pratt | pack operation is thrashing my server |
| Aubrey Li | git proxy issue |
| Kevin Neff | Patching a SSH 'Weakness' |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Theo de Raadt | Re: dmesg IBM x3650 OpenBSD 4.3 |
| F. Caulier | [Perl/locales] Warning about locales |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| Rémi | [PATCH 0/6] [RFC] Phonet pipes protocol (v2) |
| Oliver Hartkopp | Re: [RFC] Patch to option HSO driver to the kernel |
| Treason Uncloaked | 1 hour ago | Linux kernel |
| Shared swap partition | 13 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 2 days ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 2 days ago | Linux kernel |
