* [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation @ 2008-07-03 2:24 Zhang Rui 2008-07-08 19:37 ` [linux-pm] " Pavel Machek 0 siblings, 1 reply; 10+ messages in thread From: Zhang Rui @ 2008-07-03 2:24 UTC (permalink / raw) To: linux-pm, linux-acpi, linux-kernel Hi, According to the ACPI spec, ACPI NVS memory region is required to be saved/restored by OS during hibernation. Section 15.3.2 ACPI Spec 3.0b, "OSPM will call the _PTS control method some time before entering a sleeping state, to allow the platform’s AML code to update this memory image before entering the sleeping state. After the system awakes from an S4 state, OSPM will restore this memory area and call the _WAK control method to enable the BIOS to reclaim its memory image." This patch set add the mechanism to save/restore ACPI NVS memory during hibernation. Patch 01: call platform_begin before swsusp_shrink_memory. So that we can allocate enough pages for ACPI NVS memory before shrink the memory. Patch 02: introduce the mechanism to save/restore ACPI NVS memory. Patch 03/04: mark the ACPI NVS memory region on both x86_64 and x86_32 platform. As patch 01 changes the generic code, I don't know if there are any side effects introduced by this patch, and I'm not able to test on other platforms. But with Rafael's suggestion, patch 01 can be optionally dropped because we can use the the I/O and spare pages reserved, which is 5MB at present and the NVS memory is usually tens of pages during my test. Any comments are welcome. :) thanks, rui _______________________________________________ linux-pm mailing list linux-pm@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/linux-pm ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation 2008-07-03 2:24 [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation Zhang Rui @ 2008-07-08 19:37 ` Pavel Machek 2008-07-09 19:37 ` Rafael J. Wysocki 0 siblings, 1 reply; 10+ messages in thread From: Pavel Machek @ 2008-07-08 19:37 UTC (permalink / raw) To: Zhang Rui; +Cc: linux-pm, linux-acpi, linux-kernel Hi! > According to the ACPI spec, ACPI NVS memory region is required to > be saved/restored by OS during hibernation. > > Section 15.3.2 ACPI Spec 3.0b, > "OSPM will call the _PTS control method some time before entering > a sleeping state, to allow the platform???s AML code to update > this memory image before entering the sleeping state. > After the system awakes from an S4 state, OSPM will restore this > memory area and call the _WAK control method to enable the BIOS > to reclaim its memory image." > > This patch set add the mechanism to save/restore ACPI NVS memory > during hibernation. > > Patch 01: call platform_begin before swsusp_shrink_memory. > So that we can allocate enough pages for ACPI NVS memory > before shrink the memory. Why is it neccessary to allocate memory for a copy? We should be able to save ACPI NVS area same way we are saving kernel pages, no? -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation 2008-07-08 19:37 ` [linux-pm] " Pavel Machek @ 2008-07-09 19:37 ` Rafael J. Wysocki 2008-07-11 18:51 ` Pavel Machek 0 siblings, 1 reply; 10+ messages in thread From: Rafael J. Wysocki @ 2008-07-09 19:37 UTC (permalink / raw) To: Pavel Machek; +Cc: Zhang Rui, linux-pm, linux-acpi, linux-kernel On Tuesday, 8 of July 2008, Pavel Machek wrote: > Hi! > > > According to the ACPI spec, ACPI NVS memory region is required to > > be saved/restored by OS during hibernation. > > > > Section 15.3.2 ACPI Spec 3.0b, > > "OSPM will call the _PTS control method some time before entering > > a sleeping state, to allow the platform???s AML code to update > > this memory image before entering the sleeping state. > > After the system awakes from an S4 state, OSPM will restore this > > memory area and call the _WAK control method to enable the BIOS > > to reclaim its memory image." > > > > This patch set add the mechanism to save/restore ACPI NVS memory > > during hibernation. > > > > Patch 01: call platform_begin before swsusp_shrink_memory. > > So that we can allocate enough pages for ACPI NVS memory > > before shrink the memory. > > Why is it neccessary to allocate memory for a copy? We should be able > to save ACPI NVS area same way we are saving kernel pages, no? Because we want to restore it from the hibernated kernel (when it gets control back again). Thanks, Rafael ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation 2008-07-09 19:37 ` Rafael J. Wysocki @ 2008-07-11 18:51 ` Pavel Machek 2008-07-11 19:18 ` Rafael J. Wysocki 0 siblings, 1 reply; 10+ messages in thread From: Pavel Machek @ 2008-07-11 18:51 UTC (permalink / raw) To: Rafael J. Wysocki; +Cc: Zhang Rui, linux-pm, linux-acpi, linux-kernel On Wed 2008-07-09 21:37:18, Rafael J. Wysocki wrote: > On Tuesday, 8 of July 2008, Pavel Machek wrote: > > Hi! > > > > > According to the ACPI spec, ACPI NVS memory region is required to > > > be saved/restored by OS during hibernation. > > > > > > Section 15.3.2 ACPI Spec 3.0b, > > > "OSPM will call the _PTS control method some time before entering > > > a sleeping state, to allow the platform???s AML code to update > > > this memory image before entering the sleeping state. > > > After the system awakes from an S4 state, OSPM will restore this > > > memory area and call the _WAK control method to enable the BIOS > > > to reclaim its memory image." > > > > > > This patch set add the mechanism to save/restore ACPI NVS memory > > > during hibernation. > > > > > > Patch 01: call platform_begin before swsusp_shrink_memory. > > > So that we can allocate enough pages for ACPI NVS memory > > > before shrink the memory. > > > > Why is it neccessary to allocate memory for a copy? We should be able > > to save ACPI NVS area same way we are saving kernel pages, no? > > Because we want to restore it from the hibernated kernel (when it gets control > back again). Why is that important? So we can run some ACPI methods from hibernated kernel before restoring it? -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation 2008-07-11 18:51 ` Pavel Machek @ 2008-07-11 19:18 ` Rafael J. Wysocki 2008-07-11 20:52 ` Pavel Machek 0 siblings, 1 reply; 10+ messages in thread From: Rafael J. Wysocki @ 2008-07-11 19:18 UTC (permalink / raw) To: Pavel Machek; +Cc: Zhang Rui, linux-pm, linux-acpi, linux-kernel On Friday, 11 of July 2008, Pavel Machek wrote: > On Wed 2008-07-09 21:37:18, Rafael J. Wysocki wrote: > > On Tuesday, 8 of July 2008, Pavel Machek wrote: > > > Hi! > > > > > > > According to the ACPI spec, ACPI NVS memory region is required to > > > > be saved/restored by OS during hibernation. > > > > > > > > Section 15.3.2 ACPI Spec 3.0b, > > > > "OSPM will call the _PTS control method some time before entering > > > > a sleeping state, to allow the platform???s AML code to update > > > > this memory image before entering the sleeping state. > > > > After the system awakes from an S4 state, OSPM will restore this > > > > memory area and call the _WAK control method to enable the BIOS > > > > to reclaim its memory image." > > > > > > > > This patch set add the mechanism to save/restore ACPI NVS memory > > > > during hibernation. > > > > > > > > Patch 01: call platform_begin before swsusp_shrink_memory. > > > > So that we can allocate enough pages for ACPI NVS memory > > > > before shrink the memory. > > > > > > Why is it neccessary to allocate memory for a copy? We should be able > > > to save ACPI NVS area same way we are saving kernel pages, no? > > > > Because we want to restore it from the hibernated kernel (when it gets control > > back again). > > Why is that important? So we can run some ACPI methods from hibernated > kernel before restoring it? We're supposed to restore it right prior to executing _WAK, which is after we've executed _BFS. This is a bit theoretical, because no one seems to actaully implement _BFS, but well. Thanks, Rafael ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation 2008-07-11 19:18 ` Rafael J. Wysocki @ 2008-07-11 20:52 ` Pavel Machek 2008-07-11 20:59 ` Rafael J. Wysocki 0 siblings, 1 reply; 10+ messages in thread From: Pavel Machek @ 2008-07-11 20:52 UTC (permalink / raw) To: Rafael J. Wysocki; +Cc: Zhang Rui, linux-pm, linux-acpi, linux-kernel On Fri 2008-07-11 21:18:34, Rafael J. Wysocki wrote: > On Friday, 11 of July 2008, Pavel Machek wrote: > > On Wed 2008-07-09 21:37:18, Rafael J. Wysocki wrote: > > > On Tuesday, 8 of July 2008, Pavel Machek wrote: > > > > Hi! > > > > > > > > > According to the ACPI spec, ACPI NVS memory region is required to > > > > > be saved/restored by OS during hibernation. > > > > > > > > > > Section 15.3.2 ACPI Spec 3.0b, > > > > > "OSPM will call the _PTS control method some time before entering > > > > > a sleeping state, to allow the platform???s AML code to update > > > > > this memory image before entering the sleeping state. > > > > > After the system awakes from an S4 state, OSPM will restore this > > > > > memory area and call the _WAK control method to enable the BIOS > > > > > to reclaim its memory image." > > > > > > > > > > This patch set add the mechanism to save/restore ACPI NVS memory > > > > > during hibernation. > > > > > > > > > > Patch 01: call platform_begin before swsusp_shrink_memory. > > > > > So that we can allocate enough pages for ACPI NVS memory > > > > > before shrink the memory. > > > > > > > > Why is it neccessary to allocate memory for a copy? We should be able > > > > to save ACPI NVS area same way we are saving kernel pages, no? > > > > > > Because we want to restore it from the hibernated kernel (when it gets control > > > back again). > > > > Why is that important? So we can run some ACPI methods from hibernated > > kernel before restoring it? > > We're supposed to restore it right prior to executing _WAK, which is after > we've executed _BFS. This is a bit theoretical, because no one seems to > actaully implement _BFS, but well. Could we just call _BFS from the "loading" kernel, instead? That would save us that copying code... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation 2008-07-11 20:52 ` Pavel Machek @ 2008-07-11 20:59 ` Rafael J. Wysocki 2008-07-11 21:56 ` Yinghai Lu 0 siblings, 1 reply; 10+ messages in thread From: Rafael J. Wysocki @ 2008-07-11 20:59 UTC (permalink / raw) To: Pavel Machek; +Cc: Zhang Rui, linux-pm, linux-acpi, linux-kernel On Friday, 11 of July 2008, Pavel Machek wrote: > On Fri 2008-07-11 21:18:34, Rafael J. Wysocki wrote: > > On Friday, 11 of July 2008, Pavel Machek wrote: > > > On Wed 2008-07-09 21:37:18, Rafael J. Wysocki wrote: > > > > On Tuesday, 8 of July 2008, Pavel Machek wrote: > > > > > Hi! > > > > > > > > > > > According to the ACPI spec, ACPI NVS memory region is required to > > > > > > be saved/restored by OS during hibernation. > > > > > > > > > > > > Section 15.3.2 ACPI Spec 3.0b, > > > > > > "OSPM will call the _PTS control method some time before entering > > > > > > a sleeping state, to allow the platform???s AML code to update > > > > > > this memory image before entering the sleeping state. > > > > > > After the system awakes from an S4 state, OSPM will restore this > > > > > > memory area and call the _WAK control method to enable the BIOS > > > > > > to reclaim its memory image." > > > > > > > > > > > > This patch set add the mechanism to save/restore ACPI NVS memory > > > > > > during hibernation. > > > > > > > > > > > > Patch 01: call platform_begin before swsusp_shrink_memory. > > > > > > So that we can allocate enough pages for ACPI NVS memory > > > > > > before shrink the memory. > > > > > > > > > > Why is it neccessary to allocate memory for a copy? We should be able > > > > > to save ACPI NVS area same way we are saving kernel pages, no? > > > > > > > > Because we want to restore it from the hibernated kernel (when it gets control > > > > back again). > > > > > > Why is that important? So we can run some ACPI methods from hibernated > > > kernel before restoring it? > > > > We're supposed to restore it right prior to executing _WAK, which is after > > we've executed _BFS. This is a bit theoretical, because no one seems to > > actaully implement _BFS, but well. > > Could we just call _BFS from the "loading" kernel, instead? That would > save us that copying code... I'd prefer not to, because that would require the boot kernel to support ACPI, which need not (and in fact should not IMO) be the case at present. Anyway, we'd have to either copy the NVS data into memory which is mapped and can be saved, or to map the NVS area in order to save/restore it, which I wouldn't like to do. Thanks, Rafael ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation 2008-07-11 20:59 ` Rafael J. Wysocki @ 2008-07-11 21:56 ` Yinghai Lu 2008-07-12 0:40 ` Rafael J. Wysocki 0 siblings, 1 reply; 10+ messages in thread From: Yinghai Lu @ 2008-07-11 21:56 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Pavel Machek, Zhang Rui, linux-pm, linux-acpi, linux-kernel On Fri, Jul 11, 2008 at 1:59 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote: > On Friday, 11 of July 2008, Pavel Machek wrote: >> On Fri 2008-07-11 21:18:34, Rafael J. Wysocki wrote: >> > On Friday, 11 of July 2008, Pavel Machek wrote: >> > > On Wed 2008-07-09 21:37:18, Rafael J. Wysocki wrote: >> > > > On Tuesday, 8 of July 2008, Pavel Machek wrote: >> > > > > Hi! >> > > > > >> > > > > > According to the ACPI spec, ACPI NVS memory region is required to >> > > > > > be saved/restored by OS during hibernation. >> > > > > > >> > > > > > Section 15.3.2 ACPI Spec 3.0b, >> > > > > > "OSPM will call the _PTS control method some time before entering >> > > > > > a sleeping state, to allow the platform???s AML code to update >> > > > > > this memory image before entering the sleeping state. >> > > > > > After the system awakes from an S4 state, OSPM will restore this >> > > > > > memory area and call the _WAK control method to enable the BIOS >> > > > > > to reclaim its memory image." >> > > > > > >> > > > > > This patch set add the mechanism to save/restore ACPI NVS memory >> > > > > > during hibernation. >> > > > > > >> > > > > > Patch 01: call platform_begin before swsusp_shrink_memory. >> > > > > > So that we can allocate enough pages for ACPI NVS memory >> > > > > > before shrink the memory. >> > > > > >> > > > > Why is it neccessary to allocate memory for a copy? We should be able >> > > > > to save ACPI NVS area same way we are saving kernel pages, no? >> > > > >> > > > Because we want to restore it from the hibernated kernel (when it gets control >> > > > back again). >> > > >> > > Why is that important? So we can run some ACPI methods from hibernated >> > > kernel before restoring it? >> > >> > We're supposed to restore it right prior to executing _WAK, which is after >> > we've executed _BFS. This is a bit theoretical, because no one seems to >> > actaully implement _BFS, but well. >> >> Could we just call _BFS from the "loading" kernel, instead? That would >> save us that copying code... > > I'd prefer not to, because that would require the boot kernel to support ACPI, > which need not (and in fact should not IMO) be the case at present. > > Anyway, we'd have to either copy the NVS data into memory which is mapped and > can be saved, or to map the NVS area in order to save/restore it, which I > wouldn't like to do. io_remap doesn't work at that time? YH ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation 2008-07-11 21:56 ` Yinghai Lu @ 2008-07-12 0:40 ` Rafael J. Wysocki 2008-07-14 6:26 ` Pavel Machek 0 siblings, 1 reply; 10+ messages in thread From: Rafael J. Wysocki @ 2008-07-12 0:40 UTC (permalink / raw) To: Yinghai Lu; +Cc: Pavel Machek, Zhang Rui, linux-pm, linux-acpi, linux-kernel On Friday, 11 of July 2008, Yinghai Lu wrote: > On Fri, Jul 11, 2008 at 1:59 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote: > > On Friday, 11 of July 2008, Pavel Machek wrote: > >> On Fri 2008-07-11 21:18:34, Rafael J. Wysocki wrote: > >> > On Friday, 11 of July 2008, Pavel Machek wrote: > >> > > On Wed 2008-07-09 21:37:18, Rafael J. Wysocki wrote: > >> > > > On Tuesday, 8 of July 2008, Pavel Machek wrote: > >> > > > > Hi! > >> > > > > > >> > > > > > According to the ACPI spec, ACPI NVS memory region is required to > >> > > > > > be saved/restored by OS during hibernation. > >> > > > > > > >> > > > > > Section 15.3.2 ACPI Spec 3.0b, > >> > > > > > "OSPM will call the _PTS control method some time before entering > >> > > > > > a sleeping state, to allow the platform???s AML code to update > >> > > > > > this memory image before entering the sleeping state. > >> > > > > > After the system awakes from an S4 state, OSPM will restore this > >> > > > > > memory area and call the _WAK control method to enable the BIOS > >> > > > > > to reclaim its memory image." > >> > > > > > > >> > > > > > This patch set add the mechanism to save/restore ACPI NVS memory > >> > > > > > during hibernation. > >> > > > > > > >> > > > > > Patch 01: call platform_begin before swsusp_shrink_memory. > >> > > > > > So that we can allocate enough pages for ACPI NVS memory > >> > > > > > before shrink the memory. > >> > > > > > >> > > > > Why is it neccessary to allocate memory for a copy? We should be able > >> > > > > to save ACPI NVS area same way we are saving kernel pages, no? > >> > > > > >> > > > Because we want to restore it from the hibernated kernel (when it gets control > >> > > > back again). > >> > > > >> > > Why is that important? So we can run some ACPI methods from hibernated > >> > > kernel before restoring it? > >> > > >> > We're supposed to restore it right prior to executing _WAK, which is after > >> > we've executed _BFS. This is a bit theoretical, because no one seems to > >> > actaully implement _BFS, but well. > >> > >> Could we just call _BFS from the "loading" kernel, instead? That would > >> save us that copying code... > > > > I'd prefer not to, because that would require the boot kernel to support ACPI, > > which need not (and in fact should not IMO) be the case at present. > > > > Anyway, we'd have to either copy the NVS data into memory which is mapped and > > can be saved, or to map the NVS area in order to save/restore it, which I > > wouldn't like to do. > > io_remap doesn't work at that time? Yes, it does, but to use it, we would have to add extra information to the image header describing the location of the NVS data within the image. I prefer the Zhang Rui's approach to this. Thanks, Rafael ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-pm] [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation 2008-07-12 0:40 ` Rafael J. Wysocki @ 2008-07-14 6:26 ` Pavel Machek 0 siblings, 0 replies; 10+ messages in thread From: Pavel Machek @ 2008-07-14 6:26 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Yinghai Lu, Zhang Rui, linux-pm, linux-acpi, linux-kernel On Sat 2008-07-12 02:40:20, Rafael J. Wysocki wrote: > On Friday, 11 of July 2008, Yinghai Lu wrote: > > On Fri, Jul 11, 2008 at 1:59 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote: > > > On Friday, 11 of July 2008, Pavel Machek wrote: > > >> On Fri 2008-07-11 21:18:34, Rafael J. Wysocki wrote: > > >> > On Friday, 11 of July 2008, Pavel Machek wrote: > > >> > > On Wed 2008-07-09 21:37:18, Rafael J. Wysocki wrote: > > >> > > > On Tuesday, 8 of July 2008, Pavel Machek wrote: > > >> > > > > Hi! > > >> > > > > > > >> > > > > > According to the ACPI spec, ACPI NVS memory region is required to > > >> > > > > > be saved/restored by OS during hibernation. > > >> > > > > > > > >> > > > > > Section 15.3.2 ACPI Spec 3.0b, > > >> > > > > > "OSPM will call the _PTS control method some time before entering > > >> > > > > > a sleeping state, to allow the platform???s AML code to update > > >> > > > > > this memory image before entering the sleeping state. > > >> > > > > > After the system awakes from an S4 state, OSPM will restore this > > >> > > > > > memory area and call the _WAK control method to enable the BIOS > > >> > > > > > to reclaim its memory image." > > >> > > > > > > > >> > > > > > This patch set add the mechanism to save/restore ACPI NVS memory > > >> > > > > > during hibernation. > > >> > > > > > > > >> > > > > > Patch 01: call platform_begin before swsusp_shrink_memory. > > >> > > > > > So that we can allocate enough pages for ACPI NVS memory > > >> > > > > > before shrink the memory. > > >> > > > > > > >> > > > > Why is it neccessary to allocate memory for a copy? We should be able > > >> > > > > to save ACPI NVS area same way we are saving kernel pages, no? > > >> > > > > > >> > > > Because we want to restore it from the hibernated kernel (when it gets control > > >> > > > back again). > > >> > > > > >> > > Why is that important? So we can run some ACPI methods from hibernated > > >> > > kernel before restoring it? > > >> > > > >> > We're supposed to restore it right prior to executing _WAK, which is after > > >> > we've executed _BFS. This is a bit theoretical, because no one seems to > > >> > actaully implement _BFS, but well. > > >> > > >> Could we just call _BFS from the "loading" kernel, instead? That would > > >> save us that copying code... > > > > > > I'd prefer not to, because that would require the boot kernel to support ACPI, > > > which need not (and in fact should not IMO) be the case at present. > > > > > > Anyway, we'd have to either copy the NVS data into memory which is mapped and > > > can be saved, or to map the NVS area in order to save/restore it, which I > > > wouldn't like to do. > > > > io_remap doesn't work at that time? > > Yes, it does, but to use it, we would have to add extra information to the > image header describing the location of the NVS data within the image. > I prefer the Zhang Rui's approach to this. Ok, I guess I prefer it now, too. Feel free to add ACK on the series. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-07-14 6:25 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-03 2:24 [RFC PATCH 0/4] save and restore ACPI NVS memory during hibernation Zhang Rui 2008-07-08 19:37 ` [linux-pm] " Pavel Machek 2008-07-09 19:37 ` Rafael J. Wysocki 2008-07-11 18:51 ` Pavel Machek 2008-07-11 19:18 ` Rafael J. Wysocki 2008-07-11 20:52 ` Pavel Machek 2008-07-11 20:59 ` Rafael J. Wysocki 2008-07-11 21:56 ` Yinghai Lu 2008-07-12 0:40 ` Rafael J. Wysocki 2008-07-14 6:26 ` Pavel Machek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox