public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Machida, Hiroyuki" <machida@sm.sony.co.jp>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: "Machida, Hiroyuki" <machida@sm.sony.co.jp>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][FAT] FAT dirent scan with hin take #3
Date: Thu, 01 Sep 2005 16:45:38 +0900	[thread overview]
Message-ID: <4316B1A2.5050306@sm.sony.co.jp> (raw)
In-Reply-To: <431696BB.8050104@sm.sony.co.jp>

Machida, Hiroyuki wrote:
> OGAWA Hirofumi wrote:
> 
>> "Machida, Hiroyuki" <machida@sm.sony.co.jp> 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. TLB is
>> just the cache, and TLB hit is perfectly good, because kernel is
>> flushing the wrong values.
>>
>> But this hint table is just collecting the recent access, it's not
>> cache, and it's not tracking the process's access at all.  So, since
>> the hint value is really random, the hint value may be bad.
>>
>> I worry bad cases of this.
>>
>>
>> Umm... How about tracking the access pattern of process?  If that
>> seems randomly access, just give up tracking and return no hint.  And,
>> probably, I think it would be easy to improve the behavior later.
>>
>> What do you think?
> 
> 
> Sounds interesting...
> 
> Once concern about global URL in general, it tends to be occupied
                             ^^^
sorry, LRU not URL.

> by specific pattern, like accesses from one process or to on dir.
                                                             one dir.

> It prevents to realize locality.
> 
> I think it's better to have limitations like;
>     entries for same process would be limited to 2/3
>     entries for same dir would be limited to 1/3
> 
> 
>> e.g.
>>
>> #define FAT_LOOKUP_HINT_MAX    16
>>
>> /* this data per task */
>> struct fat_lookup_hint {
>>     struct list_head lru;
>>     pid_t pid;
>>     struct super_block *sb;
>>     struct inode *dir;
>>     loff_t last_pos;
>> /*    int state;*/
>> };
> 
> 
> Does this mean for each process recording last recent 16
> accesses to FAT file system ? If true, pid would be eliminated.
> 
> I guess it's better to record nr_slots for this entry.
> 
> As implementation issue, if number of entires is small enough,
> we can use an array, not a list.
> 
> 
>> static void fat_lkup_hint_inval(struct super_block *, struct inode *);
>> static loff_t fat_lkup_hint_get(struct super_block *, struct inode *);
>> static void fat_lkup_hint_add(struct super_block *, struct inode *, 
>> loff_t);
>> static int fat_lkup_hint_init(void);
> 
> 
> I think super_block can be retrieved from inode, any other intention do
> you have?
> 
> 
> In addtion, we can do follwoing to check the exact match case;
> 
>     0. Record hash value of file name in struct fat_lookup_hint
> 
>     1. Check hash value to find exact match case,
>     1-1. If matched entry is found, check if file name and
>          file name retieved from dirent corresponding
>     1-2. We found the entry
> 
>     2. Get hint value, if there seem to have locality
>     2-1. Check locality of access pattern for this PID and this
>          DIR.
>     2-2. If we relize access locality, return hit value so that
>          it covers a potential working set.
>     2-3. Use hint value as start position of dirscan.
> 


-- 
Hiroyuki Machida

  reply	other threads:[~2005-09-01  7:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-30  3:01 [RFC][FAT] diren scan profiling report Machida, Hiroyuki
2005-08-30  4:50 ` [PATCH][FAT] FAT dirent scan with hin take #2 Machida, Hiroyuki
2005-08-30  8:51   ` Pekka Enberg
2005-08-30  8:55   ` Pekka Enberg
2005-08-30  9:18     ` Vojtech Pavlik
2005-08-30 19:27   ` OGAWA Hirofumi
2005-08-31  1:43     ` OGAWA Hirofumi
2005-08-31  8:25     ` [PATCH][FAT] FAT dirent scan with hin take #3 Machida, Hiroyuki
2005-08-31 10:00       ` Pekka Enberg
2005-08-31 12:57         ` Machida, Hiroyuki
2005-08-31 13:51           ` Pekka Enberg
2005-08-31 13:53             ` Pekka Enberg
2005-08-31 10:03       ` Pekka Enberg
2005-08-31 13:27         ` Machida, Hiroyuki
2005-08-31 10:14       ` Pekka Enberg
2005-08-31 13:04         ` Machida, Hiroyuki
2005-08-31 13:52           ` Pekka Enberg
2005-08-31 16:41       ` OGAWA Hirofumi
2005-09-01  5:50         ` Machida, Hiroyuki
2005-09-01  7:45           ` Machida, Hiroyuki [this message]
2005-09-01 17:48           ` OGAWA Hirofumi
2005-09-14 18:59             ` Machida, Hiroyuki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4316B1A2.5050306@sm.sony.co.jp \
    --to=machida@sm.sony.co.jp \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox