lookaside lists and memory fragmentation

Does using lookaside list prevents memory fragmentation? Or it is used just
for greater performance?

-htfv

Well, they improve performance and they have a good impact over memory
fragmentation.

----- Original Message -----
From: “Alexey Logachyov”
To: “NT Developers Interest List”
Sent: Wednesday, August 07, 2002 4:51 PM
Subject: [ntdev] lookaside lists and memory fragmentation

> Does using lookaside list prevents memory fragmentation? Or it is used
just
> for greater performance?
>
> -htfv
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>

What about the last parameter for ExInitialize[N]PagedLookasideList (Depth).
NT4 DDK says it “specifies the maximum number of enrties that can be on
lookaside list”. Waht maximum does it mean? Do I have to specify some value
when running on NT4?

-htfv

----- Original Message -----
From: “Dan Partelly”
To: “NT Developers Interest List”
Sent: Wednesday, August 07, 2002 4:25 PM
Subject: [ntdev] Re: lookaside lists and memory fragmentation

> Well, they improve performance and they have a good impact over memory
> fragmentation.
>
> ----- Original Message -----
> From: “Alexey Logachyov”
> To: “NT Developers Interest List”
> Sent: Wednesday, August 07, 2002 4:51 PM
> Subject: [ntdev] lookaside lists and memory fragmentation
>
>
> > Does using lookaside list prevents memory fragmentation? Or it is used
> just
> > for greater performance?
> >
> > -htfv
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> > To unsubscribe send a blank email to %%email.unsub%%
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@vba.com.by
> To unsubscribe send a blank email to %%email.unsub%%
>

IMHO, recycling memory that you have allocated yourself (use of "lookaside
lists) can help reduce memory fragmentation AND improve performance IF you
are careful and systematic with the sizes of the memory that you allocate.

For items of fixed sizes (e.g. data structures), recycling the allocated
items will surely reduce memory fragmentation. For variable sized items,
allocating and recycling a fixed size chunk that can be re-used for most
cases can also reduce memory fragmentation.

If you are not thoughtful and systematic with the sizes of items that you
allocate, then the use of a lookaside list won’t reduce or “prevent” memory
fragmentation.

Recycling memory inherently improves performance to some degree because the
process of allocating and freeing memory is replaced by insert/remove into
list.

At this point the remaining performance-related issue is improvement of the
list management function performance. The kernel provides several
list-management APIs. You would want to employ the most efficient list API
that is suitable for the functions that you are implementing. In the case of
memory-recycling, using a SLIST instead of a doubly-linked list with
spinlocks would probably provide best performance.

“Alexey Logachyov” wrote in message news:xxxxx@ntdev…
>
> Does using lookaside list prevents memory fragmentation? Or it is used
just
> for greater performance?
>
> -htfv
>
>
>
>
>

Yes a bit. After lookaside is populated, the memory does not get
fragmented on more allocates/frees.

Max

----- Original Message -----
From: “Alexey Logachyov”
To: “NT Developers Interest List”
Sent: Wednesday, August 07, 2002 5:51 PM
Subject: [ntdev] lookaside lists and memory fragmentation

> Does using lookaside list prevents memory fragmentation? Or it is
used just
> for greater performance?
>
> -htfv
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>

>> Waht maximum does it mean?

Technically is 256.

> Do I have to specify some value when running on NT4?

No you dont have too.

What I dont understand here is way MS deprecated zone allocation. I still
find usefull aplications for zoned memory,
despite the more elegant lookaside mechanism.

Dan

----- Original Message -----
From: “Alexey Logachyov”
To: “NT Developers Interest List”
Sent: Wednesday, August 07, 2002 5:32 PM
Subject: [ntdev] Re: lookaside lists and memory fragmentation

