From owner-p4-projects@FreeBSD.ORG Thu Oct 1 20:13:29 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 918CB1065696; Thu, 1 Oct 2009 20:13:29 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54F581065692 for ; Thu, 1 Oct 2009 20:13:29 +0000 (UTC) (envelope-from truncs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 43BAA8FC1E for ; Thu, 1 Oct 2009 20:13:29 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n91KDTOf061634 for ; Thu, 1 Oct 2009 20:13:29 GMT (envelope-from truncs@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n91KDTa1061632 for perforce@freebsd.org; Thu, 1 Oct 2009 20:13:29 GMT (envelope-from truncs@FreeBSD.org) Date: Thu, 1 Oct 2009 20:13:29 GMT Message-Id: <200910012013.n91KDTa1061632@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to truncs@FreeBSD.org using -f From: Aditya Sarawgi To: Perforce Change Reviews Cc: Subject: PERFORCE change 169103 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2009 20:13:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=169103 Change 169103 by truncs@aditya on 2009/10/01 20:13:08 Make the comment more verbose - include why these parameters were introduced in orlov block allocator. Affected files ... .. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/fs.h#4 edit Differences ... ==== //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/fs.h#4 (text+ko) ==== @@ -57,15 +57,26 @@ /* * The path name on which the file system is mounted is maintained * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in - * the super block for this name. AVFPDIR is the expected number of - * files per directory. AVGDIRSIZE is obtained by multiplying AVFPDIR - * and AVFILESIZ which is assumed to be 16384. Both AVFPDIR and AVFFIZSIZ - * are taken from UFS and they are used in implementation of Orlov Block - * Allocator. + * the super block for this name. */ #define MAXMNTLEN 512 + +/* + * Grigoriy Orlov has done some extensive work to fine + * tune the layout preferences for directories within a filesystem. + * His algorithm can be tuned by adjusting the following parameters + * which tell the system the average file size and the average number + * of files per directory. These defaults are well selected for typical + * filesystems, but may need to be tuned for odd cases like filesystems + * being used for sqiud caches or news spools. + * AVFPDIR is the expected number of files per directory. AVGDIRSIZE is + * obtained by multiplying AVFPDIR and AVFILESIZ which is assumed to be + * 16384. + */ + #define AFPDIR 64 #define AVGDIRSIZE 1048576 + /* * Macros for access to superblock array structures */