On Sun, 6 Apr 2008, Christoph Lameter wrote:I'm not sure that I understand you. Yes, different slab allocators may lay out slots differently. But a significant departure from existing behaviour may be a bad idea in some circumstances. (Hmm, maybe I've written a content-free sentence there!). Mempools may be used for atomic allocations, but I think that's not the case here. swap_writepage's get_swap_bio says GFP_NOIO, which allows (indeed is) __GFP_WAIT, and does not give access to __GFP_HIGH reserves. Whereas at the __scsi_get_command end, there are GFP_ATOMIC sense_slab allocations, which do give access to __GFP_HIGH reserves. My supposition is that once a page has been allocated from __GFP_HIGH reserves to a scsi sense_slab, swap_writepages are liable to gobble up the rest of the page with bio allocations which they wouldn't have had access to traditionally (i.e. under SLAB). So an unexpected behaviour emerges from SLUB's slab merging. Though of course the same might happen in other circumstances, even without slab merging: if some kmem_cache allocations are made with GFP_ATOMIC, those can give access to reserves to non-__GFP_HIGH allocations from the same kmem_cache. Maybe PF_MEMALLOC and __GFP_NOMEMALLOC complicate the situation: I've given little thought to mempool_alloc's fiddling with the gfp_mask (beyond repeatedly misreading it). We need to have already exhausted reserves, yes: so this isn't an issue hitting everyone all the time, and it may be nothing worse than a surprising anomaly; but I'm pretty sure it's not how bio and scsi command allocation is expected to interact. What do you think a SLAB_NOMERGE flag? The last time I suggested something like that (but I was thinking of debug), your comment was "Ohh..", which left me in some doubt ;) If we had a SLAB_NOMERGE flag, would we want to apply it to the bio cache or to the scsi_sense_cache or to both? My difficulty in answering that makes me wonder whether such a flag is right. Hugh --
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Riki Oktarianto | [PATCH] Add quirk to set AHCI mode on ICH boards |
| Alex Chiang | [PATCH v5 00/16] PCI: let the core manage slot names |
git: | |
| Sam Song | Fwd: [OT] Re: Git via a proxy server? |
| Toby White | Using Filemerge.app as a git-diff viewer |
| Sam Vilain | [PATCH] git-mergetool: add support for ediff |
| Adrian Bunk | git-revert is a memory hog |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Stephan A. Rickauer | Re: New tcp stack attack |
| Richard Stallman | Real men don't attack straw men |
| Ondřej Surý | openbgp not exporing ipv6 to routing tables |
| Michael Chan | [PATCH net-next 2/6] bnx2: Check netif_running() in all ethtool operations. |
| Herbert Xu | Re: xfrm_state locking regression... |
| adobriyan | [PATCH 10/38] netns ct: per-netns expectations |
| Dale Farnsworth | Re: [PATCH 01/39] mv643xx_eth: reverse topological sort of functions |
| How to make my PCIE ATA storage device running in Linux | 7 hours ago | Linux general |
| sata/ide timeout errors on asus server-mb | 10 hours ago | Linux kernel |
| Shared swap partition | 11 hours ago | Linux general |
| usb mic not detected | 15 hours ago | Applications and Utilities |
| Problem in Inserting a module | 16 hours ago | Linux kernel |
| Treason Uncloaked | 22 hours ago | Linux kernel |
| high memory | 3 days ago | Linux kernel |
| semaphore access speed | 3 days ago | Applications and Utilities |
| the kernel how to power off the machine | 3 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
