From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH] const struct file_operations * Date: Tue, 24 Jun 2003 15:14:28 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030624141428.GD451@parcelfarce.linux.theplanet.co.uk> References: <1056463558.29264.499.camel@passion.cambridge.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: torvalds@osdl.org, linux-fsdevel@vger.kernel.org Return-path: Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:8112 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S262090AbTFXOAU (ORCPT ); Tue, 24 Jun 2003 10:00:20 -0400 To: David Woodhouse Content-Disposition: inline In-Reply-To: <1056463558.29264.499.camel@passion.cambridge.redhat.com> List-Id: linux-fsdevel.vger.kernel.org On Tue, Jun 24, 2003 at 03:05:58PM +0100, David Woodhouse wrote: > For configurations with kernel .rodata in ROM instead of RAM, it's > actually slightly advantageous to have these structures marked as const > too -- but that can be done later and isn't mandatory. And indeed may not be advantageous. ROM accesses are typically slower than RAM accesses (or were, back when I cared about these kinds of things). Doing this kind of thing is good though -- the more ways we can get compilers to bitch about badly written code, the better. -- "It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk