Hi, just a short comment :) ! On Fri, Apr 3, 2009 at 6:15 PM, pradeep singh <pradeep.rautela@xxxxxxxxx> wrote: > On Tue, Mar 31, 2009 at 11:31 AM, krushnaal pai <krisonearth@xxxxxxxxx> wrote: >> in kernel 2.6.11 >> to retrieve a particular file the kernel calls d_lookup to check cache but >> if it is not found in dcache ,kernel calls real_lookup to search the hard >> disk. >> however inside real_lookup the kernel again calls d_lookup . can someone plz >> explain why? > > Because while you were waiting/sleeping for semaphore to be acquired. > Someone else might have actually read the contents into dentry cache. > So, why do a lookup! > > Just to speed things up, it is a clever trick. > > Comments tell it. Betcha! This kind of trick really opens my eyes to think literally! :D regards, Mulyadi. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