From: Alexey Gladkov <gladkov.alexey@gmail.com>
To: make-initrd@lists.altlinux.org
Subject: Re: [make-initrd] Поддерживается ли просыпание из swap-файла
Date: Wed, 5 Jun 2024 19:47:22 +0200
Message-ID: <ZmCkqh9UKmJH2CGj@example.org> (raw)
In-Reply-To: <d7e66e7c-f8cd-42c7-ba53-7b3c836eab47@gmail.com>
On Wed, Jun 05, 2024 at 08:39:14PM +0300, Leonid Krivoshein wrote:
> Добрый день!
>
>
> On 6/5/24 19:04, Alexey Gladkov wrote:
> > On Wed, Jun 05, 2024 at 10:37:07PM +0700, Антон Мидюков wrote:
> >> 05.06.2024 22:17, Alexey Gladkov пишет:
> >>> On Wed, Jun 05, 2024 at 09:56:33PM +0700, Антон Мидюков wrote:
> >>>> Приветствую
> >>>>
> >>>> А make-initrd не умеет просыпаться из swap-файла в / или /home?
> >>>> Если не умеет, то такое возможно реализовать?
> >>>> Если умеет, то что для этого нужно?
> >>> Не умеет.
> >>>
> >>> Ты хочешь придумать свою схему или ты хочешь реализовать нечто что уже в
> >>> каком-нибудь дистрибутиве ?
> >>>
> >> Я пока не смотрел, есть ли такое в других дистрибутивах.
> > В dracut ничего такого не вижу.
> >
> >> У нас начали в некоторых дистрибутивах переходить на своп-файл вместо
> >> раздела своп (при установке это делает installer-feature-swapfile). Вот
> >> поэтому и интересуюсь.
> >> Это пока только вопрос о возможности такой реализации в будущем.
> > Насколько я понял задумку идея плохая. Для доступа к своп-файлу нужно
> > будет найти и смонтировать раздел. И в этот момент сработает resume.
>
> +1, идея плохая.
>
>
> > Ответ на твой вопрос уже есть:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/power/swsusp.rst#n353
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/power/swsusp-and-swap-files.rst
> >
> > Поддержка resume_offset= у нас есть.
>
> Хорошо, что swsusp дефолтный бекенд для hibernation в наших
> дистрибутивах, кода-то были ещё uswsusp и tuxonice, пришлось бы их тоже
> учитывать. Идея с resume_offset=... очень опасная:
> https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Acquire_swap_file_offset
> -- стоит кому-то ручонками удалить, пересоздать файл, выполнить
> дефрагментацию, забыв переопределить новое смещение, и каюк вашим
> данным. Не стоит такое поддерживать.
Именно поэтому это плохая идея ))
--
Rgrds, legion
next prev parent reply other threads:[~2024-06-05 17:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 14:56 Антон Мидюков
2024-06-05 15:17 ` Alexey Gladkov
2024-06-05 15:37 ` Антон Мидюков
2024-06-05 16:04 ` Alexey Gladkov
2024-06-05 17:39 ` Leonid Krivoshein
2024-06-05 17:47 ` Alexey Gladkov [this message]
2024-06-07 23:17 ` Vladimir D. Seleznev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZmCkqh9UKmJH2CGj@example.org \
--to=gladkov.alexey@gmail.com \
--cc=make-initrd@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Make-initrd development discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
public-inbox-index make-initrd
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.make-initrd
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git