Re: removing the global lock from sys_brk()

Chuck Lever (cel@monkey.org)
Fri, 4 Jun 1999 12:33:30 -0400 (EDT)


On Fri, 4 Jun 1999, Andrea Arcangeli wrote:
> On Thu, 3 Jun 1999, Linus Torvalds wrote:
>
> >> + lock_kernel();
> >> + insert_vm_struct(mm, vma);
> >> + merge_segments(mm, vma->vm_start, vma->vm_end);
> >> + unlock_kernel();
> >
> >because we're guaranteed to merge only a segment without any inode or
> >anything else, so there's no way we can do anything bad even conceptually:
> >the mm semaphore should protect us quite sufficiently.
>
> I think the same is true also for insert_vm_struct.

remove the global lock from this code, and watch the kernel oops and lock
up faster than you can say jack robinson. :) [under load, of course]

i'll play with this a little more to find out if/when removing the global
lock here is safe.

- Chuck Lever

--
corporate:	<chuckl@netscape.com>
personal:	<chucklever@netscape.net> or <cel@monkey.org>

The Linux Scalability project: http://www.citi.umich.edu/projects/linux-scalability/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/