lkml.org 
[lkml]   [2009]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [patch 03/20] x86, ptrace, bts: defer branch trace stopping
From
Date
On Sat, 2009-04-04 at 08:17 +0100, Metzger, Markus T wrote:
> >-----Original Message-----
> >From: Peter Zijlstra [mailto:a.p.zijlstra@chello.nl]
> >Sent: Friday, April 03, 2009 5:01 PM
> >To: Metzger, Markus T
>
>
> >Also, I can't say I like the name, what about something like:
> >
> >void account_locked_buffer(struct mm_struct *mm, long pages)
> >{
> > down_write(&mm->mmap_sem);
> >
> > mm->total_vm += pages;
> > mm->locked_vm += pages;
> >
> > up_write(&mm->mmap_sem);
> >}
> >
> >but looking more closely at that alloc_locked_buffer() stuff, I really
> >hate it, who in his right mind does a multi-page kmalloc() -- that's
> >crazy.
>
> I need a non-pageable chunk of memory to give to the cpu to store branch
> trace data in. Kmalloc() is easy to use and gives me what I need.
>
> How would I do this correctly?

Well, how large should this buffer be and must it be physically
contiguous?

Apparently its large enough to account in pages, that would suggest you
should use the page allocator to get memory.

Furthermore, if it needs to be physically contiguous and its more than
say 8 pages worth, you're basically up shit creek.



\
 
 \ /
  Last update: 2009-04-04 13:15    [W:0.468 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site