> What about the last parameter for ExInitialize[N]PagedLookasideList
(Depth).
> NT4 DDK says it “specifies the maximum number of enrties that can be on
> lookaside list”. Waht maximum does it mean? Do I have to specify some
value
> when running on NT4?
>
> -htfv
>
> ----- Original Message -----
> From: “Dan Partelly”
> To: “NT Developers Interest List”
> Sent: Wednesday, August 07, 2002 4:25 PM
> Subject: [ntdev] Re: lookaside lists and memory fragmentation
>
>
> > Well, they improve performance and they have a good impact over memory
> > fragmentation.
> >
> > ----- Original Message -----
> > From: “Alexey Logachyov”
> > To: “NT Developers Interest List”
> > Sent: Wednesday, August 07, 2002 4:51 PM
> > Subject: [ntdev] lookaside lists and memory fragmentation
> >
> >
> > > Does using lookaside list prevents memory fragmentation? Or it is used
> > just
> > > for greater performance?
> > >
> > > -htfv
> > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> > > To unsubscribe send a blank email to %%email.unsub%%
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@vba.com.by
> > To unsubscribe send a blank email to %%email.unsub%%
> >
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>

You can specify what you like, the Depth parameter is actually ignored. If
you feel the need to be able to manage a lookaside depth then you need to
implement the functions yourself - not hard to do, except in this case you
do not get scheduled by a system thread for impromptu cleaning of your
queues - some might regard this as a bonus.

Mark.

At 17:32 07/08/2002 +0300, Alexey Logachyov wrote:

What about the last parameter for ExInitialize[N]PagedLookasideList (Depth).
NT4 DDK says it “specifies the maximum number of enrties that can be on
lookaside list”. Waht maximum does it mean? Do I have to specify some value
when running on NT4?

-htfv

----- Original Message -----
From: “Dan Partelly”
>To: “NT Developers Interest List”
>Sent: Wednesday, August 07, 2002 4:25 PM
>Subject: [ntdev] Re: lookaside lists and memory fragmentation
>
>
> > Well, they improve performance and they have a good impact over memory
> > fragmentation.
> >
> > ----- Original Message -----
> > From: “Alexey Logachyov”
> > To: “NT Developers Interest List”
> > Sent: Wednesday, August 07, 2002 4:51 PM
> > Subject: [ntdev] lookaside lists and memory fragmentation
> >
> >
> > > Does using lookaside list prevents memory fragmentation? Or it is used
> > just
> > > for greater performance?
> > >
> > > -htfv
> > >
> > >
> > >
> > >
> >

Set it to zero, then the kernel will adjust the depth itself. A usual
way.

----- Original Message -----
From: “Alexey Logachyov”
To: “NT Developers Interest List”
Sent: Wednesday, August 07, 2002 6:32 PM
Subject: [ntdev] Re: lookaside lists and memory fragmentation

> What about the last parameter for ExInitialize[N]PagedLookasideList
(Depth).
> NT4 DDK says it “specifies the maximum number of enrties that can be
on
> lookaside list”. Waht maximum does it mean? Do I have to specify
some value
> when running on NT4?
>
> -htfv
>
> ----- Original Message -----
> From: “Dan Partelly”
> To: “NT Developers Interest List”
> Sent: Wednesday, August 07, 2002 4:25 PM
> Subject: [ntdev] Re: lookaside lists and memory fragmentation
>
>
> > Well, they improve performance and they have a good impact over
memory
> > fragmentation.
> >
> > ----- Original Message -----
> > From: “Alexey Logachyov”
> > To: “NT Developers Interest List”
> > Sent: Wednesday, August 07, 2002 4:51 PM
> > Subject: [ntdev] lookaside lists and memory fragmentation
> >
> >
> > > Does using lookaside list prevents memory fragmentation? Or it
is used
> > just
> > > for greater performance?
> > >
> > > -htfv
> > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> > > To unsubscribe send a blank email to %%email.unsub%%
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@vba.com.by
> > To unsubscribe send a blank email to %%email.unsub%%
> >
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>