Re: getting more that 4K out of a proc file?

From: Peter T. Breuer (ptb@it.uc3m.es)
Date: Sun Feb 13 2000 - 13:16:22 EST


"A month of sundays ago Jeff Garzik wrote:"
> "Peter T. Breuer" wrote:
> >
> > Could someone kindly point me to an example in the source to show me
> > how to get more than a page out of a proc file on read?
> If it hasn't been updated, I think MTRR uses a static buffer which can
> be larger than 1 page. You have to be really wary of SMP issues with
> things like that (luckily the MTRR buffer isn't very dynamic, IIRC)

Thanks. It "turns out" that returning the bytes read at each call in
*start (as well as in the return value) from a proc_read function
does the trick automagically. I think the code is very obscure. This
seems to be known by nobody. I have made a deobscurantism patch that
I'll post in a mo. It makes it more obvious that there are horrible
FIXMEs hanging in thæt code area. And yes, there are zillions of
races.

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:25 EST