Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-09-01 Thread OGAWA Hirofumi
"Machida, Hiroyuki" <[EMAIL PROTECTED]> writes: > Once concern about global URL in general, it tends to be occupied > by specific pattern, like accesses from one process or to on dir. > It prevents to realize locality. > > I think it's better to have limitations like; > entries for same proc

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-09-01 Thread Machida, Hiroyuki
Machida, Hiroyuki wrote: OGAWA Hirofumi wrote: "Machida, Hiroyuki" <[EMAIL PROTECTED]> writes: Right, it looks like TLB, which holds cache "Physical addres" correponding to "Logical address". In this case, PID and file name to be looked up, perform role of "Logical address". But, there i

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Machida, Hiroyuki
OGAWA Hirofumi wrote: "Machida, Hiroyuki" <[EMAIL PROTECTED]> writes: Right, it looks like TLB, which holds cache "Physical addres" correponding to "Logical address". In this case, PID and file name to be looked up, perform role of "Logical address". But, there is the big difference between

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread OGAWA Hirofumi
"Machida, Hiroyuki" <[EMAIL PROTECTED]> writes: > Right, it looks like TLB, which holds cache "Physical addres" > correponding to "Logical address". In this case, PID and file name > to be looked up, perform role of "Logical address". But, there is the big difference between hint table and TLB. T

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Pekka Enberg
On 8/31/05, Pekka Enberg <[EMAIL PROTECTED]> wrote: > After finally understanding what you're doing, how about: > > static inline int hint_allocate(struct inode *dir) > { > loff_t *hints; > int err = 0; > > if (!MSDOS_I(dir)->scan_hints) Should read: if (MSDOS_I(dir)->sc

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Pekka Enberg
On 8/31/05, Machida, Hiroyuki <[EMAIL PROTECTED]> wrote: > How about this ? > > if (!MSDOS_I(dir)->scan_hints) { > hints = kcalllo(); > > down > if (MSDOS_I(dir)->scan_hints) { > up > goto

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Pekka Enberg
On 8/31/05, Machida, Hiroyuki <[EMAIL PROTECTED]> wrote: > > Please consider moving this check to callers. Conditional allocation > > makes this bit strange API-wise. Or alternatively, give > > hint_allocate() a better name. > > How about hint_allocate_conditional() ? hint_get() sounds better to

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Machida, Hiroyuki
Pekka Enberg wrote: On 8/31/05, Machida, Hiroyuki <[EMAIL PROTECTED]> wrote: +inline +static int hint_index_body(const unsigned char *name, int name_len, int check_null) +{ + int i; + int val = 0; + unsigned char *p = (unsigned char *) name; + int id = current->pid; + +

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Machida, Hiroyuki
Hi, Thank you checking code... Pekka Enberg wrote: Hi, : snip This patch enables using hint information on scanning dir. It achieves excellent performance with "ls -l" for over 1000 entries. * fat-dirscan-with-hint_3.patch for linux 2.6.13 fs/fat/dir.c | 130

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Machida, Hiroyuki
Hi, Pekka Enberg wrote: Hi, On 8/31/05, Machida, Hiroyuki <[EMAIL PROTECTED]> wrote: +inline +static int hint_allocate(struct inode *dir) +{ + loff_t *hints; + int err = 0; + + if (!MSDOS_I(dir)->scan_hints) { + hints = kcalloc(FAT_SCAN_NWAY, sizeof(loff_t), GF

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Pekka Enberg
Hi, On 8/31/05, Machida, Hiroyuki <[EMAIL PROTECTED]> wrote: > > Sorry, I send out wrong version. I attached the latest patch to 2.6.13. > > OGAWA Hirofumi wrote: > > "Machida, Hiroyuki" <[EMAIL PROTECTED]> writes: > > > > > >>Here is a revised version of dirent scan patch, mentioned at > >>fol

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Pekka Enberg
On 8/31/05, Machida, Hiroyuki <[EMAIL PROTECTED]> wrote: > +inline > +static int hint_index_body(const unsigned char *name, int name_len, int > check_null) > +{ > + int i; > + int val = 0; > + unsigned char *p = (unsigned char *) name; > + int id = current->pid; > + > +

Re: [PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Pekka Enberg
Hi, On 8/31/05, Machida, Hiroyuki <[EMAIL PROTECTED]> wrote: > +inline > +static int hint_allocate(struct inode *dir) > +{ > + loff_t *hints; > + int err = 0; > + > + if (!MSDOS_I(dir)->scan_hints) { > + hints = kcalloc(FAT_SCAN_NWAY, sizeof(loff_t), GFP_KERNEL); >

[PATCH][FAT] FAT dirent scan with hin take #3

2005-08-31 Thread Machida, Hiroyuki
Sorry, I send out wrong version. I attached the latest patch to 2.6.13. OGAWA Hirofumi wrote: "Machida, Hiroyuki" <[EMAIL PROTECTED]> writes: Here is a revised version of dirent scan patch, mentioned at following E-mail. This patch addresses performance damages on "ls | xargs xxx" and reve