Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CDVWe-0000a4-4y for mharc-grub-devel@gnu.org; Fri, 01 Oct 2004 18:05:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CDVWb-0000ZD-II for grub-devel@gnu.org; Fri, 01 Oct 2004 18:05:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CDVWa-0000Yq-OZ for grub-devel@gnu.org; Fri, 01 Oct 2004 18:05:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CDVWa-0000YV-Fp for grub-devel@gnu.org; Fri, 01 Oct 2004 18:05:12 -0400 Received: from [195.113.31.125] (helo=artax.karlin.mff.cuni.cz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CDVPc-0005h1-HP for grub-devel@gnu.org; Fri, 01 Oct 2004 17:58:01 -0400 Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 17122) id D259F3FB3; Fri, 1 Oct 2004 23:56:53 +0200 (CEST) Date: Fri, 1 Oct 2004 23:56:53 +0200 From: Tomas Ebenlendr To: The development of GRUB 2 Message-ID: <20041001215653.GA19015@artax.karlin.mff.cuni.cz> Mail-Followup-To: The development of GRUB 2 References: <20040928190544.GA24852@artax.karlin.mff.cuni.cz> <200409301533.28151.okuji@enbug.org> <871xgjg5ll.fsf@marco.marco-g.com> <200410011709.03394.okuji@enbug.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410011709.03394.okuji@enbug.org> User-Agent: Mutt/1.5.6i Subject: Re: Automagic command loading X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2004 22:05:14 -0000 Ok, I think that common opinion is that autocmd.lst is better. So I'll write autogenerating it and reading it e.g. in autocmd.mod. I also try to figure out the slow point in this solution. But I have folowing questions: 1.) Should I throw away current implementation, or should there be a module with this implementation (e.g. autocmd_elf.mod). 2.) I think, that having information about supported commands in module is not bad. I can write tool, to read it (and generate autocmd.lst from this information). Advantage will be following: User1 compiles his own module and sends it to User2. User2 will copy the module on proper location and run: grub-mod-read-cmds the_module.mod >> autocmd.lst > My intuition is that this is not a good solution. So I think of another > example. > > The user does not like the behavior of, say, ls. So he writes his own > module for an exhanced version of ls. Then, which does GRUB load? > > I do not like this undeterministic behavior. You may think that the user > can simply remove the original module and add his own. This is true, > but I don't think this is a clean way. > > One more example. Suppose that GRUB supports 100 commands and 100 > filesystems. Probably the overhead of loading all modules would be > negligible on Pentium4, but isn't it significant on 486? We should not > forget that some people still use very old computers. > > I don't see any serious disadvantage in autocmd.lst. Generating this > file is as easy as embedding command names in modules. Editing this > file is not difficult at all for users who can write their own modules. > > Generally speaking, text-based approaches are better than binary-based > approaches. For example, if the user wants to know what modules > contains a given command, he can just grep autocmd.lst instead of > reading the source code or using readelf. > > BTW, I think it would be useful to investigate why loading all modules > takes 5 seconds on bochs. Even on bochs, I feel this is too much. There > might be a bug in the disk cache system. Tomas, could you look at the > cache efficiency when loading all modules? You can get this information > by the function grub_disk_cache_get_performance. To enable this > function, you need to change kern/disk.c, because I disable this by #if > 0 ... #endif. > > Okuji > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel -- Tomas 'ebi' Ebenlendr http://get.to/ebik PF 2004.75133677393