Re: cache info
Kaz Kojima <[email protected]> Sun, 21 Mar 2004 08:38:09 +0900 (JST)
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general |
|---|---|
| Message-ID | <[email protected]> |
Paul Mundt <[email protected]> wrote: > On Sat, Mar 20, 2004 at 04:12:22PM +0900, Kaz Kojima wrote: >> Indeed, vsyscall is interesting. But it seems not appropriate >> that implementing vsyscall for the query function for cache info. >> This function will never be called often and there is no problem >> even if it is slow. > > Ah, ok. In that case, going with a syscall probably wouldn't be too > terrible. Other platforms (ie, s390, etc.) already have their own > set of specific syscalls, so this isn't a huge issue as long as the > number is reserved and no one else uses it. (Though I'm not sure if > Marcelo will take additional syscalls in 2.4 at this point or not). I'm inclined to incorporate it as a normal syscall. It seems that the other unusual ways are harder to take into 2.4 than that. > How important is the information that glibc needs early on in the > init process? Is it possible to use a generic definition that works > for the worst case and then re-evaluate that once procfs is up? I'm not sure how important it is, but anyway it's very likely to call it at the initialization itself. It's used in sysconf function and although such fallback with procfs would be possible, other architectures return the value which is considered as safe or simply return a failure for the case in which cpu registers give not enough info. I'll use a such easy fallback as the last resort if our new syscall returns ENOSYS. > If all you need the data for is flushing, 2.4 already has a > sys_cacheflush on sh (it uses the sys_modify_ldt number, since no > one other than x86 uses it). I haven't added this to 2.6 as of yet > though, and it really should be under its own number. In this event, > sys_cacheflush() will already do the right thing, depending on what > op you hand it (see arch/sh/kernel/sys_sh.c in linux-2_4-branch). Thanks. I'll take a look at that stuff. > I'll probably have a go at this later, it does look interesting. Great! Regards, kaz ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click