lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20080722123641.GB17860@skywalker> Date: Tue, 22 Jul 2008 18:06:41 +0530 From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com> To: cmm@...ibm.com, tytso@....edu, sandeen@...hat.com Cc: linux-ext4@...r.kernel.org Subject: Re: [PATCH] ext4: Don't allow lg prealloc list to be grow large. On Tue, Jul 22, 2008 at 04:40:16PM +0530, Aneesh Kumar K.V wrote: > Currently locality group prealloc list is freed only when there is a block allocation > failure. This can result in large number of per cpu locality group prealloc space > and also make the ext4_mb_use_preallocated expensive. Convert the locality group > prealloc list to a hash list. The hash index is the order of number of blocks > in the prealloc space with a max order of 9. When adding prealloc space to the > list we make sure total entries for each order does not exceed 8. If it is more > than 8 we discard few entries and make sure the we have only <= 5 entries. > > small update to fix the wrong usage of list APIs diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index e058509..f8da1a2 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3348,7 +3348,7 @@ static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, if (!added && pa->pa_free < tmp_pa->pa_free) { /* Add to the tail of the previous entry */ list_add_tail_rcu(&pa->pa_inode_list, - tmp_pa->pa_inode_list.prev); + &tmp_pa->pa_inode_list); added = 1; /* we want to count the total * number of entries in the list @@ -3357,7 +3357,7 @@ static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, lg_prealloc_count++; } if (!added) - list_add_tail_rcu(&pa->pa_inode_list, &tmp_pa->pa_inode_list); + list_add_tail_rcu(&pa->pa_inode_list, &lg->lg_prealloc_list[order]); /* Now trim the list to be not more than 8 elements */ if (lg_prealloc_count > 8) { -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists