FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 07-10-2008, 07:22 AM
"Xinwei Hu"
 
Default dm-ioband: I/O bandwidth controller v1.2.0: Source code and patch

Hi Ryo,
2008/7/4 Ryo Tsuruta <ryov@valinux.co.jp>:
> +static void prevent_burst_bios(struct ioband_group *gp, struct bio *bio)
> +{
> + struct ioband_device *dp = gp->c_banddev;
> +
> + if (current->flags & PF_KTHREAD) {
> + /*
> + * Kernel threads shouldn't be blocked easily since each of
> + * them may handle BIOs for several groups on several
> + * partitions.
> + */
Might be a stupid question, but doesn't that make more sense to just
check if current->mm == NULL ?
I think PF_BORROWED_MM is only used when kernel threads doing AIO
for user process, and that should be counted as normal user processes.
Am I miss anything ?

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-10-2008, 01:36 PM
Ryo Tsuruta
 
Default dm-ioband: I/O bandwidth controller v1.2.0: Source code and patch

Hi Xinwei,

> > +static void prevent_burst_bios(struct ioband_group *gp, struct bio *bio)
> > +{
> > + struct ioband_device *dp = gp->c_banddev;
> > +
> > + if (current->flags & PF_KTHREAD) {
> > + /*
> > + * Kernel threads shouldn't be blocked easily since each of
> > + * them may handle BIOs for several groups on several
> > + * partitions.
> > + */
> Might be a stupid question, but doesn't that make more sense to just
> check if current->mm == NULL ?
> I think PF_BORROWED_MM is only used when kernel threads doing AIO
> for user process, and that should be counted as normal user processes.
> Am I miss anything ?

This function makes processes issuing I/O blocked when the number of
in-flight I/Os exceeds a certain threshold. The purpose is to prevent
I/O requests from issuing unlimitedly, not for counting the number of
I/Os.
But kernel threads should not be blocked easily since each of them may
handles BIOs for several group on several partitions. The AIO kernel
threads also handle I/Os for several groups, that's why they should
not be blocked easily.

Thanks,
Ryo Tsuruta

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 01:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org