[openib-general] Re: [PATCH 07/13] [RFC] ipath core misc files

Robert Walsh rjwalsh at pathscale.com
Sat Dec 17 13:33:55 PST 2005


> > +int ipath_mlock(unsigned long start_page, size_t num_pages, struct page **p)
> OK.  It's perhaps not a very well named function.

Really?  Suggestion for a better name?

> > +	}
> > +	vm->vm_flags |= VM_SHM | VM_LOCKED;
> > +
> > +	return 0;
> > +}
> 
> I don't think we want to be setting the user's VMA's vm_flags in this
> manner.  This is purely to retain the physical page across fork?

I didn't write this bit of the driver, but I believe this is the case.
Is there a better way of doing this?

> > +int ipath_munlock(size_t num_pages, struct page **p)
> > +{
> > +	int i;
> > +
> > +	for (i = 0; i < num_pages; i++) {
> > +		_IPATH_MMDBG("%u/%lu put_page %p\n", i, num_pages, p[i]);
> > +		SetPageDirty(p[i]);
> > +		put_page(p[i]);
> > +	}
> > +	return 0;
> > +}
> 
> Nope, SetPageDirty() doesn't tell the VM that the page is dirty - it'll
> never get written out.  Use set_page_dirty_lock().

OK.

Regards,
 Robert.

-- 
Robert Walsh                                 Email: rjwalsh at pathscale.com
PathScale, Inc.                              Phone: +1 650 934 8117
2071 Stierlin Court, Suite 200                 Fax: +1 650 428 1969
Mountain View, CA 94043.





More information about the general mailing list