[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-devel
Subject:    Re: [Sbcl-devel] freeze for sbcl-2.2.4
From:       Douglas Katzman via Sbcl-devel <sbcl-devel () lists ! sourceforge ! net>
Date:       2022-04-26 3:05:52
Message-ID: CAOrNasxDjGi2+v+kTyD2G31n05kvBxgB54qgKn4eH0QQeUHwnw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


The next problem is that my change to create anonymized accessors for
defstruct at compile-time for the benefit of the PCL implementation slot
reader/writer (https://sourceforge.net/p/sbcl/sbcl/ci/d2ca90b6) has\ a
tendency to cause immobile space exhaustion.

The scenario is this: suppose you have 3000 structure types (not an
exaggeration) representing schemata for CL-protobufs.  Previously all the
PCL-compatible fragments of code would have been computed and installed as
part of the action in %TARGET-DEFSTRUCT where it invokes the defstruct
hook. The hook calls ensure-deffoo-class which looks at whether you have
global readers and writers for each slot, and calls COMPILE only as
necessary.  Instead now all the little (largely useless) lambdas are in
immobile space, in addition to which, every slot gets two new accessors
compiled even if both DEFUNs exist, because the PCL functions should never
need type-checking on the instance, whereas the global defuns would have
done type-checking.

Possible remedies seem to be:
- arbitrarily increase the immobile space size
- detect that the defuns are in an unsafe policy and therefore don't
type-check, and therefore _can_ be repurposed as the PCL accessors
  (this doesn't help the safe case because you still effectively get 4
functions per slot)
- combine all accessors for one struct type into a single code component to
reduce space fragmentation
- revert the change
- something else?

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr">The next problem is that my change to create anonymized \
accessors for defstruct at compile-time for the benefit of the PCL implementation \
slot reader/writer (<a \
href="https://sourceforge.net/p/sbcl/sbcl/ci/d2ca90b6">https://sourceforge.net/p/sbcl/sbcl/ci/d2ca90b6</a>) \
has\ a tendency to cause immobile space exhaustion.<div><br><div>The scenario is \
this: suppose you have 3000 structure  types (not an exaggeration) representing \
schemata  for CL-protobufs.   Previously all the PCL-compatible fragments of code \
would have been  computed and installed as part of the action in %TARGET-DEFSTRUCT \
where it invokes the defstruct hook. The hook calls ensure-deffoo-class  which looks \
at whether you have global readers and writers  for each slot, and calls COMPILE only \
as necessary.   Instead now all the little (largely useless) lambdas are in immobile \
space, in addition to which, every slot gets two new accessors compiled even if both \
DEFUNs exist, because the PCL functions should never need type-checking on the  \
instance, whereas the  global  defuns would have done type-checking.</div><div>    \
</div><div>Possible remedies seem to be:  </div><div>- arbitrarily increase the \
immobile space size</div><div>- detect that the defuns are in an unsafe policy and \
therefore don&#39;t type-check, and therefore _can_ be repurposed as the PCL \
accessors<br></div><div>   (this doesn&#39;t help the safe case because you still \
effectively get 4 functions per slot)</div><div>- combine all accessors for one \
struct type into a single code component to reduce space fragmentation</div><div>- \
revert the change</div><div>- something else?</div></div></div></div>





_______________________________________________
Sbcl-devel mailing list
Sbcl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic