Skip to contentSkip to conversation

Using tgid instead of pid in ext3_find_near()

DISCUSSION Manish Katiyar 2 participants 3 messages Apr 28, 2008 – Apr 29, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

In the function ext*_find_near() we are using pid to have the locality of the blocks for the files which have same functionality. Shouldn't we be using "current->tgid" here instead ??

410 static ext3_fsblk_t ext3_find_near(struct inode *inode, Indirect *ind)
411 {
.........
........
433 colour = (current->pid % 16) *
434 (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
........

Signature · 8 lines
Thanks & Regards,
********************************************
Manish Katiyar ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************
#1 lore raw

Ehmmm....

Quoted 6 lines · Manish Katiyar

Hi,

In the function ext*_find_near() we are using pid to have the locality of the blocks for the files which have same functionality. Shouldn't we be using "current->tgid" here instead ??

Quoted 7 lines

410 static ext3_fsblk_t ext3_find_near(struct inode *inode, Indirect *ind)
411 {
.........
........
433 colour = (current->pid % 16) *
434 (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
........

Because each threads even on same thread group doesn't need to share open file descriptors?

regards,

Mulyadi.

#2 lore raw
Quoted 18 lines · Mulyadi Santosa

Ehmmm....

Quoted 6 lines · Manish Katiyar

Hi,

In the function ext*_find_near() we are using pid to have the locality of the blocks for the files which have same functionality. Shouldn't we be using "current->tgid" here instead ??

Quoted 7 lines

410 static ext3_fsblk_t ext3_find_near(struct inode *inode, Indirect *ind)
411 {
.........
........
433 colour = (current->pid % 16) *
434 (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
........

Quoted 2 lines

Because each threads even on same thread group doesn't need to share open file descriptors?

Hi Mulyadi,

It's not about the open file descriptors. The idea behind putting this is to put all the blocks of same process (which may be functionally related) nearby in the blockgroup for locality. So I think we should be using tgid instead of pid.

Thanks

Quoted 5 lines

regards,

Mulyadi.

Signature · 8 lines
Thanks & Regards,
********************************************
Manish Katiyar ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************