Podrías hacer algo como esto conawk
:
awk -vfilename=output -vcut=1000 '
BEGIN { nl=0; nf=1; f=filename "." nf;}
++nl >= cut && /^cust header,/ {
close(f); nl=0; f=filename "." ++nf}
{print > f}' < file
Mantiene un recuento de las líneas que se ven y vuelve a abrir un nuevo archivo de salida si el recuento es mayor quecut
(1000 aquí ), y la línea actual comienza con cust header,
. Los archivos de salida se denominan output.1
, output.2
,... (la variable filename
)
Один документ в справочных материалах упоминает mapping_set_unevictable()
. Там сказано, что оно использовалось в двух случаях :
By ramfs to mark the address spaces of its inodes when they are created, and this mark remains for the life of the inode.
By SYSV SHM to mark SHM_LOCK'd address spaces until SHM_UNLOCK is called.
Note that SHM_LOCK is not required to page in the locked pages if they're swapped out; the application must touch the pages manually if it wants to ensure they're in memory.
Теперь он используется в третьем случае. Применяется к графическим буферам i915, если они отображаются графическим процессором :
.https://elixir.bootlin.com/linux/v5.0.17/ident/mapping_set_unevictable
Referenced in 4 files:
- drivers/gpu/drm/i915/i915_gem.c, line 2589 [in i915_gem_object_get_pages_gtt()]